You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/05/08 16:44:42 UTC
[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 <da...@brondsema.net>
Authored: Fri Apr 18 10:14:54 2014 -0400
Committer: Dave Brondsema <da...@brondsema.net>
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