[Zope-dev] Zope Tests: 5 OK
Summary of messages to the zope-tests list. Period Tue Jan 29 12:00:00 2008 UTC to Wed Jan 30 12:00:00 2008 UTC. There were 5 messages: 5 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2.7 Python-2.3.6 : Linux From: Zope Unit Tests Date: Tue Jan 29 20:51:43 EST 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009026.html Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Unit Tests Date: Tue Jan 29 20:53:13 EST 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009027.html Subject: OK : Zope-2.9 Python-2.4.4 : Linux From: Zope Unit Tests Date: Tue Jan 29 20:54:43 EST 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009028.html Subject: OK : Zope-2.10 Python-2.4.4 : Linux From: Zope Unit Tests Date: Tue Jan 29 20:56:13 EST 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009029.html Subject: OK : Zope-trunk Python-2.4.4 : Linux From: Zope Unit Tests Date: Tue Jan 29 20:57:44 EST 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009030.html ___ 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] Session concurrency problem
Hi everyone, I have come across a situation, where temporarily the session data for a user is not available. Scenario: User 1 creates some session data. While a user 2 creates also some session data, user 1's data is not accessible. The problem plays out in two ways: 1. The data's __dict__ returns an empty dictionary. When you access an attribute directly, though, the data can be seen. This symptom can be reliably reproduced. 2. Sometimes, the session package data does not have the data in it and fails with a key error. This happens maybe 1 in 50 times and I have not reliably reproduced this problem. There are no conflict errors. And when I store the data to the root folder using the client id, I never see any of the two problems. This makes me believe that the issue is contained to the session code. The only two things that seem specific to the session code is the sweeping algorithm. The comment in zope.session.session, line 192 discusses some issues of sweep, but I am not sure it is relevant. I have attached a package that demonstrates the issue. (This is one of the major benefits of having buildout and eggs!) Here is how you get the problem reproduced: tar xvzf sessionIssue2.tgz cd sessionIssue2 python2.4 bootstrap.py ./bin/buildout -N ./bin/demo fg In a separate shell: cd sessionIssue2 for number in 1 2 3 4 5 6 7 8 ;do sh sessionTest.sh;done The before and after result should always be the same. You can change the demo code to not use sessions and see that it works. You can also see the differences between accessing __dict__ and an attribute directly. So, does anyone have an idea of what is happening here? Any hints are greatly appreciated! Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. Zope Stephan Richter sessionIssue2.tgz Description: application/tgz ___ 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] Session concurrency problem
Stephan Richter wrote at 2008-1-30 08:45 -0500: ... 1. The data's __dict__ returns an empty dictionary. When you access an attribute directly, though, the data can be seen. This symptom can be reliably reproduced. This is normal for persistent objects. When a persistent object is in Ghost state, its __dict__ appears to be empty (it is empty). When you access a non special attribute, the object is unghosted and then __dict__ is filled in. 2. Sometimes, the session package data does not have the data in it and fails with a key error. This happens maybe 1 in 50 times and I have not reliably reproduced this problem. What is session package data? -- Dieter ___ 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] FileUpload and blob on Windows
Leonardo Rochael wrote at 2008-1-27 22:29 -0800: ... Closing the NamedTemporaryFile after consuming it and before opening the blob makes the matters worse, since Windows removes the file from under Blob *after* it has been consumed, so we'll have to think of a different strategy for consuming request files on Windows, but whichever strategy ends up being used, the problem remains that we cannot keep the FileUpload instance from the request open in 'w+' mode (readable and writable) while allowing the blob instance to be opened in the same request. So I'd like to ask some policy questions: 1. Is it ok to close a FileUpload instance from the request? I think this would be okay for FileUploads the sole purpose of which is to be consumed by a blob. Of course, this must not happen for other FileUpload objects -- at least not before the request is closed. 2. Alternatively, is it ok to replace it on the request with a read-only file-like object with the same contents, or maybe even force it to be read-only to begin with? I expect this to be safe for all FileUpload instances. -- Dieter ___ 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: Session concurrency problem
Hi, It's been a long day and I am way out of my league on this issue, so I will just go in off-topic mode and share a bash trick. Stephan Richter, on 2008-01-30: cd sessionIssue2 for number in 1 2 3 4 5 6 7 8 ;do sh sessionTest.sh;done You can also do: for number in $(seq 8); do sh sessionTest.sh;done Thank you and good night. :) -- Maurits van Rees | http://maurits.vanrees.org/ Work | http://zestsoftware.nl/ This is your day, don't let them take it away. [Barlow Girl] ___ 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-PAS] Problems Upgrading PluggableAuthService
I have a plone site running: Plone 2.5.5, CMF-1.6.4, Zope (Zope 2.9.8-final, python 2.4.4, freebsd6), Five 1.4.2, Python 2.4.4 (#2, Sep 26 2007, 13:07:27) [GCC 3.4.6 [FreeBSD] 20060305], PIL 1.1.6 membrane 1.0 remember 1.0 PluggableAuthService-1.4.2 The members cannot add portraits to the site, and I get the error ValueError: Property portrait: unknown type when I do a search for all users in site setup. I looked at the bug reports and found 2 that relate to this error: http://plone.org/products/remember/issues/44 http://plone.org/products/remember/issues/32 The suggested solution is to upgrade PluggableAuthService to version 1.5.2, which I did. I stopped zope, removed PluggableAuthService v 1.4.2 from the Products directory, installed the new PluggableAuthService v 1.5.2, and restarted zope. However, no one can log in now. The remember members are still alive and well, but entering the use name and password does nothing - no error, no logged event, just return to the login page. What else do I have to do to upgrade PluggableAuthService? Thanks! Mark ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
Re: [Zope-PAS] Problems Upgrading PluggableAuthService
On Jan 30, 2008, at 14:01 , Mark Phillips wrote: I looked at the bug reports and found 2 that relate to this error: http://plone.org/products/remember/issues/44 http://plone.org/products/remember/issues/32 The suggested solution is to upgrade PluggableAuthService to version 1.5.2, which I did. I stopped zope, removed PluggableAuthService v 1.4.2 from the Products directory, installed the new PluggableAuthService v 1.5.2, and restarted zope. However, no one can log in now. The remember members are still alive and well, but entering the use name and password does nothing - no error, no logged event, just return to the login page. What else do I have to do to upgrade PluggableAuthService? There are no additional steps. In a case like this I would start by manually inspecting the user folder instance to make sure the plugin registrations are still correct. It may help to enable the verbose-security setting in zope.conf and remove Unauthorized from the swallowed exceptions in the error_log object in the ZMI, you may get tracebacks that point to the issue then. If that doesn't provide enough clues I would use the Python debugger to step through the login process. jens ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
Re: [Zope-PAS] Problems Upgrading PluggableAuthService
On Wed, 2008-01-30 at 08:50 -0500, Jens Vagelpohl wrote: On Jan 30, 2008, at 14:01 , Mark Phillips wrote: I looked at the bug reports and found 2 that relate to this error: http://plone.org/products/remember/issues/44 http://plone.org/products/remember/issues/32 The suggested solution is to upgrade PluggableAuthService to version 1.5.2, which I did. I stopped zope, removed PluggableAuthService v 1.4.2 from the Products directory, installed the new PluggableAuthService v 1.5.2, and restarted zope. However, no one can log in now. The remember members are still alive and well, but entering the use name and password does nothing - no error, no logged event, just return to the login page. What else do I have to do to upgrade PluggableAuthService? There are no additional steps. In a case like this I would start by manually inspecting the user folder instance to make sure the plugin registrations are still correct. How do I do this? Through the ZMI? My apologies for being so new to zope. It may help to enable the verbose-security setting in zope.conf and remove Unauthorized from the swallowed exceptions in the error_log object in the ZMI, you may get tracebacks that point to the issue then. If that doesn't provide enough clues I would use the Python debugger to step through the login process. jens Thanks. I tried ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
Re: [Zope] ZMI in zope 2.10.5 broken
On Jan 28, 2008 4:54 PM, quizzical [EMAIL PROTECTED] wrote: Module TreeDisplay.TreeTag, line 337, in tpRenderTABLE Module zlib, line 38, in compress NameError: global name 'util' is not defined The error occurs in the 'zlib' module, which is not part of Zope, but a python library. Moreover, on my python installs, this is a C extension library, not pure python.. From what I can tell from this traceback, it appears you have a rogue zlib library on your path somewhere, Zope 2.10.5 certainly doesn't include it. -- Martijn Pieters ___ 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] ZMI in zope 2.10.5 broken
I'm not sure how the rogue file got there but it was probably while I was trying to install a non 2.5 version of python, I did have a lot of trouble installing python with zlib included, I don't know if this is a common problem. Anyway, I fixed the problem by removing and reinstalling python 2.4.4 with zlib and that has solved the problem. Zope works perfectly now. Thanks everyone for the help! Alex -- View this message in context: http://www.nabble.com/ZMI-in-zope-2.10.5-broken-tp15125493p15185129.html Sent from the Zope - General mailing list archive at Nabble.com. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Z2.log
Can instance/log/Z2.log be deleted? On restart is fresh file created? Also, is max-bytes supported for logfiles in zope.conf? Thanks, Tom ___ 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] Z2.log
On Jan 30, 2008, at 18:17 , Tom Von Lahndorff wrote: Can instance/log/Z2.log be deleted? On restart is fresh file created? Yup. Also, is max-bytes supported for logfiles in zope.conf? What's that? jens ___ 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] Z2.log
On Jan 30, 2008, at 12:28 PM, Jens Vagelpohl wrote: On Jan 30, 2008, at 18:17 , Tom Von Lahndorff wrote: Can instance/log/Z2.log be deleted? On restart is fresh file created? Yup. Also, is max-bytes supported for logfiles in zope.conf? What's that? Saw it referenced here: http://blogs.sistes.net/Garito/568 logger access level WARN #logfile # path $INSTANCE/log/Z2.log # format %(message)s #/logfile rotatelogfile path $INSTANCE/log/Z2.log format %(message)s max-bytes 5MB compression zip backup-count 0 /rotatelogfile /logger jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists -http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Z2.log
On Jan 30, 2008 12:17 PM, Tom Von Lahndorff [EMAIL PROTECTED] wrote: Also, is max-bytes supported for logfiles in zope.conf? max-bytes is supported as of ZConfig 2.5. I'm not sure what version of ZConfig is currently being used with Zope 2, but would be surprised if it weren't possible to use ZConfig 2.5 or newer (2.5.1 is available). -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Chaos is the score upon which reality is written. --Henry Miller ___ 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: Zeo and conflict resolution (was suddenly confused)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ricardo Newbery wrote: Another related question. With respect to conflict resolution, is is safe to assume that products (with _p_resolveConflict methods) in the main Zope products directory are already available to the ZEO server without any special configuration? Only if you installed the ZEO server instance from a Zope software; if you installed it via a ZODB-only installation, then the products won't be available (because they aren't shipped with the standalone ZODB tarball). Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHoLSz+gerLs4ltQ4RArsRAKCoMGGfWO3aiv4Rq+OE9OeIReVnFwCeNoQY SpUJBV25ctX2zujcPgFGDDk= =OIeH -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] Z2.log
On Jan 30, 2008 12:32 PM, Tom Von Lahndorff [EMAIL PROTECTED] wrote: Saw it referenced here: http://blogs.sistes.net/Garito/568 Ah! ZConfig 2.5 and newer include max-bytes and old-files in the basic logfile section, but Products.rotatezlogs provides more features. -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Chaos is the score upon which reality is written. --Henry Miller ___ 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 authenticating, even with emergency user
Ben Bartrum wrote at 2008-1-29 08:51 -0800: ... File /www/zope/instance2.9.1/Products/ZMySQLDA/db.py, line 89, in ? import _mysql ImportError: ld.so.1: python2.4: fatal: libmysqlclient.so.12: open failed: No such file or directory If on the command line I do: python2.4 -c 'import _mysql' I get: ImportError: ld.so.1: python2.4: fatal: libmysqlclient.so.12: open failed: No such file or directory But if I do: setenv LD_LIBRARY_PATH /usr/local/lib/ and then python2.4 -c 'import _mysql' it returns no error. So to get the same effect for Zope, I have tried this in the zope.conf: environment LD_LIBRARY_PATH /usr/local/lib/ /environment Unfortunately, this has no effect. Any ideas? This is too late. The dynamic loader looks at LD_LIBRARY_PATH on startup and then caches the value. Later modification have no effect on the current process. You need to set LD_LIBRARY_PATH before you start 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] Re: suddenly confused
Ricardo Newbery wrote at 2008-1-29 01:19 -0800: ... Apologies for jumping late in this thread but how precisely should App.FindHomes be imported? Someone else reported about a ZEO patch that does the same thing without a need to import App.FindHomes. If you have Zope installed and ZEO is running in the Zope installation (shares its code), then import App.FindHomes in sufficient to import App.FindHomes. And a related question. Any suggestions on how to support multiple product directories like a non-zeo config? I checked already and zeo.conf doesn't appear to support the products directive. App.FindHomes can be controlled via the envvar PRODUCTS_PATH. If defined, it is a pathsep separated sequence of directories where Zope should look for products. It may contain %()s patterns with from PRODUCTS_PATH, SOFTWARE_PRODUCTS and INSTANCE_PRODUCTS. In these cases, the pattern is replaced by the corresponding path. -- 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: suddenly confused
Dieter Maurer wrote: Ricardo Newbery wrote at 2008-1-29 01:19 -0800: ... Apologies for jumping late in this thread but how precisely should App.FindHomes be imported? Someone else reported about a ZEO patch that does the same thing without a need to import App.FindHomes. That's here: https://bugs.launchpad.net/zope2/+bug/143770 - C ___ 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] Zeo and conflict resolution (was suddenly confused)
Ricardo Newbery wrote at 2008-1-29 22:56 -0800: ... Another related question. With respect to conflict resolution, is is safe to assume that products (with _p_resolveConflict methods) in the main Zope products directory are already available to the ZEO server without any special configuration? Usually -- but of course not always. If you use and start ZEO from a Zope installation, then lib/python needs to be on PYTHONPATH such that ZEO finds its code and supporting packages. Then the content of lib/python/Products can be used normally as package Products. There is no magic needed for this. Of course, you can start ZEO from a non Zope installation (e.g. from a standalone ZEO installation) and then Zope's Products will be unavailable -- 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] Cant access 'real' root folder in ZMI
[EMAIL PROTECTED] wrote at 2008-1-30 14:07 +1100: ... I recently installed plone 3 on a RHEL 5 server and did some mucking around to get apache working with it. I mostly followed the 'apache-with-plone' tutotial on plone.org to do this. The way it is currently set is as follows: - Plone and zope installed on my server ( eg serverA or 10.10.10.1) running on port 8080 - DNS set to point www.me.com to serverA - Apache set to ProxyPass requests from me.com:80 to localhost:8080 (I followed the turtorial mentioned above) - My Plone site accessable from either serverA:8080 or www.me.com However, both these methods lead me straight to the plone website, not to the Zope Quick Start page and while i can access the ZMI from plone, serverA:8080/manage or www.me.com/managae, the root folder shown there is the plone site's root folder. You should ask Plone related questions on the Plone mailing list. The magic you see is the effect of an AccessRule -- installed by Plone. I hate this kind of magic and my first activity has been to get rid of it. AccessRules can be disabled by an envvar. Then, you can access the Zope Root Folder. You can then see the AccessRule and delete it. I forgot the name of the envvar. Looks at the code. -- 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] problem authenticating, even with emergency user
FWIW, it is typically better to install mysql-python with an --rpath, e.g. python setup.py build_ext --rpath=/path/to/mysql/lib python setup.py install This prevents you from ever needing to set LD_LIBRARY_PATH in programs that use the library. You might need to change the mysql-python's site.cfg file too (to be able to find mysql_config). - C Dieter Maurer wrote: Ben Bartrum wrote at 2008-1-29 08:51 -0800: ... File /www/zope/instance2.9.1/Products/ZMySQLDA/db.py, line 89, in ? import _mysql ImportError: ld.so.1: python2.4: fatal: libmysqlclient.so.12: open failed: No such file or directory If on the command line I do: python2.4 -c 'import _mysql' I get: ImportError: ld.so.1: python2.4: fatal: libmysqlclient.so.12: open failed: No such file or directory But if I do: setenv LD_LIBRARY_PATH /usr/local/lib/ and then python2.4 -c 'import _mysql' it returns no error. So to get the same effect for Zope, I have tried this in the zope.conf: environment LD_LIBRARY_PATH /usr/local/lib/ /environment Unfortunately, this has no effect. Any ideas? This is too late. The dynamic loader looks at LD_LIBRARY_PATH on startup and then caches the value. Later modification have no effect on the current process. You need to set LD_LIBRARY_PATH before you start Zope. ___ 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: Zeo and conflict resolution (was suddenly confused)
On Jan 30, 2008, at 9:32 AM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ricardo Newbery wrote: Another related question. With respect to conflict resolution, is is safe to assume that products (with _p_resolveConflict methods) in the main Zope products directory are already available to the ZEO server without any special configuration? Only if you installed the ZEO server instance from a Zope software; if you installed it via a ZODB-only installation, then the products won't be available (because they aren't shipped with the standalone ZODB tarball). Thanks. Okay, then assuming you've installed ZEO from Zope software, if your third-party product includes conflict resolution by instantiating a class defined in the Zope product directory, then is it also safe to assume that this product resolution is still available to the ZEO server? For example, if I have the following in MyProduct: from BTrees import Length class MyClass(...): _count = None def incrementCount(self): if self._count is None: self._count = Length.Length() self._count.change(1) def getCount(self): return self._count() Then do I have to make MyProduct.MyClass available to ZEO or is it enough that BTrees.Length is available? Ric ___ 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: Zeo and conflict resolution (was suddenly confused)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ricardo Newbery wrote: Okay, then assuming you've installed ZEO from Zope software, if your third-party product includes conflict resolution by instantiating a class defined in the Zope product directory, then is it also safe to assume that this product resolution is still available to the ZEO server? For example, if I have the following in MyProduct: from BTrees import Length class MyClass(...): _count = None def incrementCount(self): if self._count is None: self._count = Length.Length() self._count.change(1) def getCount(self): return self._count() Then do I have to make MyProduct.MyClass available to ZEO or is it enough that BTrees.Length is available? That is enough: the Length class derives from Persistent, which means that handle their own conflict resolution: as long as your product doss no conflict resolution of its own, it doesn't need to be imported by the storage server. Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHoM1P+gerLs4ltQ4RAhvmAJ0UFSz0EC+uO926RNIJviXl+2spWACfT62H 9CCDJ5vj+37LgnSASYUFQWw= =8qmF -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: suddenly confused
On Jan 30, 2008, at 10:42 AM, Dieter Maurer wrote: Ricardo Newbery wrote at 2008-1-29 01:19 -0800: ... Apologies for jumping late in this thread but how precisely should App.FindHomes be imported? Someone else reported about a ZEO patch that does the same thing without a need to import App.FindHomes. If you have Zope installed and ZEO is running in the Zope installation (shares its code), then import App.FindHomes in sufficient to import App.FindHomes. Any plans to incorporate either of these solutions in the next release? I would like to avoid trying to explain how to do this to users of a third-party product that needs to be accessible to ZEO. And a related question. Any suggestions on how to support multiple product directories like a non-zeo config? I checked already and zeo.conf doesn't appear to support the products directive. App.FindHomes can be controlled via the envvar PRODUCTS_PATH. If defined, it is a pathsep separated sequence of directories where Zope should look for products. It may contain %()s patterns with from PRODUCTS_PATH, SOFTWARE_PRODUCTS and INSTANCE_PRODUCTS. In these cases, the pattern is replaced by the corresponding path. Ahh... this sounds good. So, assuming App.FindHomes in imported, then all I would need to explain is how to add the necessary export lines to zeo.conf? (or maybe zeoctl?) Thanks, Ric ___ 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: Zeo and conflict resolution (was suddenly confused)
On Jan 30, 2008, at 11:17 AM, Tres Seaver wrote: Ricardo Newbery wrote: Okay, then assuming you've installed ZEO from Zope software, if your third-party product includes conflict resolution by instantiating a class defined in the Zope product directory, then is it also safe to assume that this product resolution is still available to the ZEO server? For example, if I have the following in MyProduct: from BTrees import Length class MyClass(...): _count = None def incrementCount(self): if self._count is None: self._count = Length.Length() self._count.change(1) def getCount(self): return self._count() Then do I have to make MyProduct.MyClass available to ZEO or is it enough that BTrees.Length is available? That is enough: the Length class derives from Persistent, which means that handle their own conflict resolution: as long as your product doss no conflict resolution of its own, it doesn't need to be imported by the storage server. Tres. Great, thanks. Has anyone given thought to maybe providing a more general class with conflict resolution in the core distribution? The Length class works for simple counters and I guess it can also be used for just simple assignments, but what about something more complicated, perhaps with some sort of factory defined at the moment of instantiation? Assuming this is even possible, having such a general purpose conflict resolution class defined in the Zope products directory might make it easier to distribute a third-party product that needs a little conflict resolution. Just a thought. Ric ___ 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: Zeo and conflict resolution (was suddenly confused)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ricardo Newbery wrote: Has anyone given thought to maybe providing a more general class with conflict resolution in the core distribution? The Length class works for simple counters and I guess it can also be used for just simple assignments, but what about something more complicated, perhaps with some sort of factory defined at the moment of instantiation? Assuming this is even possible, having such a general purpose conflict resolution class defined in the Zope products directory might make it easier to distribute a third-party product that needs a little conflict resolution. Just a thought. Custom CR code is *hard* to get right: most people would be better off using stock code (e.g., on of the tree types defined in the BTrees package, or Length). Those who can get it right aren't likely to need their hands held. ;) Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHoOUk+gerLs4ltQ4RAoVoAJ94hZEC5ilWk5SIqX1hooLGIw2L3gCgzS3I 1FdqO1os3thf6ArEWd1awA4= =eqVR -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Zeo and conflict resolution (was suddenly confused)
On Jan 30, 2008, at 12:59 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ricardo Newbery wrote: Has anyone given thought to maybe providing a more general class with conflict resolution in the core distribution? The Length class works for simple counters and I guess it can also be used for just simple assignments, but what about something more complicated, perhaps with some sort of factory defined at the moment of instantiation? Assuming this is even possible, having such a general purpose conflict resolution class defined in the Zope products directory might make it easier to distribute a third-party product that needs a little conflict resolution. Just a thought. Custom CR code is *hard* to get right: most people would be better off using stock code (e.g., on of the tree types defined in the BTrees package, or Length). Those who can get it right aren't likely to need their hands held. ;) I meant easier for the end user, not the developer. It's kind of complicated right now to explain how to set up a ZEO configuration to work with your third-party product. Makes it a bit of hurdle to distribute such a thing for general use. Oops, I just realized that Length won't work for simple assignments as the conflict resolution assumes it's trying to resolve a counter (which should have been obvious, I know). Is there zope core class I can use for a simple assignment, that maybe resolves conflicts by just picking the last value assigned? Ric ___ 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: Zeo and conflict resolution (was suddenly confused)
Ricardo Newbery wrote: On Jan 30, 2008, at 12:59 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ricardo Newbery wrote: Has anyone given thought to maybe providing a more general class with conflict resolution in the core distribution? The Length class works for simple counters and I guess it can also be used for just simple assignments, but what about something more complicated, perhaps with some sort of factory defined at the moment of instantiation? Assuming this is even possible, having such a general purpose conflict resolution class defined in the Zope products directory might make it easier to distribute a third-party product that needs a little conflict resolution. Just a thought. Custom CR code is *hard* to get right: most people would be better off using stock code (e.g., on of the tree types defined in the BTrees package, or Length). Those who can get it right aren't likely to need their hands held. ;) I meant easier for the end user, not the developer. It's kind of complicated right now to explain how to set up a ZEO configuration to work with your third-party product. Makes it a bit of hurdle to distribute such a thing for general use. Oops, I just realized that Length won't work for simple assignments as the conflict resolution assumes it's trying to resolve a counter (which should have been obvious, I know). Is there zope core class I can use for a simple assignment, that maybe resolves conflicts by just picking the last value assigned? There is no such thing as the last value during a conflict (only three states: what's in the database, and the two conflicting states: what connection1 says, and what connection2 says). If the values are always going to have a __cmp__ method or if they can be otherwise compared (like integers), and if you're willing to accept the highest of the three states, you might use the conflict resolution policy of Products.Transience.Transience.py.Increaser. - C ___ 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 authenticating, even with emergency user
-Original Message- From: [EMAIL PROTECTED] Sent: Wed, 30 Jan 2008 19:29:05 +0100 This is too late. The dynamic loader looks at LD_LIBRARY_PATH on startup and then caches the value. Later modification have no effect on the current process. You need to set LD_LIBRARY_PATH before you start Zope. Thank you Dieter, I think you are right, and I am going to add the LD_LIBRARY_PATH to zopectl ___ 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: Zeo and conflict resolution (was suddenly confused)
On Jan 30, 2008, at 1:39 PM, Chris McDonough wrote: Ricardo Newbery wrote: On Jan 30, 2008, at 12:59 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ricardo Newbery wrote: Has anyone given thought to maybe providing a more general class with conflict resolution in the core distribution? The Length class works for simple counters and I guess it can also be used for just simple assignments, but what about something more complicated, perhaps with some sort of factory defined at the moment of instantiation? Assuming this is even possible, having such a general purpose conflict resolution class defined in the Zope products directory might make it easier to distribute a third-party product that needs a little conflict resolution. Just a thought. Custom CR code is *hard* to get right: most people would be better off using stock code (e.g., on of the tree types defined in the BTrees package, or Length). Those who can get it right aren't likely to need their hands held. ;) I meant easier for the end user, not the developer. It's kind of complicated right now to explain how to set up a ZEO configuration to work with your third-party product. Makes it a bit of hurdle to distribute such a thing for general use. Oops, I just realized that Length won't work for simple assignments as the conflict resolution assumes it's trying to resolve a counter (which should have been obvious, I know). Is there zope core class I can use for a simple assignment, that maybe resolves conflicts by just picking the last value assigned? There is no such thing as the last value during a conflict (only three states: what's in the database, and the two conflicting states: what connection1 says, and what connection2 says). If the values are always going to have a __cmp__ method or if they can be otherwise compared (like integers), and if you're willing to accept the highest of the three states, you might use the conflict resolution policy of Products.Transience.Transience.py.Increaser. Great, that's exactly what I need. Thanks. I also noticed another interesting option for a counter at Products.Transience.Transience.Length2. Ric ___ 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 )