[Checkins] SVN: zope.app.publication/trunk/ Moved IHTTPException to zope.publisher, removing the dependency
Shane Hathaway
shane at hathawaymix.org
Fri May 22 23:03:53 EDT 2009
Log message for revision 100275:
Moved IHTTPException to zope.publisher, removing the dependency
on zope.app.http.
Changed:
U zope.app.publication/trunk/CHANGES.txt
U zope.app.publication/trunk/setup.py
U zope.app.publication/trunk/src/zope/app/publication/http.py
U zope.app.publication/trunk/src/zope/app/publication/zopepublication.py
-=-
Modified: zope.app.publication/trunk/CHANGES.txt
===================================================================
--- zope.app.publication/trunk/CHANGES.txt 2009-05-23 02:59:08 UTC (rev 100274)
+++ zope.app.publication/trunk/CHANGES.txt 2009-05-23 03:03:53 UTC (rev 100275)
@@ -9,6 +9,8 @@
zope.app.publisher -> zope.app.publication dependency (which was a
cycle).
+- Moved IHTTPException to zope.publisher, removing the dependency
+ on zope.app.http.
3.6.0 (2009-05-18)
------------------
Modified: zope.app.publication/trunk/setup.py
===================================================================
--- zope.app.publication/trunk/setup.py 2009-05-23 02:59:08 UTC (rev 100274)
+++ zope.app.publication/trunk/setup.py 2009-05-23 03:03:53 UTC (rev 100275)
@@ -61,13 +61,12 @@
'ZODB3',
'zope.authentication',
'zope.component',
+ 'zope.deferredimport',
'zope.error',
'zope.i18n',
- 'zope.traversing',
- 'zope.app.http',
'zope.app.applicationcontrol',
'zope.browser>=1.2',
- 'zope.publisher',
+ 'zope.publisher>=3.8.0',
'zope.traversing>=3.7.0',
'zope.app.publisher',
'setuptools',
Modified: zope.app.publication/trunk/src/zope/app/publication/http.py
===================================================================
--- zope.app.publication/trunk/src/zope/app/publication/http.py 2009-05-23 02:59:08 UTC (rev 100274)
+++ zope.app.publication/trunk/src/zope/app/publication/http.py 2009-05-23 03:03:53 UTC (rev 100275)
@@ -18,37 +18,24 @@
__docformat__ = 'restructuredtext'
+from zope.interface import Attribute
+from zope.interface import implements
+from zope.publisher.interfaces.http import IHTTPException
+from zope.publisher.interfaces.http import MethodNotAllowed
from zope.publisher.publish import mapply
-
import zope.component
+import zope.deferredimport
-from zope.interface import implements, Attribute
-from zope.interface.common.interfaces import IException
-from zope.app.http.interfaces import IHTTPException
from zope.app.publication.zopepublication import ZopePublication
+zope.deferredimport.deprecatedFrom(
+ "This import has moved to zope.publisher.interfaces.http. "
+ "This import will stop working in the future.",
+ 'zope.publisher.interfaces.http',
+ 'IMethodNotAllowed',
+ )
-class IMethodNotAllowed(IException):
- """An exception that signals the 405 Method Not Allowed HTTP error"""
- object = Attribute("""The object on which the error occurred""")
-
- request = Attribute("""The request in which the error occurred""")
-
-
-class MethodNotAllowed(Exception):
- """An exception that signals the 405 Method Not Allowed HTTP error"""
-
- implements(IMethodNotAllowed)
-
- def __init__(self, object, request):
- self.object = object
- self.request = request
-
- def __str__(self):
- return "%r, %r" % (self.object, self.request)
-
-
class BaseHTTPPublication(ZopePublication):
"""Base for HTTP-based protocol publications"""
@@ -61,7 +48,7 @@
class HTTPPublication(BaseHTTPPublication):
- """HTTP-specific publication"""
+ """Non-browser HTTP publication"""
def callObject(self, request, ob):
# Exception handling, dont try to call request.method
Modified: zope.app.publication/trunk/src/zope/app/publication/zopepublication.py
===================================================================
--- zope.app.publication/trunk/src/zope/app/publication/zopepublication.py 2009-05-23 02:59:08 UTC (rev 100274)
+++ zope.app.publication/trunk/src/zope/app/publication/zopepublication.py 2009-05-23 03:03:53 UTC (rev 100275)
@@ -44,7 +44,7 @@
from zope.browser.interfaces import ISystemErrorView
from zope.app.publication.interfaces import BeforeTraverseEvent
from zope.app.publication.interfaces import EndRequestEvent
-from zope.app.publication.publicationtraverse import PublicationTraverse
+from zope.traversing.publicationtraverse import PublicationTraverse
from zope.app.publisher.browser import queryDefaultViewName
from zope.authentication.interfaces import IUnauthenticatedPrincipal
from zope.authentication.interfaces import IFallbackUnauthenticatedPrincipal
More information about the Checkins
mailing list