[Zope-Checkins] SVN: Products.Five/branches/publication-refactor2/browser/metaconfigure.py use zope.component instead of zope.app.zapi.
Log message for revision 67603: use zope.component instead of zope.app.zapi. Changed: U Products.Five/branches/publication-refactor2/browser/metaconfigure.py -=- Modified: Products.Five/branches/publication-refactor2/browser/metaconfigure.py === --- Products.Five/branches/publication-refactor2/browser/metaconfigure.py 2006-04-25 18:51:30 UTC (rev 67602) +++ Products.Five/branches/publication-refactor2/browser/metaconfigure.py 2006-04-25 19:10:08 UTC (rev 67603) @@ -20,7 +20,7 @@ import os -from zope.app import zapi +from zope import component from zope.interface import Interface from zope.configuration.exceptions import ConfigurationError from zope.publisher.interfaces.browser import IBrowserRequest, \ @@ -193,7 +193,8 @@ if name in pages: return getattr(self, pages[name]) -view = zapi.queryView(self, name, request) +view = component.queryMultiAdapter((self, request), name, + default = None) if view is not None: return view.__of__(self) @@ -206,7 +207,8 @@ if name in pages: return getattr(self, pages[name]) -view = zapi.queryView(self, name, request) +view = component.queryMultiAdapter((self, request), name, + default = None) if view is not None: return view.__of__(self) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/branches/easter-sprint_traversal-refactor/ create another Five branch to get Zope easter-sprint_traversal-refactor
Log message for revision 67604: create another Five branch to get Zope easter-sprint_traversal-refactor branch working. Changed: A Products.Five/branches/easter-sprint_traversal-refactor/ -=- Copied: Products.Five/branches/easter-sprint_traversal-refactor (from rev 67603, Products.Five/trunk) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py use queryMultiAdapter instead of queryView and do that __of__(parent)
Log message for revision 67605: use queryMultiAdapter instead of queryView and do that __of__(parent) acquisition stuff in order for security to work correctly in Zope2. Changed: U Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py -=- Modified: Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py === --- Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py 2006-04-25 19:26:25 UTC (rev 67604) +++ Products.Five/branches/easter-sprint_traversal-refactor/browser/metaconfigure.py 2006-04-25 19:33:52 UTC (rev 67605) @@ -20,6 +20,7 @@ import os +from zope import component from zope.interface import Interface from zope.configuration.exceptions import ConfigurationError from zope.publisher.interfaces.browser import IBrowserRequest, \ @@ -192,11 +193,12 @@ if name in pages: return getattr(self, pages[name]) -view = zapi.queryView(self, name, request) +view = component.queryMultiAdapter((self, request), name = name, + default = None) if view is not None: -return view +return view.__of__(self) -m = class_.publishTraverse.__get__(self) +m = class_.publishTraverse.__get__(self).__of__(self) return m(request, name) else: @@ -205,9 +207,10 @@ if name in pages: return getattr(self, pages[name]) -view = zapi.queryView(self, name, request) +view = component.queryMultiAdapter((self, request), name = name, + default = None) if view is not None: -return view +return view.__of__(self) raise NotFoundError(self, name, request) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/trunk/browser/metaconfigure.py I have fixed this bug 3 times in has many minutes, and just realised
Log message for revision 67607: I have fixed this bug 3 times in has many minutes, and just realised this fix should go on the trunk, has we are just going to get a nameerror if either the publishTraverse methods are called, since zapi hasn't been imported. Changed: U Products.Five/trunk/browser/metaconfigure.py -=- Modified: Products.Five/trunk/browser/metaconfigure.py === --- Products.Five/trunk/browser/metaconfigure.py2006-04-25 19:38:26 UTC (rev 67606) +++ Products.Five/trunk/browser/metaconfigure.py2006-04-25 19:42:27 UTC (rev 67607) @@ -20,6 +20,7 @@ import os +from zope import component from zope.interface import Interface from zope.configuration.exceptions import ConfigurationError from zope.publisher.interfaces.browser import IBrowserRequest, \ @@ -192,11 +193,12 @@ if name in pages: return getattr(self, pages[name]) -view = zapi.queryView(self, name, request) +view = component.queryMultiAdapter((self, request), name = name, + default = None) if view is not None: -return view +return view.__of__(self) -m = class_.publishTraverse.__get__(self) +m = class_.publishTraverse.__get__(self).__of__(self) return m(request, name) else: @@ -205,9 +207,10 @@ if name in pages: return getattr(self, pages[name]) -view = zapi.queryView(self, name, request) +view = component.queryMultiAdapter((self, request), name = name, + default = None) if view is not None: -return view +return view.__of__(self) raise NotFoundError(self, name, request) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/easter-sprint_traversal-refactor/lib/python/Products/ Use the trunk version of Five for now, since contains
Log message for revision 67608: Use the trunk version of Five for now, since contains a fix for traverse views. Changed: _U Zope/branches/easter-sprint_traversal-refactor/lib/python/Products/ -=- Property changes on: Zope/branches/easter-sprint_traversal-refactor/lib/python/Products ___ Name: svn:externals - Five svn://svn.zope.org/repos/main/Products.Five/tags/1.3.3 + Five svn://svn.zope.org/repos/main/Products.Five/trunk ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/branches/easter-sprint_traversal-refactor/ This branch isn't needed the fix is on the trunk.
Log message for revision 67609: This branch isn't needed the fix is on the trunk. Changed: D Products.Five/branches/easter-sprint_traversal-refactor/ -=- ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/publication-refactor/lib/python/ Refactor some of the Zope2 traversal. This includes using
Log message for revision 67219: Refactor some of the Zope2 traversal. This includes using IPublishTraverse to do the traversal, and using Zope3 to find the views. Changed: U Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml U Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py U Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py U Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py U Zope/branches/publication-refactor/lib/python/ZPublisher/Test.py -=- Modified: Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml === --- Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml 2006-04-21 14:18:10 UTC (rev 67218) +++ Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml 2006-04-21 14:20:05 UTC (rev 67219) @@ -60,4 +60,11 @@ provides=zope.publisher.interfaces.ITraversingRequest / + adapter + for=* + .interfaces.IZope2Request + provides=zope.publisher.interfaces.IPublishTraverse + factory=ZPublisher.Publication.Zope2PublishTraverseAdapter + / + /configure Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py === --- Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 2006-04-21 14:18:10 UTC (rev 67218) +++ Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 2006-04-21 14:20:05 UTC (rev 67219) @@ -230,16 +230,9 @@ if method=='GET' or method=='POST' and not isinstance(response, xmlrpc.Response): -# Probably a browser -no_acquire_flag=0 # index_html is still the default method, only any object can # override it by implementing its own __browser_default__ method method = 'index_html' -elif self.maybe_webdav_client: -# Probably a WebDAV client. -no_acquire_flag=1 -else: -no_acquire_flag=0 URL=request['URL'] parents = request['PARENTS'] @@ -315,7 +308,7 @@ try: subobject = self.publication.traverseName( -self, object, entry_name, no_acquire_flag) +self, object, entry_name) except NotFound: if debug_mode: return response.debugError( @@ -323,30 +316,6 @@ else: return response.notFoundError(URL) -# Ensure that the object has a docstring, or that the parent -# object has a pseudo-docstring for the object. Objects that -# have an empty or missing docstring are not published. -doc = getattr(subobject, '__doc__', None) -if doc is None: -doc = getattr(object, '%s__doc__' % entry_name, None) -if not doc: -return response.debugError( -The object at %s has an empty or missing \ -docstring. Objects must have a docstring to be \ -published. % URL -) - -# Hack for security: in Python 2.2.2, most built-in types -# gained docstrings that they didn't have before. That caused -# certain mutable types (dicts, lists) to become publishable -# when they shouldn't be. The following check makes sure that -# the right thing happens in both 2.2.2+ and earlier versions. - -if not typeCheck(subobject): -return response.debugError( -The object at %s is not publishable. % URL -) - roles = getRoles( object, (not got) and entry_name or None, subobject, roles) Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py === --- Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 2006-04-21 14:18:10 UTC (rev 67218) +++ Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 2006-04-21 14:20:05 UTC (rev 67219) @@ -16,9 +16,10 @@ import sys import transaction import types +import xmlrpc from zope.event import notify -from zope.component import queryUtility +from zope.component import queryUtility, queryMultiAdapter from zope.interface import implements from zope.publisher.interfaces import IRequest, IPublication from zope.publisher.interfaces import NotFound, IPublicationRequest @@ -30,12 +31,16 @@ from zope.app.publication.interfaces
[Zope-Checkins] SVN: Zope/branches/publication-refactor2/lib/python/ Finish committing changes from the publication-refactor branch.
Log message for revision 67238: Finish committing changes from the publication-refactor branch. Also fixed bug in the traversal when we were always getting unauthorized errors when trying to use Five views. This was because I had left out some code from the Five.traversable. Changed: _U Zope/branches/publication-refactor2/lib/python/ U Zope/branches/publication-refactor2/lib/python/ZPublisher/BaseRequest.py U Zope/branches/publication-refactor2/lib/python/ZPublisher/Publication.py U Zope/branches/publication-refactor2/lib/python/ZPublisher/Test.py U Zope/branches/publication-refactor2/lib/python/ZServer/HTTPResponse.py U Zope/branches/publication-refactor2/lib/python/Zope2/Startup/__init__.py U Zope/branches/publication-refactor2/lib/python/Zope2/Startup/handlers.py U Zope/branches/publication-refactor2/lib/python/Zope2/Startup/zopeschema.xml _U Zope/branches/publication-refactor2/lib/python/zope/ -=- Property changes on: Zope/branches/publication-refactor2/lib/python ___ Name: svn:externals - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 BTrees -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/BTrees persistent -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/persistent ThreadedAsync -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ThreadedAsync transaction-r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/transaction ZEO-r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZEO ZODB -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZODB ZopeUndo -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZopeUndo zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz -r 41215 svn://svn.zope.org/repos/main/Zope3/trunk/src/pytz zodbcode -r 41215 svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode ClientCookie -r 41215 svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientCookie mechanize -r 41215 svn://svn.zope.org/repos/main/Zope3/trunk/src/mechanize docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0 + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 BTrees -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/BTrees persistent -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/persistent ThreadedAsync -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ThreadedAsync transaction-r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/transaction ZEO-r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZEO ZODB -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZODB ZopeUndo -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZopeUndo zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz -r 41215 svn://svn.zope.org/repos/main/Zope3/trunk/src/pytz zodbcode -r 41215 svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode ClientCookie -r 41215 svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientCookie mechanize -r 41215 svn://svn.zope.org/repos/main/Zope3/trunk/src/mechanize docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0 twisted svn://svn.twistedmatrix.com/svn/Twisted/branches/releases/2.1.x/twisted Modified: Zope/branches/publication-refactor2/lib/python/ZPublisher/BaseRequest.py === --- Zope/branches/publication-refactor2/lib/python/ZPublisher/BaseRequest.py 2006-04-21 17:36:54 UTC (rev 67237) +++ Zope/branches/publication-refactor2/lib/python/ZPublisher/BaseRequest.py 2006-04-21 17:37:21 UTC (rev 67238) @@ -255,6 +255,10 @@ # Set the posttraverse for duration of the traversal here self._post_traverse = post_traverse = [] +# Con Zope 3 into using Zope 2's checkPermission +import Products.Five.security +Products.Five.security.newInteraction() + entry_name = '' try: # We build parents in the wrong order, so we Modified: Zope/branches/publication-refactor2/lib/python/ZPublisher/Publication.py === --- Zope/branches/publication-refactor2/lib/python/ZPublisher/Publication.py 2006-04-21 17:36:54 UTC (rev 67237) +++ Zope/branches/publication-refactor2/lib/python/ZPublisher/Publication.py 2006-04-21 17:37:21 UTC (rev 67238) @@ -251,7 +251,7 @@ except TraversalError: raise NotFound(ob, name) -return ob2 +return ob2.__of__(ob) if nm == '.': return ob @@ -360,12 +360,12 @@ # have an empty or missing docstring are not published. doc = getattr(subobject,
[Zope-Checkins] SVN: Products.Five/branches/publication-refactor2/ Create a branch for holding some changes in Five for
Log message for revision 67243: Create a branch for holding some changes in Five for the publication-refactor2 branch of Zope2. Changed: A Products.Five/branches/publication-refactor2/ -=- Copied: Products.Five/branches/publication-refactor2 (from rev 67242, Products.Five/trunk) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/publication-refactor2/lib/python/Products/ Link in branched version of Five.
Log message for revision 67245: Link in branched version of Five. Changed: _U Zope/branches/publication-refactor2/lib/python/Products/ -=- Property changes on: Zope/branches/publication-refactor2/lib/python/Products ___ Name: svn:externals - Five svn://svn.zope.org/repos/main/Products.Five/tags/1.3.3 + Five svn://svn.zope.org/repos/main/Products.Five/branches/publication-refactor2 ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/branches/publication-refactor2/ define Zope2 specific request traversal type and
Log message for revision 67247: define Zope2 specific request traversal type and configure the IPublisTraverse adapter in ZPublisher.Publication Changed: U Products.Five/branches/publication-refactor2/browser/metaconfigure.py U Products.Five/branches/publication-refactor2/configure.zcml U Products.Five/branches/publication-refactor2/interfaces.py -=- Modified: Products.Five/branches/publication-refactor2/browser/metaconfigure.py === --- Products.Five/branches/publication-refactor2/browser/metaconfigure.py 2006-04-21 18:10:19 UTC (rev 67246) +++ Products.Five/branches/publication-refactor2/browser/metaconfigure.py 2006-04-21 18:14:08 UTC (rev 67247) @@ -20,6 +20,7 @@ import os +from zope.app import zapi from zope.interface import Interface from zope.configuration.exceptions import ConfigurationError from zope.publisher.interfaces.browser import IBrowserRequest, \ Modified: Products.Five/branches/publication-refactor2/configure.zcml === --- Products.Five/branches/publication-refactor2/configure.zcml 2006-04-21 18:10:19 UTC (rev 67246) +++ Products.Five/branches/publication-refactor2/configure.zcml 2006-04-21 18:14:08 UTC (rev 67247) @@ -44,4 +44,20 @@ interface=zope.publisher.interfaces.browser.IBrowserRequest / + five:implements class=ZPublisher.HTTPRequest.HTTPRequest + interface=.interfaces.IZope2Request + / + adapter + for=.interfaces.IZope2Request + factory=ZPublisher.Publication.Zope3HTTPRequestTraverser + provides=zope.publisher.interfaces.ITraversingRequest + / + + adapter + for=* + .interfaces.IZope2Request + provides=zope.publisher.interfaces.IPublishTraverse + factory=ZPublisher.Publication.Zope2PublishTraverseAdapter + / + /configure Modified: Products.Five/branches/publication-refactor2/interfaces.py === --- Products.Five/branches/publication-refactor2/interfaces.py 2006-04-21 18:10:19 UTC (rev 67246) +++ Products.Five/branches/publication-refactor2/interfaces.py 2006-04-21 18:14:08 UTC (rev 67247) @@ -27,6 +27,10 @@ find the method to be published. +class IZope2Request(Interface): +Marks the Zope2 request +pass + class IMenuItemType(IInterface): Menu item type ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/branches/publication-refactor2/configure.zcml register the Zope2 request object with the zope3 publisher
Log message for revision 67251: register the Zope2 request object with the zope3 publisher Changed: U Products.Five/branches/publication-refactor2/configure.zcml -=- Modified: Products.Five/branches/publication-refactor2/configure.zcml === --- Products.Five/branches/publication-refactor2/configure.zcml 2006-04-21 18:42:37 UTC (rev 67250) +++ Products.Five/branches/publication-refactor2/configure.zcml 2006-04-21 18:57:50 UTC (rev 67251) @@ -16,6 +16,14 @@ include package=zope.app.event / include package=zope.app.traversing / + publisher + name=Zope2-HTTP + factory=ZPublisher.Publication.Zope2HTTPFactory + methods=* + mimetypes=* + priority=0 + / + !-- do 'traditional' traversing by default; needed by ZPT -- adapter for=* ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/branches/publication-refactor2/meta.zcml try loading the zope.app.publication meta file
Log message for revision 67252: try loading the zope.app.publication meta file Changed: U Products.Five/branches/publication-refactor2/meta.zcml -=- Modified: Products.Five/branches/publication-refactor2/meta.zcml === --- Products.Five/branches/publication-refactor2/meta.zcml 2006-04-21 18:57:50 UTC (rev 67251) +++ Products.Five/branches/publication-refactor2/meta.zcml 2006-04-21 19:00:51 UTC (rev 67252) @@ -195,4 +195,7 @@ !-- load the i18n:registerTranslations directive -- include package=zope.app.i18n file=meta.zcml / + !-- load the zope:publisher directive -- + include package=zope.app.publication file=meta.zcml / + /configure ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/branches/publication-refactor2/browser/metaconfigure.py All browser views, implement IPublishTraverse and has such
Log message for revision 67256: All browser views, implement IPublishTraverse and has such they must do the __of__(context) call on the returned object. Changed: U Products.Five/branches/publication-refactor2/browser/metaconfigure.py -=- Modified: Products.Five/branches/publication-refactor2/browser/metaconfigure.py === --- Products.Five/branches/publication-refactor2/browser/metaconfigure.py 2006-04-21 19:54:38 UTC (rev 67255) +++ Products.Five/branches/publication-refactor2/browser/metaconfigure.py 2006-04-21 20:05:25 UTC (rev 67256) @@ -195,10 +195,10 @@ return getattr(self, pages[name]) view = zapi.queryView(self, name, request) if view is not None: -return view +return view.__of__(self) m = class_.publishTraverse.__get__(self) -return m(request, name) +return m(request, name).__of__(self) else: def publishTraverse(self, request, name, @@ -208,7 +208,7 @@ return getattr(self, pages[name]) view = zapi.queryView(self, name, request) if view is not None: -return view +return view.__of__(self) raise NotFoundError(self, name, request) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/publication-refactor/lib/python/ZPublisher/ Replace the ZPublisher.Publish.publish method with the
Log message for revision 67177: Replace the ZPublisher.Publish.publish method with the Zope3 equivalent zope.publisher.publish. This way the publish_module_standard and similar are just wrappers around the Zope3 method that sets up the request correctly and performs some other stuff I don't quite follow. There is still a lot of work left, for example 11 tests are still failing but we can get back to these later. Changed: U Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py U Zope/branches/publication-refactor/lib/python/ZPublisher/BaseResponse.py U Zope/branches/publication-refactor/lib/python/ZPublisher/HTTPResponse.py U Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py U Zope/branches/publication-refactor/lib/python/ZPublisher/Publish.py U Zope/branches/publication-refactor/lib/python/ZPublisher/Test.py U Zope/branches/publication-refactor/lib/python/ZPublisher/tests/testPublish.py -=- Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py === --- Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 2006-04-20 15:19:17 UTC (rev 67176) +++ Zope/branches/publication-refactor/lib/python/ZPublisher/BaseRequest.py 2006-04-20 16:18:16 UTC (rev 67177) @@ -249,10 +249,6 @@ if not path and not method: return response.forbiddenError(self['URL']) -if self.publication.root is not object: -self.publication.root = object - -object = self.publication.getApplication(self) roles = getRoles(None, None, object, UNSPECIFIED_ROLES) parents.append(object) Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/BaseResponse.py === --- Zope/branches/publication-refactor/lib/python/ZPublisher/BaseResponse.py 2006-04-20 15:19:17 UTC (rev 67176) +++ Zope/branches/publication-refactor/lib/python/ZPublisher/BaseResponse.py 2006-04-20 16:18:16 UTC (rev 67177) @@ -54,6 +54,10 @@ Output the response body self.stdout.write(str(self)) +def setResult(self, result): +IResponse +self.setBody(result) + def setBody(self, body): self.body = body Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/HTTPResponse.py === --- Zope/branches/publication-refactor/lib/python/ZPublisher/HTTPResponse.py 2006-04-20 15:19:17 UTC (rev 67176) +++ Zope/branches/publication-refactor/lib/python/ZPublisher/HTTPResponse.py 2006-04-20 16:18:16 UTC (rev 67177) @@ -180,6 +180,10 @@ self.stdout = stdout self.stderr = stderr +def internalError(self): +'See IPublisherResponse' +self.setStatus(500, uThe engines can't take any more, Jim!) + def retry(self): Return a response object to be used in a retry attempt Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py === --- Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 2006-04-20 15:19:17 UTC (rev 67176) +++ Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 2006-04-20 16:18:16 UTC (rev 67177) @@ -15,12 +15,14 @@ import re import sys import transaction +import types from zope.event import notify from zope.component import queryUtility from zope.interface import implements from zope.publisher.interfaces import IRequest, IPublication from zope.publisher.interfaces import NotFound, IPublicationRequest +import zope.publisher.interfaces from zope.publisher.browser import BrowserRequest from zope.publisher.browser import BrowserResponse from zope.publisher.http import StrResult @@ -35,14 +37,42 @@ from ZPublisher.mapply import mapply from ZPublisher.BaseRequest import RequestContainer +from ZPublisher.HTTPRequest import HTTPRequest +from ZPublisher.HTTPResponse import HTTPResponse +from cStringIO import StringIO +import traceback +from zope.publisher.http import status_reasons, DirectResult +from zope.publisher.interfaces import IPublisherRequest +from zope import component + + _marker = object() +class Zope3HTTPRequestTraverser(object): +implements(IPublisherRequest) + +def __init__(self, request): +self.request = request + +def traverse(self, object): +path = self.request.get('PATH_INFO') +self.request['PARENTS'] = [object] + +return self.request.traverse(path, self.request.response, + self.request.publication.validated_hook) + +## XXX - Five declares that HTTPRequest implements IPublisherRequest +## but in fact it doesn't, the traverse method API is all wrong. +##
[Zope-Checkins] SVN: Zope/branches/publication-refactor/lib/python/zope/ update the externals on this branch in order to get
Log message for revision 67184: update the externals on this branch in order to get the small change to the zope.publisher.publish module. Changed: _U Zope/branches/publication-refactor/lib/python/zope/ -=- Property changes on: Zope/branches/publication-refactor/lib/python/zope ___ Name: svn:externals - app -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/app cachedescriptors -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/cachedescriptors component-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/component configuration-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/configuration documenttemplate -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/documenttemplate event-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/event exceptions -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/exceptions hookable -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/hookable i18n -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18n i18nmessageid-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18nmessageid interface-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/interface modulealias -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/modulealias pagetemplate -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/pagetemplate proxy-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/proxy publisher-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/publisher schema -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/schema security -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/security server -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/server structuredtext -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/structuredtext tal -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tal tales-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tales testing -r 39830 svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing thread -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/thread deprecation -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/deprecation dottedname -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/dottedname formlib -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/formlib index-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/index testbrowser -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/testbrowser + app -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/app cachedescriptors -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/cachedescriptors component-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/component configuration-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/configuration documenttemplate -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/documenttemplate event-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/event exceptions -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/exceptions hookable -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/hookable i18n -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18n i18nmessageid-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18nmessageid interface-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/interface modulealias -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/modulealias pagetemplate -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/pagetemplate proxy-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/proxy publisher svn://svn.zope.org/repos/main/Zope3/branches/publication-refactor2/src/zope/publisher schema -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/schema security -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/security server -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/server structuredtext -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/structuredtext tal -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tal tales-r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tales testing -r 39830 svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing thread -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/thread deprecation -r 40688 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/deprecation dottedname -r
[Zope-Checkins] SVN: Zope/branches/easter-sprint_twistedserver/ create new branch to contain the integration with the
Log message for revision 67143: create new branch to contain the integration with the Twisted server. Changed: A Zope/branches/easter-sprint_twistedserver/ -=- Copied: Zope/branches/easter-sprint_twistedserver (from rev 67142, Zope/trunk) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/publication-refactor/lib/python/ZServer/HTTPResponse.py return the response from the setBody method. This is what the handleException
Log message for revision 67152: return the response from the setBody method. This is what the handleException method expects to happen, and what setBody does if we return a stream. Changed: U Zope/branches/publication-refactor/lib/python/ZServer/HTTPResponse.py -=- Modified: Zope/branches/publication-refactor/lib/python/ZServer/HTTPResponse.py === --- Zope/branches/publication-refactor/lib/python/ZServer/HTTPResponse.py 2006-04-19 17:27:04 UTC (rev 67151) +++ Zope/branches/publication-refactor/lib/python/ZServer/HTTPResponse.py 2006-04-19 17:28:54 UTC (rev 67152) @@ -251,6 +251,7 @@ return self else: HTTPResponse.setBody(self, body, title, is_error, **kw) +return self class ChannelPipe: Experimental pipe from ZPublisher to a ZServer Channel. ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/easter-sprint_twistedserver/ We will use the publication_refactor branch for this work instead:
Log message for revision 67155: We will use the publication_refactor branch for this work instead: Changed: D Zope/branches/easter-sprint_twistedserver/ -=- ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
Re: [Zope3-dev] Re: [Zope-dev] Two visions
On Wednesday 01 March 2006 14:32, Sidnei da Silva wrote: On Wed, Mar 01, 2006 at 09:29:05AM -0500, Stephan Richter wrote: | On Wednesday 01 March 2006 09:24, Sidnei da Silva wrote: | | Except that Michael Kerrins recent WebDAV work will shaddow Zope 2's | | support. If I understand his improved implementation correctly, then | | it is very, very cool! | | Did you run the litmus tests against it? :) | | I don't know what that is, of course. :-) I think talking to Michael is | the better choice here. :-) First hit: http://www.google.com/search?q=webdav+litmus+tests What you think about turning those into functional doctests? Never seen that before - found a bunch of bugs with it too :-) Thanks for the link Michael -- Michael Kerrin 55 Fitzwilliam Sq., Dublin 2. Tel: 087 688 3894 ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )