summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--repoze/bfg/interfaces.py6
-rw-r--r--repoze/bfg/request.py4
-rw-r--r--repoze/bfg/tests/test_request.py4
3 files changed, 4 insertions, 10 deletions
diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py
index 582e8984d..d7963ef22 100644
--- a/repoze/bfg/interfaces.py
+++ b/repoze/bfg/interfaces.py
@@ -6,9 +6,9 @@ from zope.component.interfaces import IObjectEvent
class IRequest(Interface):
""" Request type interface attached to all request objects """
-class IRouteRequest(IRequest):
- """ *internal only* interface used to mark a request when a route
- matches. Not an API."""
+class IRouteRequest(Interface):
+ """ *internal only* interface used as in a utility lookup to find
+ route-specific interfaces. Not an API."""
class IResponseFactory(Interface):
""" A utility which generates a response factory """
diff --git a/repoze/bfg/request.py b/repoze/bfg/request.py
index 07151b512..d25e93ef0 100644
--- a/repoze/bfg/request.py
+++ b/repoze/bfg/request.py
@@ -1,12 +1,10 @@
from zope.deprecation import deprecated
from zope.interface import implements
from zope.interface.interface import InterfaceClass
-from zope.interface.interface import Interface
from webob import Request as WebobRequest
from repoze.bfg.interfaces import IRequest
-from repoze.bfg.interfaces import IRouteRequest
def make_request_ascii(event):
""" An event handler that causes the request charset to be ASCII;
@@ -80,7 +78,7 @@ class Request(WebobRequest):
return self.environ.values()
def route_request_iface(name):
- return InterfaceClass('%s_IRequest' % name, (IRouteRequest,))
+ return InterfaceClass('%s_IRequest' % name)
def add_global_response_headers(request, headerlist):
attrs = request.__dict__
diff --git a/repoze/bfg/tests/test_request.py b/repoze/bfg/tests/test_request.py
index 7d9e956ae..a10ba1a75 100644
--- a/repoze/bfg/tests/test_request.py
+++ b/repoze/bfg/tests/test_request.py
@@ -150,11 +150,7 @@ class Test_route_request_iface(unittest.TestCase):
return route_request_iface(name)
def test_it(self):
- from repoze.bfg.interfaces import IRouteRequest
- from repoze.bfg.interfaces import IRequest
iface = self._callFUT('routename')
- self.failUnless(iface.extends(IRouteRequest))
- self.failUnless(iface.extends(IRequest))
self.assertEqual(iface.__name__, 'routename_IRequest')
class Test_add_global_response_headers(unittest.TestCase):