Return-Path: X-Original-To: apmail-allura-commits-archive@www.apache.org Delivered-To: apmail-allura-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AEA1E118A1 for ; Thu, 15 May 2014 03:27:19 +0000 (UTC) Received: (qmail 6457 invoked by uid 500); 10 May 2014 21:58:33 -0000 Delivered-To: apmail-allura-commits-archive@allura.apache.org Received: (qmail 64193 invoked by uid 500); 10 May 2014 21:56:27 -0000 Mailing-List: contact commits-help@allura.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@allura.apache.org Delivered-To: mailing list commits@allura.apache.org Received: (qmail 60363 invoked by uid 99); 10 May 2014 21:56:18 -0000 Received: from Unknown (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 May 2014 21:56:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0951C939760; Thu, 8 May 2014 14:44:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brondsem@apache.org To: commits@allura.apache.org Date: Thu, 08 May 2014 14:44:42 -0000 Message-Id: <3984a9cbdb16432e90df9243d4ec92fa@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/7] git commit: [#7316] remove very old unused global context vars [#7316] remove very old unused global context vars Project: http://git-wip-us.apache.org/repos/asf/allura/repo Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/f181261c Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f181261c Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f181261c Branch: refs/heads/master Commit: f181261c17675e02142db6dd5fba4c8fb0928972 Parents: c820139 Author: Dave Brondsema Authored: Fri Apr 18 10:14:54 2014 -0400 Committer: Dave Brondsema Committed: Thu May 8 10:44:09 2014 -0400 ---------------------------------------------------------------------- Allura/allura/command/base.py | 1 - Allura/allura/controllers/basetest_project_root.py | 1 - Allura/allura/controllers/root.py | 4 +--- Allura/allura/tests/model/test_artifact.py | 2 -- Allura/allura/websetup/bootstrap.py | 1 - AlluraTest/alluratest/controller.py | 2 -- 6 files changed, 1 insertion(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/allura/blob/f181261c/Allura/allura/command/base.py ---------------------------------------------------------------------- diff --git a/Allura/allura/command/base.py b/Allura/allura/command/base.py index 7fa566a..3d619fc 100644 --- a/Allura/allura/command/base.py +++ b/Allura/allura/command/base.py @@ -122,7 +122,6 @@ class Command(command.Command): self.registry.register(pylons.app_globals, self.globals) self.registry.register( allura.credentials, allura.lib.security.Credentials()) - pylons.tmpl_context.queued_messages = None def teardown_globals(self): self.registry.cleanup() http://git-wip-us.apache.org/repos/asf/allura/blob/f181261c/Allura/allura/controllers/basetest_project_root.py ---------------------------------------------------------------------- diff --git a/Allura/allura/controllers/basetest_project_root.py b/Allura/allura/controllers/basetest_project_root.py index 3edb34f..60f64bc 100644 --- a/Allura/allura/controllers/basetest_project_root.py +++ b/Allura/allura/controllers/basetest_project_root.py @@ -78,7 +78,6 @@ class BasetestProjectRootController(WsgiDispatchController, ProjectController): # This code fixes a race condition in our tests c.project = M.Project.query.get( shortname='test', neighborhood_id=self.p_nbhd._id) - c.memoize_cache = {} count = 20 while c.project is None: import time http://git-wip-us.apache.org/repos/asf/allura/blob/f181261c/Allura/allura/controllers/root.py ---------------------------------------------------------------------- diff --git a/Allura/allura/controllers/root.py b/Allura/allura/controllers/root.py index f5848d8..9c0b147 100644 --- a/Allura/allura/controllers/root.py +++ b/Allura/allura/controllers/root.py @@ -84,9 +84,7 @@ class RootController(WsgiDispatchController): def _setup_request(self): c.project = c.app = None - c.memoize_cache = {} - c.user = plugin.AuthenticationProvider.get( - request).authenticate_request() + c.user = plugin.AuthenticationProvider.get(request).authenticate_request() assert c.user is not None, ('c.user should always be at least User.anonymous(). ' 'Did you run `paster setup-app` to create the database?') http://git-wip-us.apache.org/repos/asf/allura/blob/f181261c/Allura/allura/tests/model/test_artifact.py ---------------------------------------------------------------------- diff --git a/Allura/allura/tests/model/test_artifact.py b/Allura/allura/tests/model/test_artifact.py index d00d935..367757b 100644 --- a/Allura/allura/tests/model/test_artifact.py +++ b/Allura/allura/tests/model/test_artifact.py @@ -94,11 +94,9 @@ def test_artifact(): assert not security.has_access(pg, 'delete')(user=u) pg.acl.append(M.ACE.allow(pr._id, 'delete')) ThreadLocalORMSession.flush_all() - c.memoize_cache = {} assert security.has_access(pg, 'delete')(user=u) pg.acl.pop() ThreadLocalORMSession.flush_all() - c.memoize_cache = {} assert not security.has_access(pg, 'delete')(user=u) idx = pg.index() assert 'title' in idx http://git-wip-us.apache.org/repos/asf/allura/blob/f181261c/Allura/allura/websetup/bootstrap.py ---------------------------------------------------------------------- diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py index 1086661..f7b1a99 100644 --- a/Allura/allura/websetup/bootstrap.py +++ b/Allura/allura/websetup/bootstrap.py @@ -89,7 +89,6 @@ def bootstrap(command, conf, vars): # Clean up all old stuff ThreadLocalORMSession.close_all() - c.queued_messages = defaultdict(list) c.user = c.project = c.app = None database = conf.get('db_prefix', '') + 'project:test' wipe_database() http://git-wip-us.apache.org/repos/asf/allura/blob/f181261c/AlluraTest/alluratest/controller.py ---------------------------------------------------------------------- diff --git a/AlluraTest/alluratest/controller.py b/AlluraTest/alluratest/controller.py index 0c9f1f3..a7131ef 100644 --- a/AlluraTest/alluratest/controller.py +++ b/AlluraTest/alluratest/controller.py @@ -127,8 +127,6 @@ def setup_unit_test(): REGISTRY.register(response, Response()) REGISTRY.register(session, beaker.session.SessionObject({})) REGISTRY.register(allura.credentials, allura.lib.security.Credentials()) - c.memoize_cache = {} - c.queued_messages = None c.model_cache = None ThreadLocalORMSession.close_all() setup_unit_test.__test__ = False # sometimes __test__ above isn't sufficient