summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt4
-rw-r--r--pyramid/tests/test_traversal.py15
-rw-r--r--pyramid/traversal.py7
3 files changed, 8 insertions, 18 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 641219a8b..6abef1e6b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -98,6 +98,10 @@ Backwards Incompatibilities
since Pyramid 1.1. Use methods of ``request.environ`` (a real dictionary)
instead.
+- Removed ancient backwards compatibily hack in
+ ``pyramid.traversal.DefaultRootFactory`` which populated the ``__dict__`` of
+ the factory with the matchdict values for compatibility with BFG 0.9.
+
1.5a1 (2013-08-30)
==================
diff --git a/pyramid/tests/test_traversal.py b/pyramid/tests/test_traversal.py
index ff5937811..0dcc4a027 100644
--- a/pyramid/tests/test_traversal.py
+++ b/pyramid/tests/test_traversal.py
@@ -1278,22 +1278,13 @@ class TestDefaultRootFactory(unittest.TestCase):
def _makeOne(self, environ):
return self._getTargetClass()(environ)
- def test_no_matchdict(self):
- class DummyRequest:
- matchdict = None
+ def test_it(self):
+ class DummyRequest(object):
+ pass
root = self._makeOne(DummyRequest())
self.assertEqual(root.__parent__, None)
self.assertEqual(root.__name__, None)
- def test_matchdict(self):
- class DummyRequest:
- pass
- request = DummyRequest()
- request.matchdict = {'a':1, 'b':2}
- root = self._makeOne(request)
- self.assertEqual(root.a, 1)
- self.assertEqual(root.b, 2)
-
class Test__join_path_tuple(unittest.TestCase):
def _callFUT(self, tup):
from pyramid.traversal import _join_path_tuple
diff --git a/pyramid/traversal.py b/pyramid/traversal.py
index 341ed2d75..4c275c4c1 100644
--- a/pyramid/traversal.py
+++ b/pyramid/traversal.py
@@ -822,9 +822,4 @@ class DefaultRootFactory:
__parent__ = None
__name__ = None
def __init__(self, request):
- matchdict = request.matchdict
- # provide backwards compatibility for applications which
- # used routes (at least apps without any custom "context
- # factory") in BFG 0.9.X and before
- if matchdict is not None:
- self.__dict__.update(matchdict)
+ pass