[Zope-Checkins] SVN: Products.Five/branches/1.5/ fixed retrieval of the If-Modified-Since header in browser/resource.py
Log message for revision 107487: fixed retrieval of the If-Modified-Since header in browser/resource.py Changed: U Products.Five/branches/1.5/CHANGES.txt U Products.Five/branches/1.5/browser/resource.py -=- Modified: Products.Five/branches/1.5/CHANGES.txt === --- Products.Five/branches/1.5/CHANGES.txt 2010-01-01 10:01:06 UTC (rev 107486) +++ Products.Five/branches/1.5/CHANGES.txt 2010-01-01 10:11:38 UTC (rev 107487) @@ -5,7 +5,11 @@ HEAD +Five 1.5.9 (2009-01-01) +=== + * Forward-ported viewlet manager directive fix (see c69896). +* fixed retrieval of the If-Modified-Since header in browser/resource.py Five 1.5.8 (2008-07-13) === Modified: Products.Five/branches/1.5/browser/resource.py === --- Products.Five/branches/1.5/browser/resource.py 2010-01-01 10:01:06 UTC (rev 107486) +++ Products.Five/branches/1.5/browser/resource.py 2010-01-01 10:11:38 UTC (rev 107487) @@ -83,7 +83,7 @@ # HTTP If-Modified-Since header handling. This is duplicated # from OFS.Image.Image - it really should be consolidated # somewhere... -header = request.environ.get('If-Modified-Since', None) +header = request.get_header('If-Modified-Since') if header is not None: header = header.split(';')[0] # Some proxies seem to send invalid date strings for this ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Products.Five/tags/1.5.9/ 'creating tag svn+ssh://andreasj...@svn.zope.org/repos/main/Products.Five/tags/1.5.9 from svn+ssh://andreasj...@svn.zope.org/repos/main/Products.Five/bra
Log message for revision 107488: 'creating tag svn+ssh://andreasj...@svn.zope.org/repos/main/Products.Five/tags/1.5.9 from svn+ssh://andreasj...@svn.zope.org/repos/main/Products.Five/branches/1.5' Changed: A Products.Five/tags/1.5.9/ -=- ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/lib/python/Products/ Five 1.5.9
Log message for revision 107489: Five 1.5.9 Changed: _U Zope/branches/2.10/lib/python/Products/ -=- Property changes on: Zope/branches/2.10/lib/python/Products ___ Modified: svn:externals - Fivesvn://svn.zope.org/repos/main/Products.Five/tags/1.5.8 + Fivesvn://svn.zope.org/repos/main/Products.Five/tags/1.5.9 ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/doc/CHANGES.txt updated to Five 1.5.9
Log message for revision 107490: updated to Five 1.5.9 Changed: U Zope/branches/2.10/doc/CHANGES.txt -=- Modified: Zope/branches/2.10/doc/CHANGES.txt === --- Zope/branches/2.10/doc/CHANGES.txt 2010-01-01 10:12:35 UTC (rev 107489) +++ Zope/branches/2.10/doc/CHANGES.txt 2010-01-01 10:14:07 UTC (rev 107490) @@ -12,7 +12,7 @@ import / export form. - fixed improper usage of the IF_MODIFIED_SINCE header inside -Five/browser/resource.py +Five/browser/resource.py (updated to Five 1.5.9) Zope 2.10.10 (2009/12/22) ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.11/doc/CHANGES.txt marked 2.11.6 as unreleased
Log message for revision 107492: marked 2.11.6 as unreleased Changed: U Zope/branches/2.11/doc/CHANGES.txt -=- Modified: Zope/branches/2.11/doc/CHANGES.txt === --- Zope/branches/2.11/doc/CHANGES.txt 2010-01-01 10:16:26 UTC (rev 107491) +++ Zope/branches/2.11/doc/CHANGES.txt 2010-01-01 10:17:49 UTC (rev 107492) @@ -4,7 +4,7 @@ Change information for previous versions of Zope can be found in the file HISTORY.txt. - Zope 2.11.6 (2009/12/30) + Zope 2.11.6 (unreleased) Bugs Fixed ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/src/Products/Five/interfaces.py Import IMenuItemType from zope.browsermenu
Log message for revision 107502: Import IMenuItemType from zope.browsermenu Changed: U Zope/trunk/src/Products/Five/interfaces.py -=- Modified: Zope/trunk/src/Products/Five/interfaces.py === --- Zope/trunk/src/Products/Five/interfaces.py 2010-01-01 16:46:58 UTC (rev 107501) +++ Zope/trunk/src/Products/Five/interfaces.py 2010-01-01 17:03:09 UTC (rev 107502) @@ -15,11 +15,9 @@ $Id$ -from zope.interface.interfaces import IInterface -class IMenuItemType(IInterface): -Menu item type +from zope.deferredimport import deprecated -Menu item types are interfaces that define classes of -menu items. - +deprecated(Please import from zope.browsermenu.interfaces, +IMenuItemType = 'zope.browsermenu.interfaces:IMenuItemType', +) ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/src/Products/Five/TODO.txt Clean up Five todo list
Log message for revision 107503: Clean up Five todo list Changed: U Zope/trunk/src/Products/Five/TODO.txt -=- Modified: Zope/trunk/src/Products/Five/TODO.txt === --- Zope/trunk/src/Products/Five/TODO.txt 2010-01-01 17:03:09 UTC (rev 107502) +++ Zope/trunk/src/Products/Five/TODO.txt 2010-01-01 17:17:09 UTC (rev 107503) @@ -2,42 +2,10 @@ TODO -v1.2 - +- container events - get rid of deprecation warnings -* i18n and translation of utilities/browser/*pt +- make rendering of resource urls support sites? -* can we stop using zLOG and use the logging package? please? - -* events (efge) - - - get rid of deprecation warnings - - - add CHANGES.txt entry - -* five:registerClass (yuppie) - - - functional test that checks the ZMI if there really is an entry in -the add menu? - -* make rendering of resource urls support sites? - - -v1.3 - - -* correctly treat ZCatalog.Catalog(Path)Awareness.CatalogAware w.r.t - events (efge) - -v1.4 - - -- l10n (philikon) - -- Figure out where add-view redirects should go. - -- Instructions on using add views. - - HTTP/WebDAV: support dispatching of all HTTP/WebDAV methods to HTTP views. If lookup fails, fall back to methods on the object (Zope 2 style). Security is implied by HTTP views. @@ -49,12 +17,3 @@ - top-level require /, allow / directives as a ZCML spelling of allowModule, allowClass - -* marker interfaces - - - re-add 'views_details' that didn't make it into 1.2/1.3 - - - add interface for ordering marker interfaces - - - improve the way available marker interfaces are detected. It should be -possible to declare interfaces explicitly as marker interfaces. ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/ Reuse IInclude from zope.configuration.xmlconfig.
Log message for revision 107506: Reuse IInclude from zope.configuration.xmlconfig. Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/Products/Five/fiveconfigure.py U Zope/trunk/src/Products/Five/fivedirectives.py U Zope/trunk/src/Products/Five/meta.zcml -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2010-01-01 17:23:01 UTC (rev 107505) +++ Zope/trunk/doc/CHANGES.rst 2010-01-01 17:27:25 UTC (rev 107506) @@ -11,6 +11,10 @@ Restructuring + +- Reuse IInclude from zope.configuration.xmlconfig. + +- Reuse IMenuItemType from zope.browsermenu. + - Moved TaintedString from ZPublisher to Shared. This resolves a circular import issue. Modified: Zope/trunk/src/Products/Five/fiveconfigure.py === --- Zope/trunk/src/Products/Five/fiveconfigure.py 2010-01-01 17:23:01 UTC (rev 107505) +++ Zope/trunk/src/Products/Five/fiveconfigure.py 2010-01-01 17:27:25 UTC (rev 107506) @@ -59,11 +59,14 @@ # side. //regebro LOG.error('Could not import Product %s' % product.__name__, exc_info=True) -def loadProducts(_context, file=None): +def loadProducts(_context, file=None, files=None, package=None): if file is None: # set the default file = 'configure.zcml' - + +if files is not None or package is not None: +raise ValueError(Neither the files or package argument is supported.) + # now load the files if they exist for product in findProducts(): zcml = os.path.join(os.path.dirname(product.__file__), file) @@ -73,11 +76,14 @@ except: # Yes, really, *any* kind of error. handleBrokenProduct(product) -def loadProductsOverrides(_context, file=None): +def loadProductsOverrides(_context, file=None, files=None, package=None): if file is None: # set the default file = 'overrides.zcml' - + +if files is not None or package is not None: +raise ValueError(Neither the files or package argument is supported.) + # now load the files if they exist for product in findProducts(): zcml = os.path.join(os.path.dirname(product.__file__), file) Modified: Zope/trunk/src/Products/Five/fivedirectives.py === --- Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:23:01 UTC (rev 107505) +++ Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:27:25 UTC (rev 107506) @@ -20,8 +20,9 @@ from zope.security.zcml import Permission from zope.configuration.fields import GlobalObject, Tokens, PythonIdentifier from zope.configuration.fields import Bool -from zope.schema import ASCII, TextLine, BytesLine +from zope.schema import ASCII, TextLine + class IImplementsDirective(Interface): State that a class implements something. @@ -147,16 +148,6 @@ ) - -class IInclude(Interface): - -file = BytesLine( -title=u'Configuration file name', -description=u'Name of a configuration file to be included for each ' -u'installed Product. If the file does not exist, for a ' -u'particular product, no error is raised.', -required=False) - class IRegisterPackageDirective(Interface): Registers the given python package which at a minimum fools zope2 into thinking of it as a zope2 product. @@ -173,3 +164,10 @@ u'with a ProductContext instance', required=False ) + + +from zope.deferredimport import deprecated + +deprecated(Please import from zope.configuration.xmlconfig, +IInclude = 'zope.configuration.xmlconfig:IInclude', +) Modified: Zope/trunk/src/Products/Five/meta.zcml === --- Zope/trunk/src/Products/Five/meta.zcml 2010-01-01 17:23:01 UTC (rev 107505) +++ Zope/trunk/src/Products/Five/meta.zcml 2010-01-01 17:27:25 UTC (rev 107506) @@ -25,13 +25,13 @@ meta:directive name=loadProducts - schema=.fivedirectives.IInclude + schema=zope.configuration.xmlconfig.IInclude handler=.fiveconfigure.loadProducts / meta:directive name=loadProductsOverrides - schema=.fivedirectives.IInclude + schema=zope.configuration.xmlconfig.IInclude handler=.fiveconfigure.loadProductsOverrides / ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/ Marked the ``five:implements /`` as officially deprecated. The standard ``class /`` directive allows the same.
Log message for revision 107507: Marked the ``five:implements /`` as officially deprecated. The standard ``class /`` directive allows the same. Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/Products/Five/fiveconfigure.py U Zope/trunk/src/Products/Five/fivedirectives.py U Zope/trunk/src/Products/Five/meta.zcml -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2010-01-01 17:27:25 UTC (rev 107506) +++ Zope/trunk/doc/CHANGES.rst 2010-01-01 17:44:38 UTC (rev 107507) @@ -11,6 +11,9 @@ Restructuring + +- Marked the ``five:implements /`` as officially deprecated. The standard + ``class /`` directive allows the same. + - Reuse IInclude from zope.configuration.xmlconfig. - Reuse IMenuItemType from zope.browsermenu. Modified: Zope/trunk/src/Products/Five/fiveconfigure.py === --- Zope/trunk/src/Products/Five/fiveconfigure.py 2010-01-01 17:27:25 UTC (rev 107506) +++ Zope/trunk/src/Products/Five/fiveconfigure.py 2010-01-01 17:44:38 UTC (rev 107507) @@ -20,6 +20,7 @@ import os import glob import logging +import warnings import App.config import Products @@ -94,6 +95,11 @@ handleBrokenProduct(product) def implements(_context, class_, interface): +warnings.warn('Using five:implements / is deprecated. Please use the ' + 'class class=foo.Bar' + 'implements interface=foo.interfaces.IBar /' + '/class directive instead.', + DeprecationWarning, stacklevel=2) for interface in interface: _context.action( discriminator = None, Modified: Zope/trunk/src/Products/Five/fivedirectives.py === --- Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:27:25 UTC (rev 107506) +++ Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:44:38 UTC (rev 107507) @@ -23,6 +23,7 @@ from zope.schema import ASCII, TextLine +# Deprecated, the class directive from zope.security allows the same class IImplementsDirective(Interface): State that a class implements something. Modified: Zope/trunk/src/Products/Five/meta.zcml === --- Zope/trunk/src/Products/Five/meta.zcml 2010-01-01 17:27:25 UTC (rev 107506) +++ Zope/trunk/src/Products/Five/meta.zcml 2010-01-01 17:44:38 UTC (rev 107507) @@ -36,12 +36,6 @@ / meta:directive - name=implements - schema=.fivedirectives.IImplementsDirective - handler=.fiveconfigure.implements - / - -meta:directive name=containerEvents schema=.fivedirectives.IContainerEventsDirective handler=.eventconfigure.containerEvents @@ -77,6 +71,13 @@ handler=.fiveconfigure.registerPackage / +!-- Deprecated, use the class directive instead. -- +meta:directive + name=implements + schema=.fivedirectives.IImplementsDirective + handler=.fiveconfigure.implements + / + /meta:directives /configure ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/ Removed Products.Five.fivedirectives.IBridgeDirective - a leftover from the Interface to zope.interface bridging code.
Log message for revision 107508: Removed Products.Five.fivedirectives.IBridgeDirective - a leftover from the Interface to zope.interface bridging code. Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/Products/Five/fivedirectives.py -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2010-01-01 17:44:38 UTC (rev 107507) +++ Zope/trunk/doc/CHANGES.rst 2010-01-01 17:48:24 UTC (rev 107508) @@ -11,6 +11,9 @@ Restructuring + +- Removed Products.Five.fivedirectives.IBridgeDirective - a leftover from the + Interface to zope.interface bridging code. + - Marked the ``five:implements /`` as officially deprecated. The standard ``class /`` directive allows the same. Modified: Zope/trunk/src/Products/Five/fivedirectives.py === --- Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:44:38 UTC (rev 107507) +++ Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:48:24 UTC (rev 107508) @@ -18,7 +18,7 @@ from zope.interface import Interface from zope.browserresource.metadirectives import IBasicResourceInformation from zope.security.zcml import Permission -from zope.configuration.fields import GlobalObject, Tokens, PythonIdentifier +from zope.configuration.fields import GlobalObject, Tokens from zope.configuration.fields import Bool from zope.schema import ASCII, TextLine @@ -60,26 +60,6 @@ ) -class IBridgeDirective(Interface): -Bridge from a Zope 2 interface to an equivalent Zope3 interface. - -zope2 = GlobalObject( -title=uZope2, -required=True -) - -package = GlobalObject( -title=uTarget package, -required=True -) - -name = PythonIdentifier( -title=uZope3 Interface name, -description=uIf not supplied, the new interface will have the same -uname as the source interface., -required=False -) - class IPagesFromDirectoryDirective(IBasicResourceInformation): Register each file in a skin directory as a page resource ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/ Removed the deprecated ``five:containerEvents`` directive, which had been a no-op for quite a while.
Log message for revision 107509: Removed the deprecated ``five:containerEvents`` directive, which had been a no-op for quite a while. Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/Products/Five/doc/directives.txt U Zope/trunk/src/Products/Five/eventconfigure.py U Zope/trunk/src/Products/Five/fivedirectives.py U Zope/trunk/src/Products/Five/meta.zcml -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2010-01-01 17:48:24 UTC (rev 107508) +++ Zope/trunk/doc/CHANGES.rst 2010-01-01 17:55:12 UTC (rev 107509) @@ -11,6 +11,9 @@ Restructuring + +- Removed the deprecated ``five:containerEvents`` directive, which had been + a no-op for quite a while. + - Removed Products.Five.fivedirectives.IBridgeDirective - a leftover from the Interface to zope.interface bridging code. Modified: Zope/trunk/src/Products/Five/doc/directives.txt === --- Zope/trunk/src/Products/Five/doc/directives.txt 2010-01-01 17:48:24 UTC (rev 107508) +++ Zope/trunk/src/Products/Five/doc/directives.txt 2010-01-01 17:55:12 UTC (rev 107509) @@ -91,11 +91,6 @@ five ``http://namespaces.zope.org/five`` -implements --- - -Make a class declare it implements an interface. - loadProducts @@ -113,13 +108,6 @@ Retrieve size information for a Zope 2 content class via a Zope 3 style ``ISized`` adapter. -containerEvents - -Make events be sent for Zope 2 container objects, instead of calling old -methods like ``manage_afterAdd``. These old methods will still be called -for classes specified in a ``deprecatedManageAddDelete`` directive. - deprecatedManageAddDelete - Modified: Zope/trunk/src/Products/Five/eventconfigure.py === --- Zope/trunk/src/Products/Five/eventconfigure.py 2010-01-01 17:48:24 UTC (rev 107508) +++ Zope/trunk/src/Products/Five/eventconfigure.py 2010-01-01 17:55:12 UTC (rev 107509) @@ -18,14 +18,8 @@ $Id$ -import warnings from OFS.subscribers import deprecatedManageAddDeleteClasses -def setContainerEvents(): -warnings.warn(Using five:containerEvents/ is deprecated (it is now - the default)., - DeprecationWarning) - def setDeprecatedManageAddDelete(class_): Instances of the class will still see their old methods called. deprecatedManageAddDeleteClasses.append(class_) @@ -33,13 +27,6 @@ def cleanUp(): deprecatedManageAddDeleteClasses[:] = [] -def containerEvents(_context): -_context.action( -discriminator=None, -callable=setContainerEvents, -args=(), -) - def deprecatedManageAddDelete(_context, class_): _context.action( discriminator=('five:deprecatedManageAddDelete', class_), Modified: Zope/trunk/src/Products/Five/fivedirectives.py === --- Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:48:24 UTC (rev 107508) +++ Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:55:12 UTC (rev 107509) @@ -47,9 +47,6 @@ required=True ) -class IContainerEventsDirective(Interface): -Global switch to enable container events - class IDeprecatedManageAddDeleteDirective(Interface): Call manage_afterAdd co for these contained content classes. Modified: Zope/trunk/src/Products/Five/meta.zcml === --- Zope/trunk/src/Products/Five/meta.zcml 2010-01-01 17:48:24 UTC (rev 107508) +++ Zope/trunk/src/Products/Five/meta.zcml 2010-01-01 17:55:12 UTC (rev 107509) @@ -36,12 +36,6 @@ / meta:directive - name=containerEvents - schema=.fivedirectives.IContainerEventsDirective - handler=.eventconfigure.containerEvents - / - -meta:directive name=deprecatedManageAddDelete schema=.fivedirectives.IDeprecatedManageAddDeleteDirective handler=.eventconfigure.deprecatedManageAddDelete ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/src/Products/Five/ More documentation updates
Log message for revision 107511: More documentation updates Changed: U Zope/trunk/src/Products/Five/browser/pagetemplatefile.py U Zope/trunk/src/Products/Five/browser/resource.py U Zope/trunk/src/Products/Five/browser/tests/classes.py U Zope/trunk/src/Products/Five/browser/tests/pages_ftest.txt U Zope/trunk/src/Products/Five/browser/tests/provider.txt U Zope/trunk/src/Products/Five/component/__init__.py U Zope/trunk/src/Products/Five/component/component.txt U Zope/trunk/src/Products/Five/doc/main.txt U Zope/trunk/src/Products/Five/doc/manual.txt D Zope/trunk/src/Products/Five/doc/presentations/ D Zope/trunk/src/Products/Five/doc/products/ U Zope/trunk/src/Products/Five/fiveconfigure.py -=- Modified: Zope/trunk/src/Products/Five/browser/pagetemplatefile.py === --- Zope/trunk/src/Products/Five/browser/pagetemplatefile.py2010-01-01 18:24:44 UTC (rev 107510) +++ Zope/trunk/src/Products/Five/browser/pagetemplatefile.py2010-01-01 18:53:56 UTC (rev 107511) @@ -47,8 +47,8 @@ def __call__(self, __instance, *args, **keywords): # Work around BBB foul. Before Zope 2.12 there was no first argument -# but the Zope 3 version has one called instance. Some people used -# instance as an additional keyword argument. +# but the zope.pagetemplate version has one called instance. Some +# people used instance as an additional keyword argument. instance = __instance namespace = self.pt_getContext( request=instance.request, Modified: Zope/trunk/src/Products/Five/browser/resource.py === --- Zope/trunk/src/Products/Five/browser/resource.py2010-01-01 18:24:44 UTC (rev 107510) +++ Zope/trunk/src/Products/Five/browser/resource.py2010-01-01 18:53:56 UTC (rev 107511) @@ -35,7 +35,7 @@ class Resource(object): A mixin that changes the URL-rendering of resources (__call__). -In Zope 3, resource URLs are of the form +In zope.browserresource, resource URLs are of the form nearest_site/@@/resource_name. Since Zope 2 didn't have support for sites from the beginning of the Five integration, resource URLs in Zope 2 are of the form context/++resource++resource_name. Modified: Zope/trunk/src/Products/Five/browser/tests/classes.py === --- Zope/trunk/src/Products/Five/browser/tests/classes.py 2010-01-01 18:24:44 UTC (rev 107510) +++ Zope/trunk/src/Products/Five/browser/tests/classes.py 2010-01-01 18:53:56 UTC (rev 107511) @@ -19,7 +19,7 @@ from Products.Five import BrowserView class IOne(Interface): -This is a Zope 3 interface. +This is an interface. class One(object): Modified: Zope/trunk/src/Products/Five/browser/tests/pages_ftest.txt === --- Zope/trunk/src/Products/Five/browser/tests/pages_ftest.txt 2010-01-01 18:24:44 UTC (rev 107510) +++ Zope/trunk/src/Products/Five/browser/tests/pages_ftest.txt 2010-01-01 18:53:56 UTC (rev 107511) @@ -19,7 +19,7 @@ -- In Zope 2, objects normally have to have a docstring in order to be -published. This crazy requirement luckily isn't true for Zope 3, so +published. This crazy requirement luckily isn't true for zope.publisher, so it should be possible to write docstring-less view classes that are still published through ZPublisher. Modified: Zope/trunk/src/Products/Five/browser/tests/provider.txt === --- Zope/trunk/src/Products/Five/browser/tests/provider.txt 2010-01-01 18:24:44 UTC (rev 107510) +++ Zope/trunk/src/Products/Five/browser/tests/provider.txt 2010-01-01 18:53:56 UTC (rev 107511) @@ -18,9 +18,9 @@ Content Provider is a term from the Java world that refers to components that can provide HTML content. It means nothing more! How the content is found and -returned is totally up to the implementation. The Zope 3 touch to the concept -is that content providers are multi-adapters that are looked up by the -context, request (and thus the layer/skin), and view they are displayed in. +returned is totally up to the implementation. The Zope touch to the concept is +that content providers are multi-adapters that are looked up by the context, +request (and thus the layer/skin), and view they are displayed in. So let's create a simple content provider: Modified: Zope/trunk/src/Products/Five/component/__init__.py === --- Zope/trunk/src/Products/Five/component/__init__.py 2010-01-01 18:24:44 UTC (rev 107510) +++ Zope/trunk/src/Products/Five/component/__init__.py 2010-01-01 18:53:56 UTC (rev 107511) @@ -43,7 +43,7 @@ @zope.interface.implementer(IComponentLookup) def
[Zope-Checkins] SVN: Zope/trunk/ Updated Five documentation to clarify its role in regard to Zope packages.
Log message for revision 107512: Updated Five documentation to clarify its role in regard to Zope packages. Changed: U Zope/trunk/doc/CHANGES.rst D Zope/trunk/src/Products/Five/CHANGES.txt U Zope/trunk/src/Products/Five/COPYING.txt U Zope/trunk/src/Products/Five/CREDITS.txt U Zope/trunk/src/Products/Five/README.txt D Zope/trunk/src/Products/Five/doc/main.txt U Zope/trunk/src/Products/Five/skin/standardmacros.py U Zope/trunk/src/Products/Five/tests/adapters.py U Zope/trunk/src/Products/Five/tests/classes.py U Zope/trunk/src/Products/Five/tests/event.txt U Zope/trunk/src/Products/Five/tests/test_directives.py U Zope/trunk/src/Products/Five/viewlet/README.txt -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2010-01-01 18:53:56 UTC (rev 107511) +++ Zope/trunk/doc/CHANGES.rst 2010-01-01 19:03:09 UTC (rev 107512) @@ -11,6 +11,8 @@ Restructuring + +- Updated Five documentation to clarify its role in regard to Zope packages. + - Removed the deprecated ``five:containerEvents`` directive, which had been a no-op for quite a while. Deleted: Zope/trunk/src/Products/Five/CHANGES.txt === --- Zope/trunk/src/Products/Five/CHANGES.txt2010-01-01 18:53:56 UTC (rev 107511) +++ Zope/trunk/src/Products/Five/CHANGES.txt2010-01-01 19:03:09 UTC (rev 107512) @@ -1,878 +0,0 @@ - -Five Changes - - -This change log is discontinued. For changes after Five 1.5.2 see Zope's main -CHANGES.txt file. - -Five 1.5.2 (2007-01-10) -=== - -* Added support for the securityPolicy / ZCML directive known from - Zope 3. - -* View methods which aren't explicitly declared as allowed must be marked - private explicitly to avoid being web publishable. - -* i18n: Synced FiveTranslationService implementation with Zope 3.3. This makes - sure that the TestMessageFallbackDomain is used if registered. - -* site/metaconfigure: Local site hook now only applied once per class, so - multiple five:localsite tags for the same class won't cause config - errors. - -Five 1.5.1 (2006-11-04) -=== - -* site: Fixed small bug in FiveSiteManager. (issue #2198) - -* browser: processInputs now decodes strings in lists and tuples. - -* formlib: Removed redundant subpageform.pt and pageform.pt. Added missing - error view configuration. - -* Made the __call__ method of ViewMixinForAttributes have the same signature - as the original attribute. This aids some pathological request parameter - marshalling. - -* Fixed #2168: Missing import - -* Port code from Zope 3 making resource directories recursive. - Thanks to Richard Waid. - -Five 1.5 (2006-08-13) -= - -* Enabled the viewlet related directives by default. - -* Added acquisition wrappers to viewlets before updating or rendering. - -* Allow multiple uses of the class/content directive. - -* Moved the custom 'provider:' tales expression back into Five. Made the - provider directive acquisition wrap the resultant content provider so that - simple providers that need security declarations (e.g. those that render - pagetemplates) can work with the Zope 2 security machinery. - -* Added Five.browser.pagetemplatefile.ViewPageTemplateFile as an alias - to ZopeTwoPageTemplateFile and as a Zope 2 correspondence to - zope.app.pagetemplate.ViewPageTemplateFile. - -* Added tests to make sure that views are not blocked by acquired attributes. - -* Changed the tests to reflect that defaultView no only works for views - (and not on attributes). - -* The FiveSiteManager classes now work again, but are deprecated for the - new zope.component support. There is also a method to migrate Five.site - to zope.component. - -Five 1.5c (2006-05-29) -== - -Restructuring -- - -* Zope 2.10+ now includes site.zcml as part of its instance creation - skel directory. As a consequence Five now requires this file to exist - in every instance. If upgrading a site from Zope 2.9 to 2.10, you will - need to copy site.zcml and package-includes/ from your installed Zope - installation location (skel/etc/) into the etc/ directory of your upgraded - instance. - - The rationale for requiring this new file is to bring Zope 2 instances - closer in consistency to Zope 3 instances. It also eases use of Zope 3 - coding techniques in Zope 2 and removes some confusion when trying - to run pure Zope 3 applications on Zope 2. - -* Zope 2.10+ uses the Zope 3 PageTemplate engine (incl. TAL and - TALES). A bunch of special and magic code in Five has become - obsolete with this, some other had to be readjusted. - -Bugfixes - - -* Fixed an issue where browser:page based views that didn't have - template or attribute defined weren't getting BrowserView mixed in. - -* Fixed an issue where
[Zope-Checkins] SVN: Zope/trunk/src/ Remove last references to Zope 3
Log message for revision 107513: Remove last references to Zope 3 Changed: U Zope/trunk/src/AccessControl/tests/testZCML.py U Zope/trunk/src/OFS/SimpleItem.py U Zope/trunk/src/Products/BTreeFolder2/README.txt U Zope/trunk/src/Products/PageTemplates/DeferExpr.py U Zope/trunk/src/Products/PageTemplates/Expressions.py U Zope/trunk/src/Products/PageTemplates/ZopePageTemplate.py U Zope/trunk/src/ZPublisher/BaseRequest.py U Zope/trunk/src/ZPublisher/HTTPRequest.py U Zope/trunk/src/ZPublisher/tests/generate_conflicts.py U Zope/trunk/src/Zope2/App/startup.py -=- Modified: Zope/trunk/src/AccessControl/tests/testZCML.py === --- Zope/trunk/src/AccessControl/tests/testZCML.py 2010-01-01 19:03:09 UTC (rev 107512) +++ Zope/trunk/src/AccessControl/tests/testZCML.py 2010-01-01 19:26:58 UTC (rev 107513) @@ -220,7 +220,7 @@ from zope.component.testing import setUp, tearDown setUp() -Zope 3 has a function zope.security.checkPermission which provides +zope.security has a function zope.security.checkPermission which provides an easy way of checking whether the currently authenticated user has the permission to access an object. The function delegates to the security policy's checkPermission() method. Modified: Zope/trunk/src/OFS/SimpleItem.py === --- Zope/trunk/src/OFS/SimpleItem.py2010-01-01 19:03:09 UTC (rev 107512) +++ Zope/trunk/src/OFS/SimpleItem.py2010-01-01 19:26:58 UTC (rev 107513) @@ -241,7 +241,7 @@ # Can we re-raise the exception with a rendered-to-HTML # exception value? To be able to do so, the exception # constructor needs to be able to take more than two -# arguments (some Zope 3 exceptions can't). +# arguments (some Zope exceptions can't). can_raise = False ctor = getattr(error_type, '__init__', None) if inspect.ismethoddescriptor(ctor): Modified: Zope/trunk/src/Products/BTreeFolder2/README.txt === --- Zope/trunk/src/Products/BTreeFolder2/README.txt 2010-01-01 19:03:09 UTC (rev 107512) +++ Zope/trunk/src/Products/BTreeFolder2/README.txt 2010-01-01 19:26:58 UTC (rev 107513) @@ -112,13 +112,3 @@ manage_cleanup to the end of the URL and request that URL. It may take some time to load and fix the entire structure. If problems are detected, information will be added to the event log. - - -Future -== - -BTreeFolder2 will be maintained for Zope 2. Zope 3, however, is not -likely to require BTreeFolder, since the intention is to make Zope 3 -folders gracefully expand to support many items. - - Modified: Zope/trunk/src/Products/PageTemplates/DeferExpr.py === --- Zope/trunk/src/Products/PageTemplates/DeferExpr.py 2010-01-01 19:03:09 UTC (rev 107512) +++ Zope/trunk/src/Products/PageTemplates/DeferExpr.py 2010-01-01 19:26:58 UTC (rev 107513) @@ -32,8 +32,7 @@ from zope.tales.expressions import DeferWrapper, DeferExpr _marker = object() -# TODO These should really be integrated into the Zope 3 ZPT -# implementation (zope.tales) +# TODO These should really be integrated into the zope.tales implementation class LazyWrapper(DeferWrapper): Wrapper for lazy: expression Modified: Zope/trunk/src/Products/PageTemplates/Expressions.py === --- Zope/trunk/src/Products/PageTemplates/Expressions.py2010-01-01 19:03:09 UTC (rev 107512) +++ Zope/trunk/src/Products/PageTemplates/Expressions.py2010-01-01 19:26:58 UTC (rev 107513) @@ -53,16 +53,16 @@ LOG = logging.getLogger('Expressions') # In Zope 2 traversal semantics, NotFound or Unauthorized (the Zope 2 -# versions) indicate that traversal has failed. By default, Zope 3's -# TALES engine doesn't recognize them as such which is why we extend -# Zope 3's list here and make sure our implementation of the TALES +# versions) indicate that traversal has failed. By default, zope.tales' +# engine doesn't recognize them as such which is why we extend its +# list here and make sure our implementation of the TALES # Path Expression uses them ZopeUndefs = Undefs + (NotFound, Unauthorized) def boboAwareZopeTraverse(object, path_items, econtext): Traverses a sequence of names, first trying attributes then items. -This uses Zope 3 path traversal where possible and interacts +This uses zope.traversing path traversal where possible and interacts correctly with objects providing OFS.interface.ITraversable when necessary (bobo-awareness). @@ -82,7 +82,7 @@ def trustedBoboAwareZopeTraverse(object, path_items, econtext): Traverses a sequence of names, first trying attributes then
[Zope-Checkins] SVN: Zope/trunk/ Ported the lazy expression into zope.tales and require a new version of it.
Log message for revision 107519: Ported the lazy expression into zope.tales and require a new version of it. Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/setup.py U Zope/trunk/src/Products/PageTemplates/DeferExpr.py U Zope/trunk/src/Products/PageTemplates/Expressions.py U Zope/trunk/src/Products/PageTemplates/tests/testExpressions.py U Zope/trunk/versions.cfg -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2010-01-01 20:12:39 UTC (rev 107518) +++ Zope/trunk/doc/CHANGES.rst 2010-01-01 20:14:41 UTC (rev 107519) @@ -11,6 +11,8 @@ Restructuring + +- Ported the lazy expression into zope.tales and require a new version of it. + - Updated Five documentation to clarify its role in regard to Zope packages. - Removed the deprecated ``five:containerEvents`` directive, which had been Modified: Zope/trunk/setup.py === --- Zope/trunk/setup.py 2010-01-01 20:12:39 UTC (rev 107518) +++ Zope/trunk/setup.py 2010-01-01 20:14:41 UTC (rev 107519) @@ -130,7 +130,7 @@ 'zope.size', 'zope.structuredtext', 'zope.tal', - 'zope.tales', + 'zope.tales = 3.5.0', 'zope.testbrowser', 'zope.testing', 'zope.traversing', Modified: Zope/trunk/src/Products/PageTemplates/DeferExpr.py === --- Zope/trunk/src/Products/PageTemplates/DeferExpr.py 2010-01-01 20:12:39 UTC (rev 107518) +++ Zope/trunk/src/Products/PageTemplates/DeferExpr.py 2010-01-01 20:14:41 UTC (rev 107519) @@ -10,48 +10,7 @@ # FOR A PARTICULAR PURPOSE # ## -Lazy expression handler -A lazy expressions is implemented similarly to the defer expression -but has a different result. While a defer expression is evaluated -every time it is used according to its context a lazy expression is -evaluted only the first time it is used. Lazy expression are known -under the name lazy initialization of variables, too. A common use -case for a lazy expression is a lazy binding of a costly expression. -While one could call an expression only when it's required it makes -sense to define it only one time when it could be used multiple times. - -Example - -div tal:define=lazyvar lazy:here/suckMyCPU -div tal:condition=foo tal:content=lazyvar / -div tal:condition=bar tal:content=lazyvar / -div tal:conditionpython: not (foo or bar).../div -/div - +# BBB from zope.tales.expressions import DeferWrapper, DeferExpr -_marker = object() - -# TODO These should really be integrated into the zope.tales implementation - -class LazyWrapper(DeferWrapper): -Wrapper for lazy: expression - -def __init__(self, expr, econtext): -DeferWrapper.__init__(self, expr, econtext) -self._result = _marker - -def __call__(self): -r = self._result -if r is _marker: -self._result = r = self._expr(self._econtext) -return r - -class LazyExpr(DeferExpr): -lazy: expression handler for lazy initialization of expressions - -def __call__(self, econtext): -return LazyWrapper(self._c, econtext) - -def __repr__(self): -return 'lazy:%s' % `self._s` +from zope.tales.expressions import LazyWrapper, LazyExpr Modified: Zope/trunk/src/Products/PageTemplates/Expressions.py === --- Zope/trunk/src/Products/PageTemplates/Expressions.py2010-01-01 20:12:39 UTC (rev 107518) +++ Zope/trunk/src/Products/PageTemplates/Expressions.py2010-01-01 20:14:41 UTC (rev 107519) @@ -26,6 +26,7 @@ from zope.pagetemplate.engine import ZopeEngine as Z3Engine from zope.proxy import removeAllProxies from zope.tales.expressions import DeferExpr +from zope.tales.expressions import LazyExpr from zope.tales.expressions import NotExpr from zope.tales.expressions import PathExpr from zope.tales.expressions import StringExpr @@ -45,7 +46,6 @@ from zope.contentprovider.tales import TALESProviderExpression from Products.PageTemplates import ZRPythonExpr -from Products.PageTemplates.DeferExpr import LazyExpr from Products.PageTemplates.interfaces import IUnicodeEncodingConflictResolver SecureModuleImporter = ZRPythonExpr._SecureModuleImporter() Modified: Zope/trunk/src/Products/PageTemplates/tests/testExpressions.py === --- Zope/trunk/src/Products/PageTemplates/tests/testExpressions.py 2010-01-01 20:12:39 UTC (rev 107518) +++ Zope/trunk/src/Products/PageTemplates/tests/testExpressions.py 2010-01-01 20:14:41 UTC (rev 107519) @@ -83,18 +83,6 @@ ec = self._makeContext() self.failUnless(ec.evaluate('x | nothing') is None) -def
[Zope-Checkins] SVN: Zope/trunk/ Moved ``cmf.*`` permissions into Products.CMFCore.
Log message for revision 107522: Moved ``cmf.*`` permissions into Products.CMFCore. Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/Products/Five/permissions.zcml -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2010-01-01 22:46:01 UTC (rev 107521) +++ Zope/trunk/doc/CHANGES.rst 2010-01-01 23:03:49 UTC (rev 107522) @@ -11,6 +11,8 @@ Restructuring + +- Moved ``cmf.*`` permissions into Products.CMFCore. + - Moved general OFS related ZCML directives from Products.Five into the OFS package itself. Modified: Zope/trunk/src/Products/Five/permissions.zcml === --- Zope/trunk/src/Products/Five/permissions.zcml 2010-01-01 22:46:01 UTC (rev 107521) +++ Zope/trunk/src/Products/Five/permissions.zcml 2010-01-01 23:03:49 UTC (rev 107522) @@ -8,86 +8,4 @@ title=Manage Five local sites / - !-- CMF Core Permissions -- - - permission -id=cmf.ListFolderContents -title=List folder contents -/ - - permission -id=cmf.ListUndoableChanges -title=List undoable changes -/ - - permission -id=cmf.AccessInactivePortalContent -title=Access inactive portal content -/ - - permission -id=cmf.ManagePortal -title=Manage portal -/ - - permission -id=cmf.ModifyPortalContent -title=Modify portal content -/ - - permission -id=cmf.ManageProperties -title=Manage properties -/ - - permission -id=cmf.ListPortalMembers -title=List portal members -/ - - permission -id=cmf.AddPortalFolders -title=Add portal folders -/ - - permission -id=cmf.AddPortalContent -title=Add portal content -/ - - permission -id=cmf.AddPortalMember -title=Add portal member -/ - - permission -id=cmf.SetOwnPassword -title=Set own password -/ - - permission -id=cmf.SetOwnProperties -title=Set own properties -/ - - permission -id=cmf.MailForgottonPassword -title=Mail forgotten password -/ - - permission -id=cmf.RequestReview -title=Request review -/ - - permission -id=cmf.ReviewPortalContent -title=Review portal content -/ - - permission -id=cmf.AccessFuturePortalContent -title=Access future portal content -/ - /configure ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/ look for ZEXP imports in the clienthome dir too
Log message for revision 107525: look for ZEXP imports in the clienthome dir too Changed: U Zope/branches/2.10/doc/CHANGES.txt U Zope/branches/2.10/lib/python/OFS/ObjectManager.py -=- Modified: Zope/branches/2.10/doc/CHANGES.txt === --- Zope/branches/2.10/doc/CHANGES.txt 2010-01-01 23:17:41 UTC (rev 107524) +++ Zope/branches/2.10/doc/CHANGES.txt 2010-01-02 03:20:02 UTC (rev 107525) @@ -8,6 +8,10 @@ Bugs fixed + - Also look for ZEXP imports within the clienthome directory. This +provides a place to put imports that won't be clobbered by buildout +in a buildout-based Zope instance. + - LP #143444: add labels to checkboxes / radio buttons on import / export form. Modified: Zope/branches/2.10/lib/python/OFS/ObjectManager.py === --- Zope/branches/2.10/lib/python/OFS/ObjectManager.py 2010-01-01 23:17:41 UTC (rev 107524) +++ Zope/branches/2.10/lib/python/OFS/ObjectManager.py 2010-01-02 03:20:02 UTC (rev 107525) @@ -642,6 +642,8 @@ paths = [cfg.zopehome] if not cfg.instancehome in paths: paths.append(cfg.instancehome) +if not cfg.clienthome in paths: +paths.append(cfg.clienthome) for impath in paths: directory = os.path.join(impath, 'import') if not os.path.isdir(directory): ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.11/ merge r107525 from Zope 2.10
Log message for revision 107526: merge r107525 from Zope 2.10 Changed: U Zope/branches/2.11/doc/CHANGES.txt U Zope/branches/2.11/lib/python/OFS/ObjectManager.py -=- Modified: Zope/branches/2.11/doc/CHANGES.txt === --- Zope/branches/2.11/doc/CHANGES.txt 2010-01-02 03:20:02 UTC (rev 107525) +++ Zope/branches/2.11/doc/CHANGES.txt 2010-01-02 03:36:34 UTC (rev 107526) @@ -8,6 +8,10 @@ Bugs Fixed + - Also look for ZEXP imports within the clienthome directory. This +provides a place to put imports that won't be clobbered by buildout +in a buildout-based Zope instance. + - LP #143444: add labels to checkboxes / radio buttons on import / export form. Modified: Zope/branches/2.11/lib/python/OFS/ObjectManager.py === --- Zope/branches/2.11/lib/python/OFS/ObjectManager.py 2010-01-02 03:20:02 UTC (rev 107525) +++ Zope/branches/2.11/lib/python/OFS/ObjectManager.py 2010-01-02 03:36:34 UTC (rev 107526) @@ -647,6 +647,8 @@ paths = [cfg.zopehome] if not cfg.instancehome in paths: paths.append(cfg.instancehome) +if not cfg.clienthome in paths: +paths.append(cfg.clienthome) for impath in paths: directory = os.path.join(impath, 'import') if not os.path.isdir(directory): ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/lib/python/OFS/ObjectManager.py missed one change
Log message for revision 107527: missed one change Changed: U Zope/branches/2.10/lib/python/OFS/ObjectManager.py -=- Modified: Zope/branches/2.10/lib/python/OFS/ObjectManager.py === --- Zope/branches/2.10/lib/python/OFS/ObjectManager.py 2010-01-02 03:36:34 UTC (rev 107526) +++ Zope/branches/2.10/lib/python/OFS/ObjectManager.py 2010-01-02 03:39:00 UTC (rev 107527) @@ -599,7 +599,7 @@ raise BadRequest, 'Invalid file name %s' % escape(file) cfg = getConfiguration() -for impath in (cfg.instancehome, cfg.zopehome): +for impath in (cfg.instancehome, cfg.zopehome, cfg.clienthome): filepath = os.path.join(impath, 'import', file) if os.path.exists(filepath): break ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.11/lib/python/OFS/ObjectManager.py missed one change
Log message for revision 107528: missed one change Changed: U Zope/branches/2.11/lib/python/OFS/ObjectManager.py -=- Modified: Zope/branches/2.11/lib/python/OFS/ObjectManager.py === --- Zope/branches/2.11/lib/python/OFS/ObjectManager.py 2010-01-02 03:39:00 UTC (rev 107527) +++ Zope/branches/2.11/lib/python/OFS/ObjectManager.py 2010-01-02 03:39:16 UTC (rev 107528) @@ -604,7 +604,7 @@ raise BadRequest, 'Invalid file name %s' % escape(file) cfg = getConfiguration() -for impath in (cfg.instancehome, cfg.zopehome): +for impath in (cfg.instancehome, cfg.zopehome, cfg.clienthome): filepath = os.path.join(impath, 'import', file) if os.path.exists(filepath): break ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.12/ merge r107525-107528 from Zope 2.10
Log message for revision 107529: merge r107525-107528 from Zope 2.10 Changed: U Zope/branches/2.12/doc/CHANGES.rst U Zope/branches/2.12/src/OFS/ObjectManager.py -=- Modified: Zope/branches/2.12/doc/CHANGES.rst === --- Zope/branches/2.12/doc/CHANGES.rst 2010-01-02 03:39:16 UTC (rev 107528) +++ Zope/branches/2.12/doc/CHANGES.rst 2010-01-02 03:43:32 UTC (rev 107529) @@ -11,6 +11,10 @@ Bugs Fixed ++ +- Also look for ZEXP imports within the clienthome directory. This + provides a place to put imports that won't be clobbered by buildout + in a buildout-based Zope instance. + - Fixed a SyntaxError in utilities/load_site.py script. Features Added Modified: Zope/branches/2.12/src/OFS/ObjectManager.py === --- Zope/branches/2.12/src/OFS/ObjectManager.py 2010-01-02 03:39:16 UTC (rev 107528) +++ Zope/branches/2.12/src/OFS/ObjectManager.py 2010-01-02 03:43:32 UTC (rev 107529) @@ -617,7 +617,6 @@ if dirname: raise BadRequest, 'Invalid file name %s' % escape(file) -cfg = getConfiguration() for impath in self._getImportPaths(): filepath = os.path.join(impath, 'import', file) if os.path.exists(filepath): @@ -663,6 +662,8 @@ paths.append(zopehome) if not cfg.instancehome in paths: paths.append(cfg.instancehome) +if not cfg.clienthome in paths: +paths.append(cfg.clienthome) return paths def list_imports(self): ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/ merge r107529 from Zope 2.12
Log message for revision 107530: merge r107529 from Zope 2.12 Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/OFS/ObjectManager.py -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2010-01-02 03:43:32 UTC (rev 107529) +++ Zope/trunk/doc/CHANGES.rst 2010-01-02 03:54:08 UTC (rev 107530) @@ -122,6 +122,10 @@ Bugs Fixed ++ +- Also look for ZEXP imports within the clienthome directory. This + provides a place to put imports that won't be clobbered by buildout + in a buildout-based Zope instance. + - LP #143444: add labels to checkboxes / radio buttons on import / export form. Modified: Zope/trunk/src/OFS/ObjectManager.py === --- Zope/trunk/src/OFS/ObjectManager.py 2010-01-02 03:43:32 UTC (rev 107529) +++ Zope/trunk/src/OFS/ObjectManager.py 2010-01-02 03:54:08 UTC (rev 107530) @@ -617,7 +617,6 @@ if dirname: raise BadRequest, 'Invalid file name %s' % escape(file) -cfg = getConfiguration() for impath in self._getImportPaths(): filepath = os.path.join(impath, 'import', file) if os.path.exists(filepath): @@ -663,6 +662,8 @@ paths.append(zopehome) if not cfg.instancehome in paths: paths.append(cfg.instancehome) +if not cfg.clienthome in paths: +paths.append(cfg.clienthome) return paths def list_imports(self): ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-dev] Zope Tests: 6 OK
Summary of messages to the zope-tests list. Period Thu Dec 31 12:00:00 2009 UTC to Fri Jan 1 12:00:00 2010 UTC. There were 6 messages: 6 from Zope Tests. Tests passed OK --- Subject: OK : Zope-2.10 Python-2.4.6 : Linux From: Zope Tests Date: Thu Dec 31 20:36:52 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-December/013299.html Subject: OK : Zope-2.11 Python-2.4.6 : Linux From: Zope Tests Date: Thu Dec 31 20:38:52 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-December/013300.html Subject: OK : Zope-2.12 Python-2.6.4 : Linux From: Zope Tests Date: Thu Dec 31 20:40:52 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-December/013301.html Subject: OK : Zope-2.12-alltests Python-2.6.4 : Linux From: Zope Tests Date: Thu Dec 31 20:42:52 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-December/013302.html Subject: OK : Zope-trunk Python-2.6.4 : Linux From: Zope Tests Date: Thu Dec 31 20:44:52 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-December/013303.html Subject: OK : Zope-trunk-alltests Python-2.6.4 : Linux From: Zope Tests Date: Thu Dec 31 20:46:52 EST 2009 URL: http://mail.zope.org/pipermail/zope-tests/2009-December/013304.html ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope3 and Generic Functions
Hi there, I've been really getting my head around Zope3 and adaption lately for a talk for my local Python usergroup. I've read quite a bit on the topic, but of particular interest was the adapter vs. generic function debate that's been doing the rounds over the last few years. See Guido van Rossum's article here: http://www.artima.com/weblogs/viewpost.jsp?thread=155123 where he concludes that generic functions are more general and useful. Further, we have Ian Bicking's Zope 3 critique where, he argues that generic functions are generally better and Martijn Faassen's comment: I agree by the way that generic methods are interesting and we should be investigating how they fit in a Zope 3 context. There is a clear relationship between the two, and after some brainstorming with Chris McDonough on the Zope IRC channel, I've been able to write an @generic(TypeA, TypeB, ... , TypeN) decorator that uses the Zope component registry to supply such behaviour. It's become clear to me that named multiadapters are essentially the same concept as generic functions, and in a Zope context, are actually more powerful because you can specify *interfaces* as well as concrete types as part of the function's type-signature: @generic(IFoo, IBar, TypeA, TypeB, ...). I don't know if this relationship is already known in the Zope world, and if people are already doing this? Is there any value in something like this? It's pretty 'deep' stuff, so I've written a tutorial (Chris's idea) that goes through the thought process towards writing the generic function decorator with Zope tools - please find attached. We think it might make a nice (supplementary) addition to upcoming zope.component narrative documentation (there is upcoming documentation... right?). To confirm the idea I wrote a basic little script too, which I've attached also. You can see that @generic works with types, interfaces or both - thanks to the zope.component machinery. Any thoughts would be great! Paul generic_functions_zca.rst Description: Binary data from zope.interface import implementer, Interface, implements from zope.component import getSiteManager, getMultiAdapter from zope.component import adapter class IGenericFunction(Interface): Marker interface. Any interface would do though. class IFoo(Interface): pass class IBar(Interface): pass class Foo(object): implements(IFoo) class Bar(object): implements(IBar) def generic(*type_sig): def register(gen_func): name = gen_func.__name__ def new_func(*args): obj = getMultiAdapter(args, IGenericFunction, name=name) return obj implementer(IGenericFunction)(gen_func) adapter(type_sig)(gen_func) sm = getSiteManager() sm.registerAdapter(gen_func, type_sig, name=name) new_func.__name__ = name return new_func return register if __name__ == '__main__': @generic(int, int) def funcy(a, b): return Ints: %d, %d % (a, b) @generic(str, str) def funcy(a, b): return Strings: %s, %s % (a, b) foo = Foo() bar = Bar() @generic(IFoo) def funcy(a): return I got an IFoo @generic(IBar) def funcy(a): return I got an IBar @generic(IFoo, int) def funcy(f, a): return I got an IFoo and int: %d % a print funcy(1,2) print funcy(a, b) print funcy(foo) print funcy(bar) print funcy(foo, 10) print funcy.__name__ ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.testing 3.8.6 emits deprecation warnings from itself?
Lennart Regebro wrote: zope.testing runs a lot of doctests. Lot's and lot's. In the Python 3 branch I've moved them over to using stdlibs doctest. There was two bugs that are fixed in Zopes doctest that is not fixed in Pythons doctest. Are there open issues for these in the python bug tracker? If not, could you please add them? I've added monkey-patches on import for them. :'( There's no test for that one, so I didn't know about it. I think the problem with having a sperate doctest.py is evident in the fact that there has been bugs fixed for *years* but not moved upstream. Yes, because people appear to prefer monkey patching or forking ;-) That will just leave less time between people getting warned and before it gets removed. I must say I find PendingDeprecationWarnings completely and utterly pointless. I feel the same about deprecation warnings... Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.testing 3.8.6 emits deprecation warnings from itself?
Marius Gedminas wrote: It should be simple to monkey-patch this too, by setting DocTestCase.failureException, so we can support Python 2.5 through 3.1 How mechanical can such a transformation be? Is it sufficient to replace zope.testing.doctest.DocFileSuite('foo.txt', **kw) with manuel.testing.TestSuite(manuel.doctest.Manuel(), 'foo.txt', **kw) No idea, the Manuel experts need to answer that. :) I was afraid you'd say that... I wonder if Benji missed this thread? Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] windows newslines in doctests
Benji York wrote: On Tue, Dec 29, 2009 at 2:15 PM, Chris Withers ch...@simplistix.co.uk wrote: Fred Drake wrote: It's interesting to note that Python 2.6's doctest doesn't use universal newlines, but zope.testing.doctest. Interestingly, the doctests I referred to in my original post were Manuel doctests, which (Benji, lemme know if I'm wrong...) use Python's doctest module rather than zope.testing's one, in which case I think you may have hit the nail precisely on the head... Manuel uses Python's doctest module for the actual work, but the file reading is done by Manuel itself. I could switch to using universal new line mode, but since I haven't seen an example of a filing test I can't be sure if it'll help or not. The problems I had were with tests originally authored on Windows, checked into svn without an svn:eol-style and then checked out on linux. The error message was about inconsistent line endings even though they were all consistent, just \r\n rather than \n. I had to dos2unix them and then add an svn:eol-style (which not all RCS support) to get things working properly... Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope3 and Generic Functions
Hi Paul, Nicely done! I think it'd be useful to wrap this into a small library and release it for people who want to use it, with a bit of narrative documentation on its own for the PyPI front page. One thing you may want to think about, is to have an option for delaying the registration until configuration time, and use configuration actions, so that you get conflict resolution and possibly easier debugging. You could do that using martian. The package would need to be grokked with a grok:grok package=. / directive, but don't let the word grok put you off - there's nothing Grok-the-framework-specific about martian. Cheers, Martin Paul Wilson wrote: Hi there, I've been really getting my head around Zope3 and adaption lately for a talk for my local Python usergroup. I've read quite a bit on the topic, but of particular interest was the adapter vs. generic function debate that's been doing the rounds over the last few years. See Guido van Rossum's article here: http://www.artima.com/weblogs/viewpost.jsp?thread=155123 where he concludes that generic functions are more general and useful. Further, we have Ian Bicking's Zope 3 critique where, he argues that generic functions are generally better and Martijn Faassen's comment: I agree by the way that generic methods are interesting and we should be investigating how they fit in a Zope 3 context. There is a clear relationship between the two, and after some brainstorming with Chris McDonough on the Zope IRC channel, I've been able to write an @generic(TypeA, TypeB, ... , TypeN) decorator that uses the Zope component registry to supply such behaviour. It's become clear to me that named multiadapters are essentially the same concept as generic functions, and in a Zope context, are actually more powerful because you can specify *interfaces* as well as concrete types as part of the function's type-signature: @generic(IFoo, IBar, TypeA, TypeB, ...). I don't know if this relationship is already known in the Zope world, and if people are already doing this? Is there any value in something like this? It's pretty 'deep' stuff, so I've written a tutorial (Chris's idea) that goes through the thought process towards writing the generic function decorator with Zope tools - please find attached. We think it might make a nice (supplementary) addition to upcoming zope.component narrative documentation (there is upcoming documentation... right?). To confirm the idea I wrote a basic little script too, which I've attached also. You can see that @generic works with types, interfaces or both - thanks to the zope.component machinery. Any thoughts would be great! Paul ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.testing 3.8.6 emits deprecation warnings from itself?
On Fri, Jan 1, 2010 at 23:31, Chris Withers ch...@simplistix.co.uk wrote: Lennart Regebro wrote: zope.testing runs a lot of doctests. Lot's and lot's. In the Python 3 branch I've moved them over to using stdlibs doctest. There was two bugs that are fixed in Zopes doctest that is not fixed in Pythons doctest. Are there open issues for these in the python bug tracker? If not, could you please add them? No, and Yes. Although I must say it's obvious Marius understand the issues better, so I'm hoping he will do it. :-) -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] exUserFolder and Zope 2.12
On Thursday 17 December 2009, Andrew Milton wrote: +---[ Baiju M ]-- | Hi, | In exUserFolder there are few exceptions raised like this: | | raise 'LoginRequired', self.docLogin(self, request) | | This will not working in Zope 2.12 (Python 2.6) | | Any idea, how to change it ? Replace the raise with; request.RESPONSE.setStatus(401) request.RESPONSE.setHeader('Content-Type','text/html') request.RESPONSE.write(self.docLogin(self,request)) I just tried that and it works in Firefox, Chrome and Opera but it is failing in IE and Konqueror. I tried a few versions of each of these browsers and the results are consistent. I don't see why it is failing though. I tried exactly what is up there along with also trying self.docLoginRedirect instead of docLogin. I used wireshark to watch the connection and I don't see anything wrong with it. GET /XX/manage HTTP/1.1 Host: .XX.com Connection: Keep-Alive User-Agent: Mozilla/5.0 (compatible; Konqueror/4.3; Linux) KHTML/4.3.4 (like Gecko) Pragma: no-cache Cache-control: no-cache Accept: text/html, image/jpeg;q=0.9, image/png;q=0.9, text/*;q=0.9, image/*;q=0.9, */*;q=0.8 Accept-Encoding: x-gzip, x-deflate, gzip, deflate Accept-Charset: utf-8, utf-8;q=0.5, *;q=0.5 Accept-Language: en-US, en Cookie: tree-s=XXx; __utma=XX.XX.X..X.XXX; _ZopeId=X HTTP/1.1 401 Unauthorized Date: Sat, 02 Jan 2010 05:31:47 GMT Server: Zope/(2.12.1, python 2.6.4, linux2) ZServer/1.1 Content-Type: text/html Via: 1.1 XXX..com Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked 386 HTML HEAD TITLELogging In/TITLE META HTTP-EQUIV=Expires CONTENT=2009-12-31 META HTTP-EQUIV=Refresh CONTENT=0; URL=http://XXX.X.com/X/acl_users/redirectToLogin?destination=http://.X.com//manage; /HEAD BODY !-- This is here to stop IE's default 512 byte limit from kicking in and showing us Friendly error pages. The Unenlightened Zopistas Guide to exUserFolder. (C) 2001-2003 Andrew Milton a...@theinternet.com.au 0. INTRODUCTION. exUserFolder is an extensible authentication product for the Zope Application Server. It allows a user to choose from a number of methods of authenticating their users, and allows the setting and fetching of arbitrary properties on a User object. Authentication methods, and Property methods do not have to use the same backing store, so it is possible to use legacy user sources, and -- /BODY/HTML 0 If I go to the page that the Refresh refers to in any of the browers that works fine. The raise form works fine on older versions of zope with no issues on any of these browers. Konqueror and IE will both have their icons spinning on that page like they are waiting for something. Any ideas or help would be appreciated. I have tried lots of things to get it working. ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] exUserFolder and Zope 2.12
+---[ William Heymann ]-- | | On Thursday 17 December 2009, Andrew Milton wrote: | +---[ Baiju M ]-- | | | Hi, | | In exUserFolder there are few exceptions raised like this: | | | | raise 'LoginRequired', self.docLogin(self, request) | | | | This will not working in Zope 2.12 (Python 2.6) | | | | Any idea, how to change it ? | | Replace the raise with; | | request.RESPONSE.setStatus(401) | request.RESPONSE.setHeader('Content-Type','text/html') | request.RESPONSE.write(self.docLogin(self,request)) | | | I just tried that and it works in Firefox, Chrome and Opera but it is failing | in IE and Konqueror. I tried a few versions of each of these browsers and | the results are consistent. I don't see why it is failing though. | | I tried exactly what is up there along with also trying self.docLoginRedirect | instead of docLogin. I used wireshark to watch the connection and I don't see | anything wrong with it. [SNIP] | | If I go to the page that the Refresh refers to in any of the browers that | works fine. The raise form works fine on older versions of zope with no issues | on any of these browers. Konqueror and IE will both have their icons spinning | on that page like they are waiting for something. | | Any ideas or help would be appreciated. I have tried lots of things to get | it working. Try adding more padding ... IE (not sure about Konq) has this annoying habit of giving you a nice page instead of the one we want... it used to be if the page was 512 bytes it would give you its own page... I'll try to look into it over the weekend... -- Andrew Milton a...@theinternet.com.au ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] exUserFolder and Zope 2.12
+---[ Andrew Milton ]-- | +---[ William Heymann ]-- | | | | On Thursday 17 December 2009, Andrew Milton wrote: | | +---[ Baiju M ]-- | | | | | Hi, | | | In exUserFolder there are few exceptions raised like this: | | | | | | raise 'LoginRequired', self.docLogin(self, request) | | | | | | This will not working in Zope 2.12 (Python 2.6) | | | | | | Any idea, how to change it ? | | | | Replace the raise with; | | | | request.RESPONSE.setStatus(401) | | request.RESPONSE.setHeader('Content-Type','text/html') | | request.RESPONSE.write(self.docLogin(self,request)) | | | | | | I just tried that and it works in Firefox, Chrome and Opera but it is failing | | in IE and Konqueror. I tried a few versions of each of these browsers and | | the results are consistent. I don't see why it is failing though. | | | | I tried exactly what is up there along with also trying self.docLoginRedirect | | instead of docLogin. I used wireshark to watch the connection and I don't see | | anything wrong with it. | | [SNIP] | | | | | If I go to the page that the Refresh refers to in any of the browers that | | works fine. The raise form works fine on older versions of zope with no issues | | on any of these browers. Konqueror and IE will both have their icons spinning | | on that page like they are waiting for something. | | | | Any ideas or help would be appreciated. I have tried lots of things to get | | it working. | | Try adding more padding ... | | IE (not sure about Konq) has this annoying habit of giving you a nice | page instead of the one we want... it used to be if the page was 512 | bytes it would give you its own page... | | I'll try to look into it over the weekend... I have 2.10 not 2.12, but for FF, Shiretoko (64 bit FF 3.5.5), IE7/IE8 (32 and 64 bit), Safari (4.0.4) all work fine with this method. Konquerer does seem to have an issue, but, I don't know enough about Konquerer to work out what to try. -- Andrew Milton a...@theinternet.com.au ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope-CMF] GenericSetup release?
On 2009-12-31 13:09, Jens Vagelpohl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I noticed that the last release, 1.5.0b1, is over 3 months old. Would anyone mind if I created a 1.5.0-final release? Please do. Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests