From eca67ac2005bcac3b8d14d051e5e800ea36f42a8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 20 Jan 2009 19:55:54 +0000 Subject: # We use 'precooked' Request subclasses that correspond to HTTP # request methods within ``router.py`` when constructing a request # object rather than using ``alsoProvides`` to attach the proper # interface to an unsubclassed webob.Request. This pattern is purely # an optimization (e.g. preventing calls to ``alsoProvides`` means the # difference between 590 r/s and 690 r/s on a MacBook 2GHz). --- repoze/bfg/interfaces.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'repoze/bfg/interfaces.py') diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 567fb6d33..58a0e3257 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -1,9 +1,14 @@ -from zope.interface import Interface from zope.interface import Attribute +from zope.interface import Interface +from zope.interface import implements + from zope.deferredimport import deprecated from zope.component.interfaces import IObjectEvent +from webob import Request as WebobRequest + + deprecated( '(repoze.bfg.interfaces.ITemplate should now be imported ' 'as repoze.bfg.interfaces.ITemplateRenderer)', @@ -179,14 +184,6 @@ class ILocation(Interface): class ILogger(Interface): """ Interface representing a PEP 282 logger """ -HTTP_METHOD_INTERFACES = { - 'GET':IGETRequest, - 'POST':IPOSTRequest, - 'PUT':IPUTRequest, - 'DELETE':IDELETERequest, - 'HEAD':IHEADRequest, - } - class IRoutesMapper(Interface): """ Interface representing a Routes ``Mapper`` object """ -- cgit v1.2.3