[Zope-Checkins] SVN: Zope/branches/publication-refactor/lib/python/ Using a new ITraversalRequest adapter to adapt the Zope2 requests.traversal method to
Log message for revision 67200: Using a new ITraversalRequest adapter to adapt the Zope2 requests.traversal method to the Zope3 version. Changed: U Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml U Zope/branches/publication-refactor/lib/python/Products/Five/interfaces.py U Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.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 09:38:13 UTC (rev 67199) +++ Zope/branches/publication-refactor/lib/python/Products/Five/configure.zcml 2006-04-21 09:51:55 UTC (rev 67200) @@ -50,5 +50,14 @@ five:implements class=ZPublisher.HTTPRequest.HTTPRequest 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 + / /configure Modified: Zope/branches/publication-refactor/lib/python/Products/Five/interfaces.py === --- Zope/branches/publication-refactor/lib/python/Products/Five/interfaces.py 2006-04-21 09:38:13 UTC (rev 67199) +++ Zope/branches/publication-refactor/lib/python/Products/Five/interfaces.py 2006-04-21 09:51:55 UTC (rev 67200) @@ -27,6 +27,10 @@ find the method to be published. +class IZope2Request(Interface): +Marks the Zope2 request +pass + class IMenuItemType(IInterface): Menu item type Modified: Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py === --- Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 2006-04-21 09:38:13 UTC (rev 67199) +++ Zope/branches/publication-refactor/lib/python/ZPublisher/Publication.py 2006-04-21 09:51:55 UTC (rev 67200) @@ -49,7 +49,7 @@ _marker = object() class Zope3HTTPRequestTraverser(object): -implements(IPublisherRequest) +implements(zope.publisher.interfaces.ITraversingRequest) def __init__(self, request): self.request = request @@ -61,12 +61,7 @@ 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. -## component.provideAdapter(Zope3HTTPRequestTraverser, (HTTPRequest,), -## IPublisherRequest) - class ZopePublication(object): Base Zope2 publication specification. @@ -229,7 +224,8 @@ sys.exc_info()[2], ) except: -return request.response.exception() +request.response.exception() +return request.response finally: self._abort() ___ 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: Zope/trunk/lib/python/Products/PageTemplates/ A new test and a new fix.
Log message for revision 67246: A new test and a new fix. Changed: U Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py U Zope/trunk/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py -=- Modified: Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py === --- Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py 2006-04-21 18:04:43 UTC (rev 67245) +++ Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py 2006-04-21 18:10:19 UTC (rev 67246) @@ -134,6 +134,14 @@ self.ZBindings_edit(self._default_bindings) self.pt_edit(text, content_type, encoding) +def pt_render(self, namespace, source=False, sourceAnnotations=False, + showtal=False): +if namespace is None: +namespace = self.pt_getContext() +return super(ZopePageTemplate, self).pt_render(namespace, source, sourceAnnotations, + showtal) + + def pt_getEngine(self): return getEngine() Modified: Zope/trunk/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py === --- Zope/trunk/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py 2006-04-21 18:04:43 UTC (rev 67245) +++ Zope/trunk/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py 2006-04-21 18:10:19 UTC (rev 67246) @@ -94,6 +94,12 @@ pt = self.app.pt1 self.assertEqual(pt(), self.result) +def testPtErrors(self): +request = self.app.REQUEST +self._addPT('pt1', text=self.text, REQUEST=request) +pt = self.app.pt1 +pt.pt_render(None, source=1) +self.assertEqual(pt.pt_errors(None), None) class DummyFileUpload: ___ 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
Re: [Zope-dev] Re: Zope 2.9.3 release
On 4/20/06, Dieter Maurer [EMAIL PROTECTED] wrote: Tres Seaver wrote at 2006-4-19 15:30 -0400: ... Is Alec's traversal patch or Dieter's alternative being considered? I'll note that I have a client who can't move forward from 2.9.1 to 2.9.3 because the changes to traversal semantics in that release break every view lookup in the application (which was originally built on 2.8.x, and works fine on 2.9.1. I would like to stress that my alternative does not change traversal semantics but provides a way for knowing component's __bobo_traverse__ to tell the enclosing framework that __bobo_traverse__ wants to use the default (and not do anything special). Nothing is changed until a given component uses the feature. And I'll stress that my change doesn't change traversal behavior either for any case that didn't emit and Unauthorized error previously. It is also completely compatible with Dieter's proposal, which is worthwhile because it could allow many existing __bobo_traverse__ methods to be greatly simplified. I've applied my patch to 2.8, 2.9, and trunk because a Zope release appears to be imminent, and there's no way we can release a new Plone until we have a Zope/Five which can handle acquisition properly (I'm pretty sure that this will bite other projects as well). Alec ___ 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 )
Re: [Zope-dev] Traversal issue which affects Five
--On 20. April 2006 20:29:30 +0200 Dieter Maurer [EMAIL PROTECTED] wrote: Up to you to decide whether we may break the general rule (no new features in micro releases) for features of this kind. We've always included minor features that aren't obviously critical micro release. The general rule basically applies applies to really new features. If this patch is acceptable and useful for everyone affected (Alec?). Since I am not directly (or no more) affected by this issue others should vote for or against this change. So we're more pragmatic than pedantic. Andreas -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope Plone development, Consulting pgpHOwytdeMXN.pgp Description: PGP signature ___ 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 )
Re: [Zope-dev] Traversal issue which affects Five
It would be very nice if we could get a list of use cases and expected behaviour, as I hope to refactor the Zope2 traversal in the near future and get rid of five:traversable completely. To do this without making everybody angry, I need usescases so I can make sure it works. :) ___ 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 )
Re: [Zope-dev] Traversal issue which affects Five
Andreas Jung wrote: --On 20. April 2006 20:29:30 +0200 Dieter Maurer [EMAIL PROTECTED] wrote: Up to you to decide whether we may break the general rule (no new features in micro releases) for features of this kind. We've always included minor features that aren't obviously critical micro release. The general rule basically applies applies to really new features. If this patch is acceptable and useful for everyone affected (Alec?). I don't have time to comment on the specific issue. In general, I think that new features in bug-fix releases are a bad idea. Of course, the line between bug-fix and feature is not always crisp. Something that is really a new feature should wait for a feature release. Note that the next feature release should happen in a couple of months. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ 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 )
Re: [Zope-dev] Traversal issue which affects Five
--On 21. April 2006 07:09:45 -0400 Jim Fulton [EMAIL PROTECTED] wrote: In general, I think that new features in bug-fix releases are a bad idea. Of course, the line between bug-fix and feature is not always crisp. Something that is really a new feature should wait for a feature release. Sure, in this particular case the issue is bug for Alec and Philipp, others consider it a feature :-) A behavior introduced because by some implementation bug is likely to be considered as a bug (this justifies the change in Five 1.3.3) Andreas pgpTlCCX6KjWm.pgp Description: PGP signature ___ 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 )
[Zope-dev] Reminder: Feature Freeze May 1
Don't forget that the feature freeze for the June release is May 1! That is only 10 days away! New features should be check in in a *stable* form by then. While we won't necessarily do a beta release then, anything checked in for the new release must be ready for a beta release when it is checked into the trunk. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ 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 )
Re: [Zope-dev] Traversal issue which affects Five
On 4/21/06, Andreas Jung [EMAIL PROTECTED] wrote: --On 21. April 2006 07:09:45 -0400 Jim Fulton [EMAIL PROTECTED] wrote: In general, I think that new features in bug-fix releases are a bad idea. Of course, the line between bug-fix and feature is not always crisp. Something that is really a new feature should wait for a feature release. Sure, in this particular case the issue is bug for Alec and Philipp, others consider it a feature :-) A behavior introduced because by some implementation bug is likely to be considered as a bug (this justifies the change in Five 1.3.3) Perhaps it's just my perspective here, but I think it's a stretch to describe the fix I've committed as a feature. Before the fix, when a __bobo_traverse__ method returned an object obtained via acquisition it was treated very differently than an object returned by normal traversal, and when that object had an acquisition wrapper everything works (there is very explicit code and tests that ensure this), however if the object returned has no Acquisition wrapper (because it is a method, string, etc) then a very cryptic Unauthorized error is raised (Container None has no security assertions). It's hard for me to see this as anything but a bug, and the fact that it causes serious problems for anyone who wants to use attribute acquisition with Five makes it a rather serious one. Dieter's proposed fix introduces feature (which I think is the source of this bug/feature confusion). Though as he says, it is one which has close to no consequences because it has no effect until product developers (Five included) take advantage of it by raising a new exception from their __bobo_traverse__ methods. Even in that case, the implementation of the feature should be somewhat tirvial and unlikely to be error prone. Nonetheless, the two proposals serve somewhat different purpooses, though Dieter's new feature could easily be used to allow products to circumvent the above bug and simplify existing product code. Alec ___ 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 )
[Zope-dev] Trunk seems broken
Everytime I try to view a page template I get Exception Value Context instance has no attribute 'getValue' Traceback (innermost last): * Module ZPublisher.Publish, line 115, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 41, in call_object * Module Shared.DC.Scripts.Bindings, line 313, in __call__ * Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec * Module Products.PageTemplates.ZopePageTemplate, line 291, in _exec * Module zope.pagetemplate.pagetemplate, line 117, in pt_render Warning: Macro expansion failed Warning: exceptions.AttributeError: Context instance has no attribute 'getValue' * Module zope.tal.talinterpreter, line 277, in __call__ * Module zope.tal.talinterpreter, line 352, in interpret * Module zope.tal.talinterpreter, line 902, in do_useMacro AttributeError: Context instance has no attribute 'getValue' the offending line is outer = self.engine.getValue('macroname') and self.engine is a Products.PageTemplates.TALES.Context instance In Zope2, as far as I can see, neither engines or contexts has a getValue method. Should we really use Zope TALES with Zope3 page templates? -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ 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 )
[Zope-dev] Re: 64-bit BTrees
On 4/13/06, Fred Drake [EMAIL PROTECTED] wrote: I've created a feature development branch for this, and checked in my initial implementation. I've made another branch for this, with a different twist. I'm not sure it'll be interesting, but I think it'll solve my immediate need until I can get around to reasonable testing of the performance implications. The fdrake-optional-64bits branch will compile using the C int type for I keys and values by default, and using the PY_LONG_LONG type if ZODB_64BIT_INTS is defined. This allows 64-bit BTrees by building ZODB like this: python setup.py build_ext -D ZODB_64BIT_INTS build BTrees.IIBTree.using64bits will be True if ZODB_64BIT_INTS is used. -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Don't let schooling interfere with your education. -- Mark Twain ___ 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 )
Re: [Zope-dev] Trunk seems broken
--On 21. April 2006 17:25:46 +0200 Lennart Regebro [EMAIL PROTECTED] wrote: outer = self.engine.getValue('macroname') and self.engine is a Products.PageTemplates.TALES.Context instance In Zope2, as far as I can see, neither engines or contexts has a getValue method. Should we really use Zope TALES with Zope3 page templates? My ajung-final-zpt-integration branch contains a version that does no longer require the Zope 2 TALES implementation (but uses the Zope 3 codebase)...but this branch needs some more work for 2.10. Andreas -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope Plone development, Consulting pgpmbYi4TmEn1.pgp Description: PGP signature ___ 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 )
Re: [Zope-dev] Trunk seems broken
On 4/21/06, Andreas Jung [EMAIL PROTECTED] wrote: My ajung-final-zpt-integration branch contains a version that does no longer require the Zope 2 TALES implementation (but uses the Zope 3 codebase)...but this branch needs some more work for 2.10. That would probably be good. Currently you can't do any thing with macros in trunk, so we need either that, or revert the pagetemplate changes that has been done. And that would be uncool. :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ 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 )
Re: [Zope-dev] Trunk seems broken
--On 21. April 2006 18:08:38 +0200 Lennart Regebro [EMAIL PROTECTED] wrote: On 4/21/06, Andreas Jung [EMAIL PROTECTED] wrote: My ajung-final-zpt-integration branch contains a version that does no longer require the Zope 2 TALES implementation (but uses the Zope 3 codebase)...but this branch needs some more work for 2.10. That would probably be good. Currently you can't do any thing with macros in trunk, so we need either that, or revert the pagetemplate changes that has been done. And that would be uncool. :) -- I'll try to resolve the outstanding issues on my branch this weekend end. Reverting the changes would not be the problem since this represents an older state. I was not aware of the fact that macros did not work. Obviously we don't have any unittests for this ZPT part :-/ -aj -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope Plone development, Consulting pgpxHa0Wj8kH4.pgp Description: PGP signature ___ 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 )
Re: [Zope-dev] Trunk seems broken
On 4/21/06, Andreas Jung [EMAIL PROTECTED] wrote: I'll try to resolve the outstanding issues on my branch this weekend end. Reverting the changes would not be the problem since this represents an older state. I was not aware of the fact that macros did not work. Obviously we don't have any unittests for this ZPT part :-/ No, I couldn't find any. I just checked in a very trivial (and currently failing) test that runs on on 2.9.2. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ 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 )
RE : [Zope] zope 2.8.5 becomes unresponsive.
-Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Paul Winkler Envoyé : jeudi 20 avril 2006 15:30 À : zope@zope.org Objet : Re: [Zope] zope 2.8.5 becomes unresponsive. On Thu, Apr 20, 2006 at 05:58:29AM -0700, Erik Myllymaki wrote: Environment is RHEL 3, Zope v2.8.5 (Python 2.3.5). Every couple of days the zope instance will become unresponsive and require a restart. ZMI is inaccessible at these times so I have to do run service my_zope_service restart in the usual redhat way. There is nothing in the logs, and if I do service y_zope_service status I am told program running; pid=22671 This is a service under very light load. I viewed the chanelog for v2.8.6 and didn't see any changes that address this, and for various reasons I do not want to move into the v2.9.x builds. Any guidance appreciated. google for two things: zope deadlock debugger debug spinning zope -- Hello, I've read documentation about deadlock and apparently the CPU usage should be high, isn't it ? Because in my case the CPU usage is falling to 0.0 (while the python process is still alive). Sebastien ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] REQUEST.form variables order
On Thursday 20 April 2006 20:11, Dieter Maurer wrote: Gaute Amundsen wrote at 2006-4-19 19:03 +0200: I want to retrieve the form fields in the order that they where submitted in the http POST. I know this has been brought up before, and that the answer is You cant. You might be able to do it. Try REQUEST['BODY']. For a POST request, it should contain the entity content. Of course, you would have to decode it yourself ;-) What? It can't be that simple! I thougt I had been poking all around the corners of REQUEST, looking for just somthing like that. Hm.. no. Error Type: KeyError Error Value: 'BODY' Are you sure about this? In that case, any idea why it is missing? We are on Zope 2.7.5-1.fc3, python 2.3.4, behind Apache/2.0.52 Gaute ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Permissions, files and folders
Ah! Thanx! DocFinder will shore come very useful in time =) Btw, what editor would you recommend for writing python outside Zope. I've frequently used Eclipse with PyDev before, but it's a bit slow and heavy. I've looked around a bit on the free editors without finding anything I like so I'm thinking it might be worth trying a commercial editor. What do you guys use? /ErikOn 4/20/06, Stefan H. Holek [EMAIL PROTECTED] wrote: I recommend to install DocFinderTab. And there is something at http://api.plone.org/ for those who like such things ;-)StefanOn 18. Apr 2006, at 13:21, Erik Billing wrote: Is there any complete api reference avalible?--Anything that happens, happens.--Douglas Adams ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Documentation and Books
The Plone version which I was speaking about, at http://www.plope.com/Books/2_7Edition, is version 2.7 and is as far as I've seen the same as v. 2.7 at zope.org, except for the reader comments of course. The book may of course have bin updated consciously but left the comments from 2002, for example in the "Extending zope" chapter, intact. Anyway, it doesn't really matter, my point was just that it doesn't look that good. /ErikOn 4/20/06, Dieter Maurer [EMAIL PROTECTED] wrote: Erik Billing wrote at 2006-4-19 23:04 +0200:Yes, the developers guide I've seen, and the Zope Book of course, they areboth pretty good I guess, but certainly the Zope book seams pretty outdatedif you ask me. You must look at the 2.7 edition of the Zope book (online).--Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Documentation and Books
On 4/21/06, Erik Billing [EMAIL PROTECTED] wrote: The Plone version which I was speaking about, at http://www.plope.com/Books/2_7Edition, is version 2.7 and is as far as I've seen the same as v. 2.7 at zope.org, except for the reader comments of course. The book may of course have bin updated consciously but left the comments from 2002, for example in the Extending zope chapter, intact. Anyway, it doesn't really matter, my point was just that it doesn't look that good. /Erik let's fix that. afaik, the development was done and stalled after some time, for the lack of time, resources, etc. if others would like to help, i'm sure Chris M will gladly accept. get the files, edit, extend, add, etc and send to chris for inclusion. also, another notable book is dieters zope book. google for it hth On 4/20/06, Dieter Maurer [EMAIL PROTECTED] wrote: Erik Billing wrote at 2006-4-19 23:04 +0200:Yes, the developers guide I've seen, and the Zope Book of course, they areboth pretty good I guess, but certainly the Zope book seams pretty outdatedif you ask me. You must look at the 2.7 edition of the Zope book (online).--Dieter -- http://myzope.kedai.com.my - my-zope org ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Permissions, files and folders
Erik Billing schrieb: Ah! Thanx! DocFinder will shore come very useful in time =) Btw, what editor would you recommend for writing python outside Zope. I've frequently used Eclipse with PyDev before, but it's a bit slow and heavy. I've looked around a bit on the free editors without finding anything I like so I'm thinking it might be worth trying a commercial editor. What do you guys use? Linux/KDE: kate and/or eric3 (nice because of seamless sftp/webdav) Linux: vim, some will use (x)emacs, pida Windows: hm. I've used the ide that comes with the win32 extensions from Marc Hammond. You bend some paths and get nice module view and hinting for zope classes too. Regards Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: RE : [Zope] zope 2.8.5 becomes unresponsive.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21 Apr 2006, at 07:52, Sébastien VINOT wrote: I've read documentation about deadlock and apparently the CPU usage should be high, isn't it ? Because in my case the CPU usage is falling to 0.0 (while the python process is still alive). No. Deadlocks cannot be identified by CPU usage. If Zope hangs, there is a deadlock. Use the diagnostic methods described in the documents you looked up. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFESJ2iRAx5nvEhZLIRAiQ7AKCdWKcS8d0nh80djOdVNkrtGFzsRACgssng JNnz286zi8qJMFI4CgQe0iI= =27JP -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Permissions, files and folders
On Friday 21 April 2006 10:15, Tino Wildenhain wrote: Erik Billing schrieb: Ah! Thanx! DocFinder will shore come very useful in time =) Btw, what editor would you recommend for writing python outside Zope. I've frequently used Eclipse with PyDev before, but it's a bit slow and heavy. I've looked around a bit on the free editors without finding anything I like so I'm thinking it might be worth trying a commercial editor. What do you guys use? Linux/KDE: kate and/or eric3 (nice because of seamless sftp/webdav) Linux: vim, some will use (x)emacs, pida Windows: hm. I've used the ide that comes with the win32 extensions from Marc Hammond. You bend some paths and get nice module view and hinting for zope classes too. I've used WingIDE a bit lately and am quite impressed by its feature set: * Good editor: Syntax coloring, folding, autocompletion, ... * Auto-lookup of documentation * Visual Debugger: watches, breakpoints, lots of goodies * Code / Class browser * Zope support Last but not least: great support staff. It uses quite a bit of resources though. Review of Python IDEs: http://spyced.blogspot.com/2005/09/review-of-6-python-ides.html peter. Regards Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: REQUEST.form variables order
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gaute Amundsen wrote: On Thursday 20 April 2006 20:11, Dieter Maurer wrote: Gaute Amundsen wrote at 2006-4-19 19:03 +0200: I want to retrieve the form fields in the order that they where submitted in the http POST. I know this has been brought up before, and that the answer is You cant. You might be able to do it. Try REQUEST['BODY']. For a POST request, it should contain the entity content. Of course, you would have to decode it yourself ;-) What? It can't be that simple! I thougt I had been poking all around the corners of REQUEST, looking for just somthing like that. Hm.. no. Error Type: KeyError Error Value: 'BODY' Are you sure about this? In that case, any idea why it is missing? We are on Zope 2.7.5-1.fc3, python 2.3.4, behind Apache/2.0.52 REQUEST.stdin is the actual stream (either a tempfile or a StringIO). You will likely need to rewind it before you can use it. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFESMPV+gerLs4ltQ4RApq9AJ9viWbzERyQJyVzRnL3PXjvtYT5EgCgwm1R 3lLPwcN8DiHBocoIPQDJUBQ= =hZ5X -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: REQUEST.form variables order
On Friday 21 April 2006 13:36, Tres Seaver wrote: snip REQUEST.stdin is the actual stream (either a tempfile or a StringIO). You will likely need to rewind it before you can use it. That seems to work YES. with cgi.parse_qsl I'm practically done already. Only some unicode troubles with norwegian charcters to iron out. Thanks :-D Gaute ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Permissions, files and folders
On Fri, Apr 21, 2006 at 09:54:15AM +0200, Erik Billing wrote: Btw, what editor would you recommend for writing python outside Zope. I've frequently used Eclipse with PyDev before, but it's a bit slow and heavy. I've looked around a bit on the free editors without finding anything I like so I'm thinking it might be worth trying a commercial editor. What do you guys use? Emacs :-) It takes a bit of work to get it set up nicely, but there are some really nice features like good pdb integration. e.g. try this: put a pdb.set_trace() somewhere in your code, and then run the program from a shell within emacs - e.g. you can start a shell by typing M-x shell, and then type the command to run your program. When you enter pdb, you can step around the code and emacs shows you where you are in another buffer, opening modules as you step into them. I've said it before: All hail Ken Manheimer! I'm sure plenty of IDEs can do stuff like that, but I'm surprised how many emacs users don't seem to know it's there. (dunno if all that works on Windows, never tried.) The code-completion support is pretty rudimentary, though. It seems to only be good for repeating symbols already in your source file. And no built-in browsing of documentation afaict. -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] REQUEST.form variables order
On Friday 21 April 2006 21:04, Dieter Maurer wrote: Gaute Amundsen wrote at 2006-4-21 11:01 +0200: On Thursday 20 April 2006 20:11, Dieter Maurer wrote: Gaute Amundsen wrote at 2006-4-19 19:03 +0200: I want to retrieve the form fields in the order that they where submitted in the http POST. I know this has been brought up before, and that the answer is You cant. You might be able to do it. Try REQUEST['BODY']. For a POST request, it should contain the entity content. Of course, you would have to decode it yourself ;-) What? It can't be that simple! I thougt I had been poking all around the corners of REQUEST, looking for just somthing like that. Hm.. no. Error Type: KeyError Error Value: 'BODY' Are you sure about this? I was wrong. BODY is only defined in the read_single case (see cgi.FieldStorage for details) -- this means: not for application/x-www-form-urlencoded nor for multipart/ content types (and therefore not for general POST requests as I claimed). FieldStorage however still preserves the field order (in FieldStorage.list). The order is lost in ZPublisher.HTTPRequest.HTTPRequest.processInputs. Hm.. you have had a second look I see :) Now REQUEST.stdin and cgi.parse_qsl solved my problem neatly, and this kind of under the hood work stil is a bit of a chalenge for me, so I'm afraid l will not work on a more proper solution this time. But thanks for looking into it. Gaute ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope-DB] Patches to SybaseDA v2.0b2
Hi Jens! I very much agree, but unfortunately (a) I can find no authorship information for this Zope product other than Digital Creations, with this list (zope-db@zope.org) listed as the only contact information and (b) the product hasn't been updated since early 2000. So, posting to this list was the best I could come up with. If you happen to know who authored SybaseDA, I'd be most happy to contact them. Indeed, I'd consider becoming the new maintainer for this product so it can stay current, but would not want to do so without first having a somewhat in-depth conversation with the author re: the product's present strengths/weaknesses/limitations. Regards, Doug On Fri, Apr 21, 2006 at 12:40:04AM +0100, Jens Vagelpohl wrote: I honestly doubt that posting patches to a mailing list is all that helpful. I suggest you contact the database adapter author(s) instead. Postings to a mailing list are bound to get lost and forgotten. jens ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: [Zope-DB] Patches to SybaseDA v2.0b2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Looking at cvs.zope.org the committers were brian (Brian Lloyd) and michel (Mike Pelletier) and some work from jeffrey (Jeffrey Shell). None of them are with ZC, and I doubt they are interested in supporting the software. You might be on your own with a package as outdated as this. I would look for alternative solutions. jens On 21 Apr 2006, at 16:40, Doug Morse wrote: Hi Jens! I very much agree, but unfortunately (a) I can find no authorship information for this Zope product other than Digital Creations, with this list (zope-db@zope.org) listed as the only contact information and (b) the product hasn't been updated since early 2000. So, posting to this list was the best I could come up with. If you happen to know who authored SybaseDA, I'd be most happy to contact them. Indeed, I'd consider becoming the new maintainer for this product so it can stay current, but would not want to do so without first having a somewhat in-depth conversation with the author re: the product's present strengths/weaknesses/limitations. Regards, Doug On Fri, Apr 21, 2006 at 12:40:04AM +0100, Jens Vagelpohl wrote: I honestly doubt that posting patches to a mailing list is all that helpful. I suggest you contact the database adapter author(s) instead. Postings to a mailing list are bound to get lost and forgotten. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFESQTwRAx5nvEhZLIRAjyTAJ9UdY2a57IE+KJLwF56LVjfJejLAQCfeBrs Nu41R3DU+q18IOWW4g7DMDU= =3cvQ -END PGP SIGNATURE- ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db