[Zope-Checkins] SVN: Zope/trunk/ - removed old-style product metadata support
Log message for revision 39763: - removed old-style product metadata support - removed all dependencies on that support Changed: U Zope/trunk/doc/CHANGES.txt U Zope/trunk/lib/python/OFS/Application.py UU Zope/trunk/lib/python/OFS/tests/testProductInit.py UU Zope/trunk/lib/python/Products/ZGadflyDA/__init__.py UU Zope/trunk/lib/python/Products/ZSQLMethods/__init__.py -=- Modified: Zope/trunk/doc/CHANGES.txt === --- Zope/trunk/doc/CHANGES.txt 2005-10-31 10:35:06 UTC (rev 39762) +++ Zope/trunk/doc/CHANGES.txt 2005-10-31 10:35:24 UTC (rev 39763) @@ -58,6 +58,9 @@ Other + - OFS Application: Removed support for long deprecated old-style product +metadata in the __init__.py of products. + - ZSQLMethod.manage_main: Moved the error message that warns of a non-existing or closed database connection next to the Connection ID dropdown and present it using red to increase its visibility. Modified: Zope/trunk/lib/python/OFS/Application.py === --- Zope/trunk/lib/python/OFS/Application.py2005-10-31 10:35:06 UTC (rev 39762) +++ Zope/trunk/lib/python/OFS/Application.py2005-10-31 10:35:24 UTC (rev 39763) @@ -734,7 +734,6 @@ path_join=os.path.join isdir=os.path.isdir exists=os.path.exists -DictType=type({}) global_dict=globals() silly=('__doc__',) @@ -755,7 +754,7 @@ # like icon images. misc_=pgetattr(product, 'misc_', {}) if misc_: -if type(misc_) is DictType: +if isinstance(misc_, dict): misc_=Misc_(product_name, misc_) Application.misc_.__dict__[product_name]=misc_ @@ -770,61 +769,11 @@ product, product_name, package_dir, app) context=ProductContext(productObject, app, product) -# Look for an 'initialize' method in the product. If it does -# not exist, then this is an old product that has never been -# updated. In that case, we will analyze the product and -# build up enough information to do initialization manually. +# Look for an 'initialize' method in the product. initmethod=pgetattr(product, 'initialize', None) if initmethod is not None: initmethod(context) -# Support old-style product metadata. Older products may -# define attributes to name their permissions, meta_types, -# constructors, etc. -permissions={} -new_permissions={} -for p in pgetattr(product, '__ac_permissions__', ()): -permission, names, default = ( -tuple(p)+('Manager',))[:3] -if names: -for name in names: -permissions[name]=permission -elif not folder_permissions.has_key(permission): -new_permissions[permission]=() - -for meta_type in pgetattr(product, 'meta_types', ()): -# Modern product initialization via a ProductContext -# adds 'product' and 'permission' keys to the meta_type -# mapping. We have to add these here for old products. -pname=permissions.get(meta_type['action'], None) -if pname is not None: -meta_type['permission']=pname -meta_type['product']=productObject.id -meta_type['visibility'] = 'Global' -meta_types.append(meta_type) - -for name,method in pgetattr( -product, 'methods', {}).items(): -if not hasattr(Folder.Folder, name): -setattr(Folder.Folder, name, method) -if name[-9:]!='__roles__': # not Just setting roles -if (permissions.has_key(name) and -not folder_permissions.has_key( -permissions[name])): -permission=permissions[name] -if new_permissions.has_key(permission): -new_permissions[permission].append(name) -else: -new_permissions[permission]=[name] - -if new_permissions: -new_permissions=new_permissions.items() -for permission, names in new_permissions: -folder_permissions[permission]=names -new_permissions.sort() -Folder.Folder.__ac_permissions__=tuple( -list(Folder.Folder.__ac_permissions__)+new_permissions) - if not doInstall(): transaction().abort() else: Modified: Zope/trunk/lib/python/OFS/tests/testProductInit.py
[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/dtml/main.dtml - don't show meta_types that don't have an action
Log message for revision 39765: - don't show meta_types that don't have an action Changed: UU Zope/trunk/lib/python/OFS/dtml/main.dtml -=- Modified: Zope/trunk/lib/python/OFS/dtml/main.dtml === --- Zope/trunk/lib/python/OFS/dtml/main.dtml2005-10-31 10:41:54 UTC (rev 39764) +++ Zope/trunk/lib/python/OFS/dtml/main.dtml2005-10-31 10:42:21 UTC (rev 39765) @@ -40,7 +40,9 @@ onChange=location.href='dtml-URL1;/'+this.options[this.selectedIndex].value option value=manage_workspace disabledSelect type to add.../option dtml-in filtered_meta_types mapping sort=name +dtml-if action option value=dtml.html_quote-action;dtml-name;/option +/dtml-if /dtml-in /select input class=form-element type=submit name=submit value= Add / Property changes on: Zope/trunk/lib/python/OFS/dtml/main.dtml ___ Name: cvs2svn:cvs-rev - 1.22 ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/philikon-zope32-integration/lib/python/ update zconfig to 2.3.1 for a zpkg-related case sensitivity fix
Log message for revision 39771: update zconfig to 2.3.1 for a zpkg-related case sensitivity fix Changed: _U Zope/branches/philikon-zope32-integration/lib/python/ -=- Property changes on: Zope/branches/philikon-zope32-integration/lib/python ___ Name: svn:externals - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3 BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/BTrees persistent svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/persistent ThreadedAsync svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/ThreadedAsync transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/transaction ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/ZopeUndo zdaemon-r 39732 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz svn://svn.zope.org/repos/main/Zope3/trunk/src/pytz zodbcode svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/BTrees persistent svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/persistent ThreadedAsync svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/ThreadedAsync transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/transaction ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/tags/3.6.0b2/src/ZopeUndo zdaemon-r 39732 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz svn://svn.zope.org/repos/main/Zope3/trunk/src/pytz zodbcode svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/ - converted ILexicon to z3 and bridged it back
Log message for revision 39790: - converted ILexicon to z3 and bridged it back - ZCTextIndex now accepts lexicons with the z3 interface Changed: UU Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/ILexicon.py UU Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/Lexicon.py U Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/ZCTextIndex.py U Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/interfaces.py UU Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/tests/testLexicon.py U Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/tests/testZCTextIndex.py -=- Modified: Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/ILexicon.py === --- Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/ILexicon.py 2005-10-31 20:27:38 UTC (rev 39789) +++ Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/ILexicon.py 2005-10-31 20:49:11 UTC (rev 39790) @@ -8,68 +8,21 @@ # THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE +# FOR A PARTICULAR PURPOSE. # ## +Lexicon z2 interfaces. -from Interface import Interface +$Id$ + -class ILexicon(Interface): -Object responsible for converting text to word identifiers. -def termToWordIds(text): -Return a sequence of ids of the words parsed from the text. +# create ILexicon +from Interface.bridge import createZope3Bridge +from interfaces import ILexicon as z3ILexicon +import ILexicon -The input text may be either a string or a list of strings. +createZope3Bridge(z3ILexicon, ILexicon, 'ILexicon') -Parse the text as if they are search terms, and skips words -that aren't in the lexicon. - - -def sourceToWordIds(text): -Return a sequence of ids of the words parsed from the text. - -The input text may be either a string or a list of strings. - -Parse the text as if they come from a source document, and -creates new word ids for words that aren't (yet) in the -lexicon. - - -def globToWordIds(pattern): -Return a sequence of ids of words matching the pattern. - -The argument should be a single word using globbing syntax, -e.g. 'foo*' meaning anything starting with 'foo'. - -Return the wids for all words in the lexicon that match the -pattern. - - -def length(): -Return the number of unique term in the lexicon. - -def get_word(wid): -Return the word for the given word id. - -Raise KeyError if the word id is not in the lexicon. - - -def get_wid(word): -Return the wird id for the given word. - -Return 0 of the word is not in the lexicon. - - -def parseTerms(text): -Pass the text through the pipeline. - -Return a list of words, normalized by the pipeline -(e.g. stopwords removed, case normalized etc.). - - -def isGlob(word): -Return true if the word is a globbing pattern. - -The word should be one of the words returned by parseTerm(). - +del createZope3Bridge +del z3ILexicon Property changes on: Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/ILexicon.py ___ Name: cvs2svn:cvs-rev - 1.4 Name: svn:keywords + Id Modified: Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/Lexicon.py === --- Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/Lexicon.py 2005-10-31 20:27:38 UTC (rev 39789) +++ Zope/branches/Zope-2_8-branch/lib/python/Products/ZCTextIndex/Lexicon.py 2005-10-31 20:49:11 UTC (rev 39790) @@ -8,10 +8,14 @@ # THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE +# FOR A PARTICULAR PURPOSE. # ## +Lexicon. +$Id$ + + import re from BTrees.IOBTree import IOBTree @@ -20,15 +24,19 @@ import ZODB from Persistence import Persistent +from zope.interface import implements -from Products.ZCTextIndex.ILexicon import ILexicon from Products.ZCTextIndex.StopDict import get_stopdict from Products.ZCTextIndex.ParseTree import QueryError from Products.ZCTextIndex.PipelineFactory import element_factory +from ILexicon import ILexicon as z2ILexicon +from interfaces import ILexicon + class
[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/ZCTextIndex/ - converted ILexicon to z3 and bridged it back
Log message for revision 39791: - converted ILexicon to z3 and bridged it back - ZCTextIndex now accepts lexicons with the z3 interface Changed: UU Zope/trunk/lib/python/Products/ZCTextIndex/ILexicon.py UU Zope/trunk/lib/python/Products/ZCTextIndex/Lexicon.py U Zope/trunk/lib/python/Products/ZCTextIndex/ZCTextIndex.py U Zope/trunk/lib/python/Products/ZCTextIndex/interfaces.py UU Zope/trunk/lib/python/Products/ZCTextIndex/tests/testLexicon.py U Zope/trunk/lib/python/Products/ZCTextIndex/tests/testZCTextIndex.py -=- Modified: Zope/trunk/lib/python/Products/ZCTextIndex/ILexicon.py === --- Zope/trunk/lib/python/Products/ZCTextIndex/ILexicon.py 2005-10-31 20:49:11 UTC (rev 39790) +++ Zope/trunk/lib/python/Products/ZCTextIndex/ILexicon.py 2005-10-31 20:49:32 UTC (rev 39791) @@ -8,68 +8,21 @@ # THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE +# FOR A PARTICULAR PURPOSE. # ## +Lexicon z2 interfaces. -from Interface import Interface +$Id$ + -class ILexicon(Interface): -Object responsible for converting text to word identifiers. -def termToWordIds(text): -Return a sequence of ids of the words parsed from the text. +# create ILexicon +from Interface.bridge import createZope3Bridge +from interfaces import ILexicon as z3ILexicon +import ILexicon -The input text may be either a string or a list of strings. +createZope3Bridge(z3ILexicon, ILexicon, 'ILexicon') -Parse the text as if they are search terms, and skips words -that aren't in the lexicon. - - -def sourceToWordIds(text): -Return a sequence of ids of the words parsed from the text. - -The input text may be either a string or a list of strings. - -Parse the text as if they come from a source document, and -creates new word ids for words that aren't (yet) in the -lexicon. - - -def globToWordIds(pattern): -Return a sequence of ids of words matching the pattern. - -The argument should be a single word using globbing syntax, -e.g. 'foo*' meaning anything starting with 'foo'. - -Return the wids for all words in the lexicon that match the -pattern. - - -def length(): -Return the number of unique term in the lexicon. - -def get_word(wid): -Return the word for the given word id. - -Raise KeyError if the word id is not in the lexicon. - - -def get_wid(word): -Return the wird id for the given word. - -Return 0 of the word is not in the lexicon. - - -def parseTerms(text): -Pass the text through the pipeline. - -Return a list of words, normalized by the pipeline -(e.g. stopwords removed, case normalized etc.). - - -def isGlob(word): -Return true if the word is a globbing pattern. - -The word should be one of the words returned by parseTerm(). - +del createZope3Bridge +del z3ILexicon Property changes on: Zope/trunk/lib/python/Products/ZCTextIndex/ILexicon.py ___ Name: cvs2svn:cvs-rev - 1.4 Name: svn:keywords + Id Modified: Zope/trunk/lib/python/Products/ZCTextIndex/Lexicon.py === --- Zope/trunk/lib/python/Products/ZCTextIndex/Lexicon.py 2005-10-31 20:49:11 UTC (rev 39790) +++ Zope/trunk/lib/python/Products/ZCTextIndex/Lexicon.py 2005-10-31 20:49:32 UTC (rev 39791) @@ -8,10 +8,14 @@ # THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE +# FOR A PARTICULAR PURPOSE. # ## +Lexicon. +$Id$ + + import re from BTrees.IOBTree import IOBTree @@ -20,15 +24,19 @@ import ZODB from Persistence import Persistent +from zope.interface import implements -from Products.ZCTextIndex.ILexicon import ILexicon from Products.ZCTextIndex.StopDict import get_stopdict from Products.ZCTextIndex.ParseTree import QueryError from Products.ZCTextIndex.PipelineFactory import element_factory +from ILexicon import ILexicon as z2ILexicon +from interfaces import ILexicon + class Lexicon(Persistent): -__implements__ = ILexicon +__implements__ = z2ILexicon +implements(ILexicon) def __init__(self, *pipeline): self._wids = OIBTree() # word - wid Property changes on:
[Zope-Checkins] SVN: Zope/trunk/lib/python/ warnings.resetwarnings() should never be called by tests.
Log message for revision 39802: warnings.resetwarnings() should never be called by tests. Doing so wipes out all the warning filters other tests may set up to suppress warnings those tests need to provoke but want to hide from the entity running the tests. This stops all the DeprecationWarnings that were displayed from the ZODB and ZEO tests when running Zope trunk's test suite. Changed: U Zope/trunk/lib/python/AccessControl/tests/testDeprecatedAPI.py U Zope/trunk/lib/python/Zope2/Startup/tests/test_warnfilter.py -=- Modified: Zope/trunk/lib/python/AccessControl/tests/testDeprecatedAPI.py === --- Zope/trunk/lib/python/AccessControl/tests/testDeprecatedAPI.py 2005-10-31 23:31:40 UTC (rev 39801) +++ Zope/trunk/lib/python/AccessControl/tests/testDeprecatedAPI.py 2005-10-31 23:43:55 UTC (rev 39802) @@ -25,10 +25,17 @@ class DeprecatedAPI(unittest.TestCase): def setUp(self): +# There is no official API to restore warning filters to a previous +# state. Here we cheat. +self.original_warning_filters = warnings.filters[:] + # We test for warnings by turning them into exceptions warnings.filterwarnings('error', category=DeprecationWarning, module='AccessControl') +def tearDown(self): +warnings.filters[:] = self.original_warning_filters + def testDeprecatedHasRole(self): # hasRole has been deprecated, we expect a warning. try: @@ -48,11 +55,6 @@ else: pass -def tearDown(self): -warnings.resetwarnings() -warnings.simplefilter(ignore, category=PendingDeprecationWarning) -warnings.simplefilter(ignore, category=OverflowWarning) - class BasicUser(DeprecatedAPI): userObject = User.SimpleUser('JoeBloke', '123', [], []) Modified: Zope/trunk/lib/python/Zope2/Startup/tests/test_warnfilter.py === --- Zope/trunk/lib/python/Zope2/Startup/tests/test_warnfilter.py 2005-10-31 23:31:40 UTC (rev 39801) +++ Zope/trunk/lib/python/Zope2/Startup/tests/test_warnfilter.py 2005-10-31 23:43:55 UTC (rev 39802) @@ -46,11 +46,12 @@ def setUp(self): if self.schema is None: TestWarnFilter.schema = getSchema() +# There is no official API to restore warning filters to a previous +# state. Here we cheat. +self.original_warning_filters = warnings.filters[:] def tearDown(self): -warnings.resetwarnings() -warnings.simplefilter(ignore, category=PendingDeprecationWarning) -warnings.simplefilter(ignore, category=OverflowWarning) +warnings.filters[:] = self.original_warning_filters def load_config_text(self, text): # We have to create a directory of our own since the existence ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Coders] Zope tests: 8 OK
Summary of messages to the zope-tests list. Period Sun Oct 30 12:01:01 2005 UTC to Mon Oct 31 12:01:01 2005 UTC. There were 8 messages: 8 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Sun Oct 30 22:31:55 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003447.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Oct 30 22:33:25 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003448.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Oct 30 22:34:55 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003449.html Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Sun Oct 30 22:36:25 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003450.html Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Oct 30 22:37:55 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003451.html Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Sun Oct 30 22:39:26 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003452.html Subject: OK : Zope-trunk Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Oct 30 22:40:56 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003453.html Subject: OK : Zope-trunk Python-2.4.2 : Linux From: Zope Unit Tests Date: Sun Oct 30 22:42:26 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003454.html ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
[Zope-Coders] Confusing code in ObjectManager manage_FTPstat
Found some lovely piece of code deep into the FTP parts of Zope 2 last saturday, one of them is truely ugly. It's listing the contents of the current and parent folders for no apparent reason (or at least, it didn't make sense either to me or Chris McDonough). The code in question is in the ``manage_FTPstat`` method of ``OFS.ObjectManager``. Tracing back the source of this code, it seems to have been (surprisingly) introduced by Jim Fulton, back in 1999. [1] Later on, Amos Latteier changed part of the code (namely ``manage_FTPlist``) to use a slightly more friendlier, yet equally confusing ``is_acquired`` method. [2] I'm now sitting here, trying to make sense of this code and wondering what was the original intention in the first place. Would anyone have a clue? [1] http://tinyurl.com/86upc [2] http://tinyurl.com/9adc5 -- Sidnei da Silva Enfold Systems, LLC. http://enfoldsystems.com ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
Re: [Zope-Coders] Re: Confusing code in ObjectManager manage_FTPstat
On Mon, Oct 31, 2005 at 10:05:45AM -0500, Jim Fulton wrote: | Sidnei da Silva wrote: | Found some lovely piece of code deep into the FTP parts of Zope 2 last | saturday, one of them is truely ugly. It's listing the contents of | the current and parent folders for no apparent reason (or at least, it | didn't make sense either to me or Chris McDonough). | | There's a comment stating the intent. Yes, but the original code does the check in a truely obscure way, at least to me. I've thought of spelling: # check to see if we are acquiring our objectValues or not if not (len(REQUEST.PARENTS) 1 and self.objectValues() == REQUEST.PARENTS[1].objectValues()): As: if self.objectValues.im_self is not self: However I'm not sure that would be the be the correct replacement. There doesn't seem to exist any test for this. | The code in question is in the ``manage_FTPstat`` method of | ``OFS.ObjectManager``. Tracing back the source of this code, it seems | to have been (surprisingly) introduced by Jim Fulton, back in | 1999. [1] | | Later on, Amos Latteier changed part of the code (namely | ``manage_FTPlist``) to use a slightly more friendlier, yet equally | confusing ``is_acquired`` method. [2] | | I'm now sitting here, trying to make sense of this code and wondering | what was the original intention in the first place. Would anyone have | a clue? | | I think the comments make this pretyu clear. The intent is to avoid | providing listings of acquired objects. In fact, the intent of both | bits of code, I think is to prevent FTP access to acquired objects. Wouldn't that be better implemented by making the same check as it's done for WebDAV and set 'maybe_webdav_client' (abusing the name) so that it sets the 'no_acquire_flag'? | I suspect that there is a clearer way to implement the intent. I have three suggestions right now: 1. change manage_FTPstat to use the same thing as manage_FTPlist (using App.Common.is_acquired, and possibly rewriting is_acquired to a simpler check) OR 2. Throw away the `is_acquired` check and replace it by a much simpler check OR 3. Setting 'maybe_webdav_client' in the request object so the object is never acquired for FTP, the same way as it's done for WebDAV. -- Sidnei da Silva Enfold Systems, LLC. http://enfoldsystems.com ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
[Zope-Coders] [Zope2.9] Schedule
Hi everyone, with Zope 2.9 and Zope 3.2 we are switching to a time-based release cycle. Major release are supposed to appear every six months (December and June). For Zope 2.9 the schedule is as follows: - 2.9 beta 1 on 2005-11-07 - 2.9 beta 2 aka RC1 on 2005-11-20 - 2.9 final on 2005-12-01 The 2.9 SVN branch will be created for the 2.9 beta 1 release. After creation the 2.9 branch will be feature-frozen and open only for bug-fixes. The trunk is then open again for new features (Zope 2.10). We are planning a bug day for Zope 2.9 and Zope 3.2 for this Friday, November 4th (somewhere on irc.freenode.net, channel to be announced). Cheers, Andreas pgpc5OLdxBvhn.pgp Description: PGP signature ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
[Zope-dev] differences in PropertyManager._setPropValue
Hello zope-dev! I have a question about PropertyManager._setPropValue in 2.6 and its changed version in 2.7-2.8. I found this revision http://svn.zope.org/Zope/trunk/lib/python/OFS/PropertyManager.py?rev=24349view=rev Why in this method added conversion to the tuple for all the lists? May be better check for 'lines','tokens' property type? I have a properties of type list, and i expect that getProperty returns the list type. This works in Zope 2.6, but broken in 2.7-2.8 -- Best regards, Victor Safronovich NauMen.NauDoc.SoftwareDeveloper http://www.naumen.ru ___ 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: differences in PropertyManager._setPropValue
Victor Safronovich wrote: I have a question about PropertyManager._setPropValue in 2.6 and its changed version in 2.7-2.8. I found this revision http://svn.zope.org/Zope/trunk/lib/python/OFS/PropertyManager.py?rev=24349view=rev Why in this method added conversion to the tuple for all the lists? May be better check for 'lines','tokens' property type? I have a properties of type list, and i expect that getProperty returns the list type. This works in Zope 2.6, but broken in 2.7-2.8 This was changed because have mutable objects stored as properties can lead to unexpected behavior. Do you mean you have a custom proprty type called list? What's your use case for it, and why can't tuple fit the bill ? Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ 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] Maintenance cycles for Zope 2.X branches
Hi, because of the fact that we are switching to a time-based release cycle for Zope 2 and Zope 3. I would like to discuss how deal with the maintenance of older branches. My idea is to support branches for one year from now on. Zope 2.7 should be maintained until the end of this year, Zope 2.8 until the release of Zope 2.10 in June 2006, Zope 2.9 until the release of Zope 2.11 in December 2006. In case of severe bugs and security problems we can think of making releases for deprecated Zope versions. We could extend the maintenance period for releases if there are some volunteers to take over the responsibility for older branches (isn't there a maintainer for the Linux 2.0 kernel? :-)) From the maintenance point of view it just a nightmare (and it takes a lot of time) to have an overview over more than two or three branches. What do you think? Andreas pgpJjtmThApxq.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] [Zope2.9] Schedule
Hi everyone, with Zope 2.9 and Zope 3.2 we are switching to a time-based release cycle. Major release are supposed to appear every six months (December and June). For Zope 2.9 the schedule is as follows: - 2.9 beta 1 on 2005-11-07 - 2.9 beta 2 aka RC1 on 2005-11-20 - 2.9 final on 2005-12-01 The 2.9 SVN branch will be created for the 2.9 beta 1 release. After creation the 2.9 branch will be feature-frozen and open only for bug-fixes. The trunk is then open again for new features (Zope 2.10). We are planning a bug day for Zope 2.9 and Zope 3.2 for this Friday, November 4th (somewhere on irc.freenode.net, channel to be announced). Cheers, Andreas pgphdcSfrc1vO.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] Memory Leak Question
Ahoy, I was poking around in _Acquisition.c, and noticed my memory usage spiked. Returning to the vanilla code (2.8.2-final), I noticed the same spike (just less pronounced). (If you refresh the page a few gazillion times this pops up). I would not categorize this as an actual bug report (I'd like to test more rigorously with a script to verify a leak), but after reading the note on Changes for 2.8.x in the to do section, I was curious: Is this a known issue? If so, has there been any headway, and can I be of any assistance in resolving it? ___ Daniel PozmanterSiteworx, Inc.703-520-1550 x209 "Festina Lente" - Gaius Julius ___ 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] Maintenance cycles for Zope 2.X branches
Andreas Jung wrote: What do you think? Sounds good to me :-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] Memory Leak Question
Nobody has yet reported a memory leak symptom against any particular piece of Zope 2.8.X yet, AFAIK. On Oct 31, 2005, at 6:34 PM, Dan Pozmanter wrote: Ahoy, I was poking around in _Acquisition.c, and noticed my memory usage spiked. Returning to the vanilla code (2.8.2-final), I noticed the same spike (just less pronounced). (If you refresh the page a few gazillion times this pops up). I would not categorize this as an actual bug report (I'd like to test more rigorously with a script to verify a leak), but after reading the note on Changes for 2.8.x in the to do section, I was curious: Is this a known issue? If so, has there been any headway, and can I be of any assistance in resolving it? ___ Daniel Pozmanter Siteworx, Inc. 703-520-1550 x209 Festina Lente - Gaius Julius ___ 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 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] Silva
I'm new in zope world. I would like to install Silva as a product in zope. When I put all core silva product to lib/python/Products cataloge unpack it an restart zope again every think seems to be good but when I want to do next step from INSALL.txt of Silva namely on add list of ZMI I choose Slva root and want to add it to zope root folder after I feed Id and Title on the Add Silva Root page and I push Add button I receive HTTP 500 - Inside Error of server Internet Explorer. Where is an reason of this error? Any hints? ___ 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] zopeXMLMethods and zope 2.8.x
I succeeded using zopeXMLMethods up to zope 2.7.8 after adapting its __init__.py (see http://mail.zope.org/pipermail/zope/2005-February/156670.html by Anton Stonor), which was necessary starting with zope 2.7.3. Trying to use this very same zopeXMLMethods product (that is with adapted __ini__.py) in zope 2.8.4, however, resulted in exactly the same error I got with the original __init__.py in zope 2.7.8 (traceback below)??? Does anybody have a solution? cb Trying to add a xsltmethod in the zmi brings the authentication dialog up and results in an unauthorized error: Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Shared.DC.Scripts.Bindings, line 311, in __call__ Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec Module Products.PageTemplates.PageTemplateFile, line 110, in _exec Module Products.PageTemplates.PageTemplate, line 104, in pt_render - PageTemplateFile at /qp/create Module TAL.TALInterpreter, line 206, in __call__ Module TAL.TALInterpreter, line 250, in interpret Module TAL.TALInterpreter, line 651, in do_loop_tal Module Products.PageTemplates.TALES, line 206, in setRepeat Module Products.PageTemplates.TALES, line 221, in evaluate - URL: create - Line 70, Column 6 - Expression: standard:'here/availableProcessors' - Names: {'container': App.ProductContext.__FactoryDispatcher__ object at 0x036A7E90, 'context': App.ProductContext.__FactoryDispatcher__ object at 0x036A7E90, 'default': Products.PageTemplates.TALES.Default instance at 0x02B8ABE8, 'here': App.ProductContext.__FactoryDispatcher__ object at 0x036A7E90, 'loop': Products.PageTemplates.TALES.SafeMapping object at 0x03710918, 'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x02B78E18, 'nothing': None, 'options': {'args': ()}, 'repeat': Products.PageTemplates.TALES.SafeMapping object at 0x03710918, 'request': HTTPRequest, URL=http://localhost:8080/qp/manage_addProduct/ZopeXMLMethods/create, 'root': Application at , 'template': PageTemplateFile at /qp/create, 'traverse_subpath': [], 'user': admin} Module Products.PageTemplates.Expressions, line 185, in __call__ Module Products.PageTemplates.Expressions, line 173, in _eval Module Products.PageTemplates.Expressions, line 127, in _eval - __traceback_info__: here Module Products.PageTemplates.Expressions, line 301, in restrictedTraverse - __traceback_info__: {'path': ['availableProcessors'], 'TraversalRequestNameStack': []} Unauthorized: You are not allowed to access 'availableProcessors' in this context ___ 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 )