[Zope-Checkins] SVN: Zope/branches/jim-fix-zclasses/lib/python/ZClasses/_pmc.txt Added configuration of class factory.
Log message for revision 29868: Added configuration of class factory. Changed: U Zope/branches/jim-fix-zclasses/lib/python/ZClasses/_pmc.txt -=- Modified: Zope/branches/jim-fix-zclasses/lib/python/ZClasses/_pmc.txt === --- Zope/branches/jim-fix-zclasses/lib/python/ZClasses/_pmc.txt 2005-04-04 11:03:48 UTC (rev 29867) +++ Zope/branches/jim-fix-zclasses/lib/python/ZClasses/_pmc.txt 2005-04-04 11:03:57 UTC (rev 29868) @@ -63,8 +63,13 @@ C._p_changed False -Now, we can store the class in a database: +Now, we can store the class in a database. We have to be careful, +however, to use the ZClass-aware class factory so that we can find +ZClasses, which are stored in the database, rather than in modules: + import Zope2.App.ClassFactory + some_database.classFactory = Zope2.App.ClassFactory.ClassFactory + connection = some_database.open() connection.root()['C'] = C import transaction ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/jim-fix-zclasses/lib/python/ZODB/ Added ZClass-independent test of (and possible base class for)
Log message for revision 29870: Added ZClass-independent test of (and possible base class for) persistent-class support machinery. Changed: A Zope/branches/jim-fix-zclasses/lib/python/ZODB/persistentclass.py A Zope/branches/jim-fix-zclasses/lib/python/ZODB/persistentclass.txt A Zope/branches/jim-fix-zclasses/lib/python/ZODB/tests/testpersistentclass.py -=- Added: Zope/branches/jim-fix-zclasses/lib/python/ZODB/persistentclass.py === --- Zope/branches/jim-fix-zclasses/lib/python/ZODB/persistentclass.py 2005-04-04 11:04:21 UTC (rev 29869) +++ Zope/branches/jim-fix-zclasses/lib/python/ZODB/persistentclass.py 2005-04-04 11:04:27 UTC (rev 29870) @@ -0,0 +1,224 @@ +## +# +# Copyright (c) 2004 Zope Corporation and Contributors. +# All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. +# 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. +# +## +Persistent Class Support + +$Id$ + + + +# Notes: +# +# Persistent classes are non-ghostable. This has some interesting +# ramifications: +# +# - When an object is invalidated, it must reload it's state +# +# - When an object is loaded from the database, it's state must be +# loaded. Unfortunately, there isn't a clear signal when an object is +# loaded from the database. This should probably be fixed. +# +# In the mean time, we need to infer. This should be viewed as a +# short term hack. +# +# Here's the strategy we'll use: +# +# - We'll have a need to be loaded flag that we'll set in +# __new__, through an extra argument. +# +# - When setting _p_oid and _p_jar, if both are set and we need to be +# loaded, then we'll load out state. +# +# - We'll use _p_changed is None to indicate that we're in this state. +# + +class _p_DataDescr(object): +# Descr used as base for _p_ data. Data are stored in +# _p_class_dict. + +def __init__(self, name): +self.__name__ = name + +def __get__(self, inst, cls): +if inst is None: +return self + +if '__global_persistent_class_not_stored_in_DB__' in inst.__dict__: +raise AttributeError, self.__name__ +return inst._p_class_dict.get(self.__name__) + +def __set__(self, inst, v): +inst._p_class_dict[self.__name__] = v + +def __delete__(self, inst): +raise AttributeError, self.__name__ + +class _p_oid_or_jar_Descr(_p_DataDescr): +# Special descr for _p_oid and _p_jar that loads +# state when set if both are set and and _p_changed is None +# +# See notes above + +def __set__(self, inst, v): +get = inst._p_class_dict.get +if v == get(self.__name__): +return + +inst._p_class_dict[self.__name__] = v + +jar = get('_p_jar') +if (jar is not None +and get('_p_oid') is not None +and get('_p_changed') is None +): +jar.setstate(inst) + +class _p_ChangedDescr(object): +# descriptor to handle special weird emantics of _p_changed + +def __get__(self, inst, cls): +if inst is None: +return self +return inst._p_class_dict['_p_changed'] + +def __set__(self, inst, v): +if v is None: +return +inst._p_class_dict['_p_changed'] = bool(v) + +def __delete__(self, inst): +inst._p_invalidate() + +class _p_MethodDescr(object): +Provide unassignable class attributes + + +def __init__(self, func): +self.func = func + +def __get__(self, inst, cls): +if inst is None: +return cls +return self.func.__get__(inst, cls) + +def __set__(self, inst, v): +raise AttributeError, self.__name__ + +def __delete__(self, inst): +raise AttributeError, self.__name__ + + +special_class_descrs = '__dict__', '__weakref__' + +class PersistentMetaClass(type): + +_p_jar = _p_oid_or_jar_Descr('_p_jar') +_p_oid = _p_oid_or_jar_Descr('_p_oid') +_p_changed = _p_ChangedDescr() +_p_serial = _p_DataDescr('_p_serial') + +def __new__(self, name, bases, cdict, _p_changed=False): +cdict = dict([(k, v) for (k, v) in cdict.items() + if not k.startswith('_p_')]) +cdict['_p_class_dict'] = {'_p_changed': _p_changed} +return super(PersistentMetaClass, self).__new__( +self, name, bases, cdict) + +def __getnewargs__(self): +return self.__name__,
[Zope-Checkins] SVN: Zope/trunk/lib/python/AccessControl/Permissions.py - Forward port missing change from 2.7 branch. Humm, 1 year, 22 weeks ago, according to: http://thread.gmane.org/gmane.comp.web
Log message for revision 29877: - Forward port missing change from 2.7 branch. Humm, 1 year, 22 weeks ago, according to: http://thread.gmane.org/gmane.comp.web.zope.cvs/11080 Changed: U Zope/trunk/lib/python/AccessControl/Permissions.py -=- Modified: Zope/trunk/lib/python/AccessControl/Permissions.py === --- Zope/trunk/lib/python/AccessControl/Permissions.py 2005-04-04 15:39:55 UTC (rev 29876) +++ Zope/trunk/lib/python/AccessControl/Permissions.py 2005-04-05 00:35:58 UTC (rev 29877) @@ -68,3 +68,6 @@ view_history='View History' view_management_screens='View management screens' copy_or_move='Copy or Move' +webdav_access='WebDAV access' +webdav_lock_items='WebDAV Lock items' +webdav_unlock_items='WebDAV Unlock items' ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] CVS: Packages/ZODB/tests - MTStorage.py:1.10.2.2
Update of /cvs-repository/Packages/ZODB/tests In directory cvs.zope.org:/tmp/cvs-serv6932/ZODB/tests Modified Files: Tag: Zope-2_7-branch MTStorage.py Log Message: The various flavors of the ``check2ZODBThreads`` and ``check7ZODBThreads`` tests are much less likely to suffer sproadic failures now. === Packages/ZODB/tests/MTStorage.py 1.10.2.1 = 1.10.2.2 === --- Packages/ZODB/tests/MTStorage.py:1.10.2.1 Wed Sep 3 16:04:26 2003 +++ Packages/ZODB/tests/MTStorage.pyMon Apr 4 22:26:21 2005 @@ -79,23 +79,33 @@ get_transaction().commit() time.sleep(self.delay) +# Return a new PersistentMapping, and store it on the root object under +# the name (.getName()) of the current thread. def get_thread_dict(self, root): +# This is vicious: multiple threads are slamming changes into the +# root object, then trying to read the root object, simultaneously +# and without any coordination. Conflict errors are rampant. It +# used to go around at most 10 times, but that fairly often failed +# to make progress in the 7-thread tests on some test boxes. Going +# around (at most) 1000 times was enough so that a 100-thread test +# reliably passed on Tim's hyperthreaded WinXP box (but at the +# original 10 retries, the same test reliably failed with 15 threads). name = self.getName() -# arbitrarily limit to 10 re-tries -for i in range(10): +MAXRETRIES = 1000 + +for i in range(MAXRETRIES): try: -m = PersistentMapping() -root[name] = m +root[name] = PersistentMapping() get_transaction().commit() break -except ConflictError, err: -get_transaction().abort() +except ConflictError: root._p_jar.sync() -for i in range(10): + +for i in range(MAXRETRIES): try: return root.get(name) except ConflictError: -get_transaction().abort() +root._p_jar.sync() class StorageClientThread(TestThread): ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-dev] HEADS UP: QA Problems with Zope 2
Hi, as I'm the guy who clicks the build button for the Zope 2 Windows releases I have the unfortunate honor to write his complaining mail: Situation = a) Zope 2.8 as of release a2 does not run bin/test.py anymore. Neither on Linux nor on Windows. Unfortunately this is the only testrunner worked on Windows at all. Now it is broken as well. (Import problems from Five.products or something) b) The WinBuilder environment isn't version managed along the Zope branches. The change of the Zope module to Zope2 required manual changes in the WinBuilder structure that broke and didn't got detected during continous tests. (See c) Additionally the requirements of specific versions Python, ZODB, winutils etc. are hardcoded in the Makefiles right now. c) There are no nightly tests for Windows at all. I know there is some suspended effort already around. Please notice this as a friendly reminder that I'd be very lucky having those catch errors *before* Andreas makes a release and I run the tests manually. d) zopectl on windows doesn't work (it barfs about SIG_CHILD not existing). I'm not sure if it ever did or if it should. If it should not work on windows anyway, maybe we should remove it in the windows distribution ... All in all, it's a very unsatisfying situation for the Windows users, and I'm pretty scared telling anybody about the situation when I'm asked. This really has to change at least a bit. What to do == Things I can do and propose to do to make this better: -- b): I can either create branches for WinBuilders responding to the Zope Versions. Or (what I like better) I can put the WinBuilders somewhere in the Zope 2 tree to allow versioning along a branch automatically so continuous tests know where to get the WinBuilders from. c): If there is some infrastructure with the build bot around already and someone gives me pointers, I can set up nightly builds and tests on a Win2k machine over here. Additionally the tests should run on XP Server (or professional) and Win 2003 server as well. I don't have those around unfortunately + I don't have enough Visual Studio licenses around. Anyway, having at least one continuously running test is better than having none. Things I can't do anything right now on my own and need support: a) I'm not able to look into the test runners (that are not broken solely on windows) nor to look into Five integration problems. I'd love if someone could a) either fix test.py or b) deprecate it and give me the hint to some other runner that works. test.py is included and should therefore work within a release or be removed. I'm not sure what is right here. d) I have no idea about zopectl on windows. Is there some knowledge around on this? Final conclusion I have a compiled Zope 2.8a2 around here, but I'm not able to run the unit tests on it and I'm not willing to publish it therefore because I have the suspicion that this branch never has seen windows before except the one pass of unit tests before 2.8a1. Cheers, Christian -- gocept gmbh co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ 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: HEADS UP: QA Problems with Zope 2
Christian Theune wrote: a) I'm not able to look into the test runners (that are not broken solely on windows) nor to look into Five integration problems. I'd love if someone could a) either fix test.py or b) deprecate it and give me the hint to some other runner that works. test.py is included and should therefore work within a release or be removed. I'm not sure what is right here. I just added some missing files to setup.py. Could you please try again? There are still some broken z3 tests (setup works different for z3), but at least on linux test.py works now. Cheers, Yuppie ___ 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] HEADS UP: QA Problems with Zope 2
b): I can either create branches for WinBuilders responding to the Zope Versions. Or (what I like better) I can put the WinBuilders somewhere in the Zope 2 tree to allow versioning along a branch automatically so continuous tests know where to get the WinBuilders from. +1 from me on merging WinBuilders into Zope. It took me quite some time to locate it first I looked, and having it external reinforces the 2nd-class status of Windows. d) I have no idea about zopectl on windows. Is there some knowledge around on this? I recall a message from Tim saying it has never worked and probably never will. IIUC correctly, its functionality isn't as desired on Windows due to the service support. Enfold has a simple log rotation strategy I have detailed in a previous mail to this list, and we will contribute code shortly. I have on my todo list for the next week (or 2) to steer through my service changes on both the 2.7 and 2.8 brances as discussed here recently. If that goes well, the Zope3 trunk will get a look-in too :) Printing-the-contrib-form-now ly, Mark ___ 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] HEADS UP: QA Problems with Zope 2
Hi, Am Montag, den 04.04.2005, 21:12 +1000 schrieb Mark Hammond: d) I have no idea about zopectl on windows. Is there some knowledge around on this? I recall a message from Tim saying it has never worked and probably never will. IIUC correctly, its functionality isn't as desired on Windows due to the service support. Enfold has a simple log rotation strategy I have detailed in a previous mail to this list, and we will contribute code shortly. Yeah, I just wanted to try it for running 'zopectl test' but it fails earlier. Maybe it shouldn't be delivered then. I have on my todo list for the next week (or 2) to steer through my service changes on both the 2.7 and 2.8 brances as discussed here recently. If that goes well, the Zope3 trunk will get a look-in too :) Printing-the-contrib-form-now ly, Great to see some reinforcements coming in! Christian -- gocept gmbh co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ 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] post publishing hook
Am Montag, den 04.04.2005, 13:39 +0200 schrieb Florent Guillaume: Yes we need it for CPS which currently works with 2.7 (no customer is ready to move to 2.8 yet). Neither is 2.8. ;) -- gocept gmbh co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ 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] opinion: speeding up large PUT uploads
Chris McDonough [EMAIL PROTECTED] wrote: Zope's ZPublisher.HTTPRequest.HTTPRequest class has a method named processInputs. This method is responsible for parsing the body of all requests. It parses all upload bodies regardless of method: PUT, POST, GET, HEAD, etc. In doing so, it uses Python's FieldStorage module to potentially break apart multipart/* bodies into their respective parts. Every invocation of FieldStorage creates a tempfile that is a copy of the entire upload body. So in the common case, when a large file is uploaded via HTTP PUT (both DAV and external editor use PUT exclusively), here's what happens: - ZServer creates a tempfile T1 to hold the file body as it gets pulled in. - When the request makes it to the publisher, processInputs is called and it hands off tempfile T1 to FieldStorage. - FieldStorage reads the entire body and creates another tempfile T2 (an exact copy of T1*, in the case of a PUT request). - T2 is eventually put into REQUEST['BODYFILE']. (*) At least I can't imagine a case where it's not an exact copy. This is costly on large uploads. I'd like to change the top of the processInputs method to do this: if method == 'PUT': # we don't need to do any real input processing if we are # handling a PUT request. self._file = self.stdin return Can anyone think of a reason I shouldn't do this? Is stdin the medusa stream or T1 at this point ? Because for ConflictError retry we need an input that is seekable (HTTPRequest.retry does self.stdin.seek(0)). 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] Re: brain.getObject and traversal
Hi Tres, We really need to follow a deprecation-style model here: the risk of breaking major third party components is pretty high. Agreed. I see you started working on this, thanks! Since this is a bug, and it looks like it's going to be fixed with a config option, would anyone mind if I ported this code to the 2.7 branch with the option set to do whatever 2.7.5 does? The CHANGELOG should highlight the change, and include the zope.conf snippet required to restore the old behavior. We could add a deprecation warning (if that entry is activated), that the old-style option would be removed in 2.10. Sounds good to me. cheers, 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] brain.getObject and traversal
Florent Guillaume wrote: Is everyone ok with returning - the object if it can be accessed - raise Unauthorized if it can't be accessed - raise NotFound if it's not there Please don't catch any exceptions and re-raise them in a different type, just let them pass through. I specifically don't think raising a normal NotFound when the catalog has a brain that doesn't map to an object is the right thing to do. I'd much prefer a BrainHasNoMatchingObject exception or some such which is nice and clear... cheers, 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] Re: brain.getObject and traversal
Chris Withers wrote: Florent Guillaume wrote: Ok, thanks a lot to Tres for having gone ahead and done that. I just merged his branch. All 5645 tests pass (man, with Zope 3 included that's way more than before!) Did you check with Tres that his branc hwas ready to merge? ;-) Yes. 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 )
Re: [Zope-dev] HEADS UP: QA Problems with Zope 2
[Christian Theune] ... I have a compiled Zope 2.8a2 around here, but I'm not able to run the unit tests on it and I'm not willing to publish it therefore because I have the suspicion that this branch never has seen windows before except the one pass of unit tests before 2.8a1. FYI, I usually run the Zope trunk tests once a day, on WinXP. None of this goes thru WinBuilders, though -- this is doing test.py -vv --all from the root of a trunk checkout immediately after setup.py build_ext -i. The same two tests have been broken there since last October, but all other tests pass: http://www.zope.org/Collectors/Zope/1728 As recorded in the bug that points at, for related reasons an installed Zope 2.8 is probably unusable on Windows (I haven't tried this since last October -- don't see a point so long as the 1728 bug remains): http://www.zope.org/Collectors/Zope/1507 ___ 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: brain.getObject and traversal
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Withers wrote: We really need to follow a deprecation-style model here: the risk of breaking major third party components is pretty high. Agreed. I see you started working on this, thanks! Since this is a bug, and it looks like it's going to be fixed with a config option, would anyone mind if I ported this code to the 2.7 branch with the option set to do whatever 2.7.5 does? - -0. This change is not a bugfix -- this is a new feature, which changes the documented behavior of the catalog brains. It is really up to Andreas whether or not to accept such a change on the 2.7 line. The CHANGELOG should highlight the change, and include the zope.conf snippet required to restore the old behavior. We could add a deprecation warning (if that entry is activated), that the old-style option would be removed in 2.10. Tres. - -- === Tres Seaver[EMAIL PROTECTED] Zope Corporation Zope Dealers http://www.zope.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCUU1UGqWXf00rNCgRAlG7AJ4w88icN4H4pw7/ZtDSV22RlR41OACgoU9R Ia2qEpT7DHGRKY7VbwYwxrk= =NqFr -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] HEADS UP: QA Problems with Zope 2
... [Christian Theune] d) I have no idea about zopectl on windows. Is there some knowledge around on this? [Mark Hammond] I recall a message from Tim saying it has never worked and probably never will. Well, everything that builds on zdaemon is Unix-specific -- the underlying machinery uses stuff like this freely and ubiquitously: + Unix domain sockets. + os.fork() + The signals signal.SIGTERM, signal.SIGHUP, signal.SIGINT, and signal.SIGCHLD, with Unix semantics. If nothing else, it's a wonderful demonstration of how core Python allows writing wholly platform-specific code. IIUC correctly, its functionality isn't as desired on Windows due to the service support. Unix-heads certainly want it anyway; Windows-heads aren't used to anything better than the Windows services API, so they don't even bring it up. Enfold has a simple log rotation strategy I have detailed in a previous mail to this list, and we will contribute code shortly. Check it in too! Nobody is volunteering to look at your patches, and they're important. I can't make time for it myself (would if I could). I have on my todo list for the next week (or 2) to steer through my service changes on both the 2.7 and 2.8 brances as discussed here recently. If that goes well, the Zope3 trunk will get a look-in too :) The Zope3 Windows installers to date are produced via setup.py bdist_wininst, and that's all. No Windows service support, no bundling of Python, no bundling of win32all, ..., the Zope3 Windows story really has nothing in common with Zope2's so far. That's a discussion for zope3-dev, though. Printing-the-contrib-form-now ly, Thank you. Poor Mark 0.5 wink. ___ 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: HEADS UP: QA Problems with Zope 2
Tim Peters wrote: [Christian Theune] ... I have a compiled Zope 2.8a2 around here, but I'm not able to run the unit tests on it and I'm not willing to publish it therefore because I have the suspicion that this branch never has seen windows before except the one pass of unit tests before 2.8a1. FYI, I usually run the Zope trunk tests once a day, on WinXP. None of this goes thru WinBuilders, though -- this is doing test.py -vv --all from the root of a trunk checkout immediately after setup.py build_ext -i. AFAICS the problem is that *everybody* runs the tests in-place. So nobody tests if setup.py installs Zope correctly and people often forget to make sure setup.py installs newly added packages and files. Cheers, Yuppie ___ 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] HEADS UP: QA Problems with Zope 2
On Apr 4, 2005 4:53 PM, Tim Peters [EMAIL PROTECTED] wrote: Unix-heads certainly want it anyway; Windows-heads aren't used to anything better than the Windows services API, so they don't even bring it up. Well, it's not so much as API, but the fact that Windows people are used to starting a service through the control panel, and not through a python-script. After all, you don't need the python script. ;) Possibly zopectl could start the service if it's called on a windows machine, instead of trying to pretend that it runs on unix... I don't know how hard that would be. Also, I don't know how hard it would be to get rid of the unix specific things for running zopectl test and such... -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] post publishing hook
Jim Fulton wrote: Florent Guillaume wrote: I really could use a post publishing hook. Standard use case: delay indexing at the end of the request to only do it once per object even if the object has been modified 4 times. Today there's the REQUEST._hold() hack with an instance having a __del__, but this gets executed outside the main transaction, and REQUEST is already dying. I'd like a post-publishing hook that's called in the initial REQUEST and transaction. I haven't been folowing this thread, so I asked Gary what it was about. :) Based on that, I'd like to suggest: There are two possibilities: 1. A post publishing hook. I think this would be appropriate in the case where you really want to augment the publishing process. For example, I hpe someday to use something like this to provide another way (other than metal) to provide standard look and feel. Unfortunately, I think there are a lot of open issues, at least in my mind, about how something like this should work. What I had in mind was, just after Publish.publish calls result = mapply(object, request.args, request, ...) add: if hasattr(request, 'runPostPublishingHooks'): result = request.runPostPublishingHooks(result, request, response) And a simple system for registering hooks. 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] Re: [Zope2.8a2] ...to be released by tomorrow....
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 yuppie wrote: Tres Seaver wrote: I still have a notion that some improvements made on the 2.7 branch are not merged into the SVN trunk, e.g. http://cvs.zope.org/Zope/lib/python/AccessControl/Attic/ZopeGuards.py.diff?r1=1.16.2.3r2=1.16.2.4 There is some debate here whether those changes (which Jim made only relunctantly back in January 2004) should be promulgated to 2.8. We will fold them in after the alpha, if so. The link above points to an other unmerged change. I don't understand the complete change, but at least removing Python 2.1 compatibility code should also be done on the trunk. Hmm, that change hadn't landed on the gmane.org version of the checkins. I have it merged in my sandbox now, along with two apparently related changes (to the 'actual_python' and 'testZopeGuards' modules in lib/python/AccessControl/tests). Evan, do you recall whether you made related changes outside of the AccessControl package (e.g, in PythonScripts, ZPT, etc.)? Tres. - -- === Tres Seaver[EMAIL PROTECTED] Zope Corporation Zope Dealers http://www.zope.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCUYMqGqWXf00rNCgRAjEsAJ4q8c9PHFq5vYrS2XKo5yEJ1/CfjQCfVGR7 8FN4IF6GuQ0Q83y1qJj317k= =a6ji -END 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] Re: [Zope2.8a2] ...to be released by tomorrow....
Tres Seaver wrote: http://cvs.zope.org/Zope/lib/python/AccessControl/Attic/ZopeGuards.py.diff?r1=1.16.2.3r2=1.16.2.4 [...] Hmm, that change hadn't landed on the gmane.org version of the checkins. I have it merged in my sandbox now, along with two apparently related changes (to the 'actual_python' and 'testZopeGuards' modules in lib/python/AccessControl/tests). That seems to be the complete change, see http://cvs.zope.org/query?branch=Zope-2_7-branchwho=evansortby=datedate=all#results Evan, do you recall whether you made related changes outside of the AccessControl package (e.g, in PythonScripts, ZPT, etc.)? HTH, Yuppie ___ 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] opinion: speeding up large PUT uploads
On Mon, 2005-04-04 at 14:27, Dieter Maurer wrote: Even a PUT may get a multipart entity. But it never actually does in practice. Or if it does, I've never seen it. And if it did, would an implementation just store the multipart-encoded body? I suppose it could do anything, but it seems like it could be rather general and useless to allow multipart PUT bodies especially given that no one has seemed to need it in the last six years. That's what POST is for. At least, the HTTP specification does not tell anything to the contrary. No, it doesn't. Otherwise, (working) optimizations are of course welcome... This one works. ;-) - C ___ 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: ZPT: defer expression fix
Christian Heimes wrote: That's an interessting use case. Do you want me to keep the code and make up a new expression? I'm thinking about lazy:. If you have a particular use for defer: that would justify the split, please go ahead. I have no particular interest in keeping it. Cheers, Evan @ 4-am ___ 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] Re: login page problem
Hi list, never before i got such a holistic advice. thanks so much Cliff. About the 1st mail, On Sat, 02 Apr 2005 17:03:56 +0100, Cliff Ford [EMAIL PROTECTED] wrote: Customisation of the login sequence is quite difficult for Newbies because there are lots of different ways to approach the problem - you have already tried some. I suspect that trying to match what was done in PHP may be part of your problem. It would be helpful to know if your lists of users are coming from one source, like a database table, or multiple sources, like multiple tables or different databases, and whether users are unique in each district I dint want to built customized login page in 1st place. Actually this is a Govt. stores management site used in my state only bulit all in ASP. I 've to convert this into a Zope and Plone version. So i wanted to get it converted with minimun changes. But now as you say i think I should go the way Zope does it . only that i'm finding it hard to customize it in Zope. 1 the district name and their users come from 2 seperate Mysql tables. the users are unique in each district. From there you decide your zope folder structure. It could be like this: site_home |__acl_users |__district1 |__district2 or like this: site_home |__district1 ||__acl_users |__district2 ||__acl_users In the second case you would not have to worry about asking the user for the district name. In the first case you would get a district name or a user defined role for that district from a supplementary data source, like a database. So i think 2nd structure is abetter fit. Now the qusetion is how do build this district user folder structure using the database? Hope not manually, because there are 22 districts and about 15 users in each of them pluys head quarters. A combination of exUserFolder and MySQL would do. i don know about them, something like mysqluserfolder or simpleuserfolder components ? You can get information on the logged in user (Username and Roles) from the User object, so you don't need to expicitly use sessions at this stage. You should certainly not store passwords - that would be a serious breach of confidentiality. Maybe you should say what you do with the District parameter after the user has logged in. I dont need the password but do need the username and district for following pages to decide the access rights and the stores available inthe districts , also for some report labels. Giving advice or examples on ZPT and Python for an approach that is probably wrong is just too time-consuming. Cliff i dint get to know much about coding ZPT's and Script(Python) for them, from the ZPT refs and Zopebook. So wanted some simple working examples. About 2nd mail, On Sun, 03 Apr 2005 09:39:01 +0100, Cliff Ford [EMAIL PROTECTED] wrote: I have been trying to think of ways of providing specific pointers, So, assuming you have a custom login page and a custom python script that processes that page: In the Python script you could set a cookie for the District: context.REQUEST.RESPONSE.setCookie('District', district) where district is the name of the District field in the form. The District parameter is then always available to your page templates and scripts in the REQUEST object. At the end of your login script you would typically redirect to some specific page like this: return context.REQUEST.RESPONSE.redirect('aURL') in exUserFolder you don't have to do anything else - the login works by magic, which is very confusing. Are these above said things not possible in exUserFolder. how do i customize it for my problem? Now for the problems: If the login is wrong the system will call /standard_error_message, so you have to customise that to send the user back to the login form with a Login failed message. If the user bookmarks a protected page and tries to jump to it without being logged in, the system will call the login sequence starting in acl_users, so you have to customise that to call your own login page. After the user has logged in, whenever you need to get the Username you would typically use a python script like this: from AccessControl import getSecurityManager return getSecurityManager().getUser().getUserName() HTH Cliff So this is what can be done if I use exUserFolder ? Hope a reply soon. -- Share the vision of difference with ME ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate ZClasses?
Yes, but BEFORE do a tool to convert them in a python product or archetype similar, a tool to change base classes, a tool to convert a zclass based on catagaware to one based on catalogPATHaware, or merge the two. Or you just deprecate something that is used and don't deprecate some code that is obsolete by year ? :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate ZClasses?
Andreas Jung ha scritto: --On Montag, 4. April 2005 9:58 Uhr +0200 Yuri [EMAIL PROTECTED] wrote: Yes, but BEFORE do a tool to convert them in a python product or archetype similar, a tool to change base classes, a tool to convert a zclass based on catagaware to one based on catalogPATHaware, or merge the two. This would be up to the community :-) -aj As a right KeywordIndex? *grin* :P ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] script or external method ?
[EMAIL PROTECTED] wrote: Hi all, i'm a new user of Zope; i'm studing it since two weeks and i think it's very interesting, 'cause has the same power of j2ee application server but it is much more easy to use! While i was developing my first Zope application i fell into this trouble: i would like to write a script that create a folder, put some file in it, and set some properties. The code i've writed imports date object from datetime package: this makes it doesn't work like a script (python), so i adapt code as an external method; but when i run the method Zope says that he can't find symbol 'container'... (mumble) Well, 2 are the questions: First, what i've to do to get service variable like like container, context, request, etc.. ? Which are differences between script and external method coding? i remember that the zope book indicates only imports. Python scripts (the TTW kind) have security restrictions and have special procedures for setting the name and the parameters of a method. (Via the TTW forms: notice that you don't write def methodname() et al.) There are also some special names bound, like context and so forth. External methods are regular Python methods in a Python module which are made available to be used live in Zope. Just as in any Python method, you can get to the context in which it was called through the 'self' parameter, which you will define as the first param. This is the same as 'context' in a Python script. So you can say:: def getThisId(self): return self.getId() You can get the request like 'self.REQUEST'. The container can be found with self.aq_inner.aq_parent or something like that. Alternately, you can allow modules in Python scripts. See zope/lib/python/Products/PythonScripts/README or http://svn.zope.org/Zope/trunk/lib/python/Products/PythonScripts/README.txt?rev=24563view=auto --jcc ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] script or external method ?
Congratulations: You immediately ran into a limitation of Python Scripts, and then equally quickly into one of external methods. That's good, because that means you don't get stuck into the wrong way of programming. :-) The right way of doing Zope development is with filesystem python products. Not Python Scripts, not External Methods, not ZClasses and not DTML. Each of these may have their place, the best generic way is file system products. I don't know what is the best starting point nowadays, but I think doing the Boring Product tutorial still seems popular: http://www.zope.org/Members/gtk/Boring/HowTo-Boring For Zope development there is today basicaly two and a half different paths to go: One: Zope2 (which is what you started with now). This gives you access to loads of products and a huge community to support you. This is the right way to go if you are interested in using Zope for creating a web site. Primarily you have a whole bunch of different content management systems to select from (CPS, Plone and several more) to get you started. There are also blog software and wikis and stuff that can be used with these. Two: Zope3. If you are more interested in developing the system, and you want a good development framework as your reference to j2ee indicates, then Zope 3 may be the path for you. It doesn't have that much of all this modules like Zope2 does, but the development framework is SO much better. I sincerely doubt there is anything even remotely this cool anywhere else in the webworld. The drawbacks of Zope 3 is that you'll have to develop more yourself, and it is a bit harder to get started with. Two and a half: Five/Zope2.8. This is a way to use the Zope3 framework under Zope2. It's mostly of interest for people who have legacy products under Zope2. On Apr 4, 2005 12:49 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all, i'm a new user of Zope; i'm studing it since two weeks and i think it's very interesting, 'cause has the same power of j2ee application server but it is much more easy to use! While i was developing my first Zope application i fell into this trouble: i would like to write a script that create a folder, put some file in it, and set some properties. The code i've writed imports date object from datetime package: this makes it doesn't work like a script (python), so i adapt code as an external method; but when i run the method Zope says that he can't find symbol 'container'... (mumble) Well, 2 are the questions: First, what i've to do to get service variable like like container, context, request, etc.. ? Which are differences between script and external method coding? i remember that the zope book indicates only imports. Ok, thank you for reading.. Valerio -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate ZClasses?
--On Montag, 4. April 2005 10:23 Uhr +0200 Yuri [EMAIL PROTECTED] wrote: Andreas Jung ha scritto: --On Montag, 4. April 2005 9:58 Uhr +0200 Yuri [EMAIL PROTECTED] wrote: Yes, but BEFORE do a tool to convert them in a python product or archetype similar, a tool to change base classes, a tool to convert a zclass based on catagaware to one based on catalogPATHaware, or merge the two. This would be up to the community :-) -aj As a right KeywordIndex? *grin* :P ?? -aj pgpWoTd4J5aXu.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] role, user defined roles, and inclusion
Florent Guillaume wrote: When doing user.getRoles(). Because as Tres said more clearly than me, every user can do what the Anonymous role can, so it's just being consistent to express that in user.getRoles(). IMHO. Well yours is the only userfolder implementation that does. While I agree in the security short circuiting code, I think having a getRoles return Anonymous and Authenticated at the same time is bizarre... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zygopetale.py
Sounds like you're really after LDAPUserFolder :-) Chris Yahya AZZOUZ wrote: hi, i m looking for zygopetale.py ( it allow to interact with ldap). could someone send me it. thanks. ___ 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 ) -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Plone/Zope on Debian Sarge
The moral of this whole story seems to shine through: Don't install Zope from OS packages like debian, they never get it right and you will just end up getting confused ;-) cheers, Chris Andreas Pakulat wrote: On 01.Apr 2005 - 14:34:22, Peter Bittner wrote: Hi there! I am running a Debian Linux box with Debian/testing (Sarge) and I am trying to get Plone up and running. I have made a clean, new install of the whole system last week, so all packages are really up-to-date and there was no dirty installation that was updated. I have noticed that the Plone package on Debian is or was somewhat broken, but there was a notice about that on the Plone website (download page) which has disappeared. For me that looked like this problem was fixed by the package maintainer. Unfortunately still, after installing Plone (and implicitly thus Zope 2.7) Zope did not want to come up, saying: Did you read the debconf-pages that were presented to you during the installation of zope and plone? I guess not, because else you won't ask that question. Short answer: create a new Zope instance using mkzope2.7instance, check it's config and remove the '#' on the lines: products /usr/lib/zope2.7/lib/python/Products products /usr/lib/zope/lib/python/Products products $INSTANCE/Products To have Zope 2.7 find the Plone Product. The documentation of Zope and Plone will explain why you need to do that. Zope starting all instances '*' is an old/purged instance, not started Looks like Zope2.7 finds an old 2.6 instance, but I'm not sure... Andreas -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] role, user defined roles, and inclusion
Chris Withers wrote: Florent Guillaume wrote: When doing user.getRoles(). Because as Tres said more clearly than me, every user can do what the Anonymous role can, so it's just being consistent to express that in user.getRoles(). IMHO. Well yours is the only userfolder implementation that does. While I agree in the security short circuiting code, I think having a getRoles return Anonymous and Authenticated at the same time is bizarre... I understand it could be viewed that way. Anyway we haven't found any problem in doing this. I'll look if it can be removed safely. OTOH Anonymous and Authenticated really shouldn't be roles but groups, and indeed in CPS we have special groups representing Anonymous and Authenticated. That makes things *much* more orthogonal, and local roles (local group roles actually) can be used with them to assign rights. But I digress. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] RSS feed: post-processing?
Sorry Eva, You'll need to explain your problem more succintly for people to be able to help. If you really do need to scrape the urls from the text, then a combination of python's xml handling and regular expressions is probably what you're after, best done in an external method and not a python script... cheers, Chris MILLER Eva wrote: Hello, I've been puzzling over something but can't figure out a solution. I have an RSS feed providing the content behind all the links on this page: http://demo.plinkit.org/interestsideas/goodreads/booklists. There's a nice bookmarklet tool in the world called LibraryLookup that lets you check whether a book you find on Amazon or something is in your library's catalog by scraping up the ISBN and launching an ISBN catalog search. It's a javascript, really. I thought I would adapt this to create a little add-on for the stuff the bestsellers RSS brings back to my site. What I need to do is pluck out the ISBNs in the links on a page like this one: http://demo.plinkit.org/interestsideas/goodreads/sinList?synmap=Hardcove rFiction The ISBNs are all in the URLs for the book titles (isbn=Some10digitNumberHere). How would I look for a piece of text in that shape, i.e., isbn=5893193390, then, if it's there, copy and paste that piece of information into the LibraryLookup javascript I have. The end result should be that, if there's an ISBN in a feed result, an extra link appears for each entry that says something like Check the catalog, which you can click to look that book up in your own library's catalog. I've been staring at the template that formats the RSS feed to figure out whether any TAL expression would work for this. I've been playing with a short Python script, then wondering how to call it within that template, but I think I have to use regular expressions to do it. I'm sorry to be so lost on this, but I guess I am. I'd love to do something cool like this for our little Plinkit libraries. Can anyone help? I'll take anything from a broad strategy to actual code snippets (I'm a terrible programmer but a good librarian). Thanks Eva the Librarian ___ 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 ) -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] role, user defined roles, and inclusion
Florent Guillaume wrote: OTOH Anonymous and Authenticated really shouldn't be roles but groups, and indeed in CPS we have special groups representing Anonymous and Authenticated. That makes things *much* more orthogonal, and local roles (local group roles actually) can be used with them to assign rights. But I digress. I find the distinction between roles and groups to be useless ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] getting all fields from dynamic checkboxes
Phillip Hutchings wrote: You need to keep a server-side list of the checkboxes and check which ones aren't there. Web browsers don't send back checkboxes that aren't checked - it's an HTML feature. Well, server side lists don't scale. I've found keeping a hidden html input with a list of the fields I'm expecting back can help, but bear in mind that makes it more hackable... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate ZClasses?
Chris Withers escribió: Well, you know what I'm gonna say... +1 for their demise. +1 for DTML going too, oops, wait, Andreas said not to bring that up ;-) cheers, Chris Jim Fulton wrote: ZClasses are a feature that support through-the-web development. Many people have found them useful in the past, but they have some significant deficiencies, including: - They can't be managed with file-system tools, especially revision control systems like CVS and subversion. - They don't work well with Python development tools, like profilers and debugger. - They aren't being actively maintained. Most serious Zope developers stopped using them a long time ago and are frustrated that we still expend resources keeping them around. For example, the release of Zope 2.8 has been delayed by the requirement of getting ZClasses working with Zope 2.8. We could choose to deprecate ZClasses. If we deprecated them in Zope 2.8, they would still work in Zope 2.8 and Zope 2.9, but their support would be removed in Zope 2.10. Would anyone be upset if this happened? Jim Yep! Don't talk about DTML or you will be punished (sorry Andreas I can't resist myself, hehe, obviously I'm joking) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Plone/Zope on Debian Sarge
On 04.Apr 2005 - 14:02:43, Chris Withers wrote: The moral of this whole story seems to shine through: Don't install Zope from OS packages like debian, they never get it right and you will just end up getting confused ;-) Yepp, especially, since Zope is that easy to install into your home... Andreas -- Chicken Little was right. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate ZClasses?
I agree that ZClasses are not good to use. However, I have a product based on ZClasses that I wrote several years ago (after reading the printed Zope book - doh!), and it's working well for several of my clients. If future versions of Zope were to not support it, that would be a huge problem for me... unless there were some utility that would allow me to export my ZClasses to a regular file-system product. Thanks, AM ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate ZClasses?
AM Thomas escribió: I agree that ZClasses are not good to use. However, I have a product based on ZClasses that I wrote several years ago (after reading the printed Zope book - doh!), and it's working well for several of my clients. If future versions of Zope were to not support it, that would be a huge problem for me... unless there were some utility that would allow me to export my ZClasses to a regular file-system product. Thanks, AM ___ 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 ) Perhaps will be a good choice to make ZClasses as an installable product (I don't know if this is possible or not ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate ZClasses?
On Apr 4, 2005 5:14 PM, Garito [EMAIL PROTECTED] wrote: Perhaps will be a good choice to make ZClasses as an installable product (I don't know if this is possible or not Sure it is, but the problem is that supporting it in future versions of Zope very well may need changes in Zope itself. Changes that is *far* from trivial. So I think it's mostly a question of Should Zope corp put down the effort to keep ZClasses working, because, most likely nobody else can... -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: ImportError: DBTab.ClassFactories.autoClassFactory
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 TERRIEN Mickael wrote: Hello, i have the same problem with my zope running... i have seen your post at the address : http://mail.zope.org/pipermail/zope/2004-October/154258.html http://mail.zope.org/pipermail/zope/2004-October/154249.html but I don't understand your response If you can explain more your response i am really interested. Sorry for the delay. You would likely get quicker response if you had replied on the list. The DBTab product is not compatible with Zope = 2.7. Its functionality has been moved into the core, and is now configured using the normal 'zope.conf' config file (note that the sessions machinery configures the temporary storage mounted at '/temp_folder' this way). Thank you. (Excuse my english) No problem. - -- === Tres Seaver[EMAIL PROTECTED] Zope Corporation Zope Dealers http://www.zope.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCUWdjGqWXf00rNCgRAjJzAJ9dQwaFwS/0v+zekJijWqWx9bWVcwCaA8k+ zQ5SkupTJzpRuFSo09kojOU= =bjbE -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] script or external method ?
[EMAIL PROTECTED] wrote at 2005-4-4 00:49 +0200: ... The code i've writed imports date object from datetime package: this makes it doesn't work like a script (python), so i adapt code as an external method; but when i run the method Zope says that he can't find symbol 'container'... (mumble) You may use my TrustedExecutables product. It gives you PythonScripts without security restrictions (and you can forget about ExternalMethods). http://www.dieter.handshake.de/pyprojects/zope -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Potential PythonScript bug (was: Re: [Zope] question about manipulating zcatalog query results)
Ira Sher wrote at 2005-4-3 13:32 -0700: ... NameError: global name _getiter_ not defined... if sorton == 'id': res=[(row.id.split().pop(), row) for row in results] res.sort() return res This doesn't work, either, in zope 2.7.4 or 2.7.5 with python 2.3.4 and 2.3.5 respectively, as far as I can see. Thanks for taking a look at things--I'll file a bug report (this is stopping me from migrating a site into 2.7) as you suggested The strange thing is that I can do: return [o.id for o in container.Catalog()] without a problem. However, I am still using Zope 2.7.2 -- the version before the last security shakeup... If your script does not need security checks, than my TrustedExecutables might help you. It provides PythonScripts without any security restrictions -- and especially without the need for _getiter_. http://www.dieter.handshake.de/pyprojects/zope -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] getting all fields from dynamic checkboxes
Dan E wrote at 2005-4-3 17:00 -0400: Has anyone found a way to get a list of boolean values from dynamically created checkboxes. I have created a bunch of checkboxes within a repeat loop like this: input type=checkbox class=noborder name=cb_array:list:int tal:attributes=tabindex tabindex/next; checked python:test(curr_prop, 'checked', None); but when I access the cb_array from my python script, I only get the checked values (and I can no longer match the values up with the checkbox they came from). any help on this would be appreciated. You may use the :default specifier with a hidden variable to provide a value when the browser does not sent one. http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html briefly describes the request variable specifier. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: login page problem
prabuddha ray wrote at 2005-4-4 01:41 -0700: ... A combination of exUserFolder and MySQL would do. i don know about them, something like mysqluserfolder or simpleuserfolder components ? exUserFolder is something like the big brother of SimpleUserFolder -- much more complex but also much more flexible... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] role, user defined roles, and inclusion
Chris Withers wrote at 2005-4-4 14:14 +0100: Florent Guillaume wrote: OTOH Anonymous and Authenticated really shouldn't be roles but groups, and indeed in CPS we have special groups representing Anonymous and Authenticated. That makes things *much* more orthogonal, and local roles (local group roles actually) can be used with them to assign rights. But I digress. I find the distinction between roles and groups to be useless ;-) A role that does not fit well into the group concept is the Owner role. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Iron Python
I am trying to digest what if anything the introduction of Iron Python(http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742) (and Microsoft's involvement/leadership investment) will mean to Zope or in general. Thoughts? Is this positive, negative or neutral? ___ 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] Problem with Z Psycopg
I'm having a problem with Z Psycopg. From time to time (quite often) it looses the connection with the database and I get: Site Error An error was encountered while publishing this resource. Error Type: OperationalError Error Value: no connection to the server Then I have to login then close and open the connection. It then works for a while before bailing again. Does anyone know what would be causing this? Zope Version (Zope 2.7.3-0, python 2.3.4, linux2) Python Version 2.3.4 (#1, Oct 13 2004, 21:44:19) [GCC 2.95.4 20011002 (Debian prerelease)] And ZPsycopg is version 1.11 Thanks, Jason. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Iron Python
On Apr 4, 2005 11:50 PM, Brian Sullivan [EMAIL PROTECTED] wrote: I am trying to digest what if anything the introduction of Iron Python(http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742) (and Microsoft's involvement/leadership investment) will mean to Zope or in general. Thoughts? Is this positive, negative or neutral? As zope doesn't run on Iron python the impact will be small. it's nice for people that are forced to run .NET to be able to do it in Python though. And it does marginally widen .NETs appeal, but only marginally. :-) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Set MIME type using ZPT
Hi, I am using an external method to load an Image from the harddrive. The external method is as follows: from email.MIMEImage import MIMEImage ##parameters=filename def getDocument(filename): fname = '/mnt/'+filename; input = open(fname,'r') content = MIMEImage( input.read( ) ) input.close( ) return content When I try to display the content in the webpage what I actually got is all raw data of the file rather the image. So how can I convert the raw data to be dispalyed as image in the webpage. I am using ZPT to display the web page (image). If its dtml I could have used dtml-mime tag is there any equivalent to that in ZPT. Any suggestion would be a gr8 help. Ta. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem with Z Psycopg
Jason Leach wrote: I'm having a problem with Z Psycopg. From time to time (quite often) it looses the connection with the database and I get: Site Error An error was encountered while publishing this resource. Error Type: OperationalError Error Value: no connection to the server Then I have to login then close and open the connection. It then works for a while before bailing again. Does anyone know what would be causing this? Zope Version (Zope 2.7.3-0, python 2.3.4, linux2) Python Version 2.3.4 (#1, Oct 13 2004, 21:44:19) [GCC 2.95.4 20011002 (Debian prerelease)] And ZPsycopg is version 1.11 Not sure, but I can report seeing the same thing on a different setup FreeBSD 4.8 Zope 2.7.5 Python 2.3.5 psycopg 1.1.18 (linked to PostgreSQL 8.0.1 client library) (PostgreSQL server is also 8.0.1, but on FreeBSD 5.2.1) On the very same machine I also have Zope 2.6.1 Python 2.1.3 psysopg 1.0.6 (linked to an older PostgreSQL 7.2 client library) running simultaneously, connecting to the very same DBs, but it hasn't had the same connection problems. I was wondering if it might be something with psycopg and the new pgsql 8.0.1 library. What pgsql client lib is you psycopg linked to? Barry ___ 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 )