diff options
| author | Michael Merickel <michael@merickel.org> | 2013-07-14 22:22:30 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2013-07-14 22:22:30 -0500 |
| commit | b6d007065132ad313a0777eb89a71b6fbdc4bcdf (patch) | |
| tree | c4d739f9b5fab1d39df1460b34d1317c1c26f611 | |
| parent | 17a2b9fb88f066d51c57d73ceb36b1a242bc4180 (diff) | |
| parent | 6b97003b5cfc8e318eb0cb789569d3604b3821f3 (diff) | |
| download | pyramid-b6d007065132ad313a0777eb89a71b6fbdc4bcdf.tar.gz pyramid-b6d007065132ad313a0777eb89a71b6fbdc4bcdf.tar.bz2 pyramid-b6d007065132ad313a0777eb89a71b6fbdc4bcdf.zip | |
Merge branch 'pull.1004'
| -rw-r--r-- | CHANGES.txt | 3 | ||||
| -rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
| -rw-r--r-- | pyramid/router.py | 2 | ||||
| -rw-r--r-- | pyramid/tests/test_router.py | 8 |
4 files changed, 8 insertions, 7 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 0156b24fd..2221f9945 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -101,7 +101,8 @@ Bug Fixes predicate mismatch error when trying to use GET or DELETE methods. Now the views are found and no predicate mismatch is raised. - See https://github.com/Pylons/pyramid/pull/786 + See https://github.com/Pylons/pyramid/pull/786 and + https://github.com/Pylons/pyramid/pull/1004 - Spaces and dots may now be in mako renderer template paths. This was broken when support for the new makodef syntax was added in 1.4a1. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 61155ca80..d2b116f46 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -200,3 +200,5 @@ Contributors - Jason McKellar, 2013/03/28 - Luke Cyca, 2013/05/30 + +- Laurence Rowe, 2013/04/24 diff --git a/pyramid/router.py b/pyramid/router.py index df1f02b22..3d2a2ff3e 100644 --- a/pyramid/router.py +++ b/pyramid/router.py @@ -164,7 +164,7 @@ class Router(object): except PredicateMismatch: # look for other views that meet the predicate # criteria - for iface in context_iface.flattened(): + for iface in context_iface.__sro__[1:]: view_callable = adapters.lookup( (IViewClassifier, request.request_iface, iface), IView, name=view_name, default=None) diff --git a/pyramid/tests/test_router.py b/pyramid/tests/test_router.py index 432959147..b836d7d72 100644 --- a/pyramid/tests/test_router.py +++ b/pyramid/tests/test_router.py @@ -1180,11 +1180,9 @@ class TestRouter(unittest.TestCase): from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRequest, IResponse from pyramid.response import Response - from zope.interface import Interface, implementer - class IContext(Interface): + class BaseContext: pass - @implementer(IContext) - class DummyContext: + class DummyContext(BaseContext): pass context = DummyContext() self._registerTraverserFactory(context) @@ -1193,7 +1191,7 @@ class TestRouter(unittest.TestCase): DummyContext) good_view = DummyView('abc') self._registerView(self.config.derive_view(good_view), - '', IViewClassifier, IRequest, IContext) + '', IViewClassifier, IRequest, BaseContext) router = self._makeOne() def make_response(s): return Response(s) |
