Re: [Zope-dev] Help review #181754
On 2010-7-21 07:32, Wolfgang Schnerring wrote: * Wichert Akkermanwich...@wiggy.net [2010-07-20 19:28]: On 2010-7-20 18:15, Christian Theune wrote: At least, WRT this bug, I don't think it's a good idea to ask explicitly for bad requests to go to the application as the test layer should model real server behaviour as closely as possible. And again it wouldn't make sense anyway as you can't pass an unparsable request to the application. I'm not sure I agree. Like everything else servers have bugs, so it can't hurt to test how your application would behave given certain server bugs. I don't think it is usually a productive assumption that lower layers fail to uphold their end of the contract. Maybe an extrapolation/hyperbole illustrates my opinion: Cosmic rays might also flip bits in your computer's RAM or disk, but I don't think it's worthwile to test how your application reacts when the python interpreter (or whoever, really) presents it with mangled data structures or objects or whatnot. And for some situations you do want to explicitly test for such things. It all depends on how critical your app is. I'm not sure I'm not the only one who has tested code with randomly broken/bit-flipped input to test robustness. Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help review #181754
On 07/21/2010 09:17 AM, Wichert Akkerman wrote: On 2010-7-21 07:32, Wolfgang Schnerring wrote: * Wichert Akkermanwich...@wiggy.net [2010-07-20 19:28]: On 2010-7-20 18:15, Christian Theune wrote: At least, WRT this bug, I don't think it's a good idea to ask explicitly for bad requests to go to the application as the test layer should model real server behaviour as closely as possible. And again it wouldn't make sense anyway as you can't pass an unparsable request to the application. I'm not sure I agree. Like everything else servers have bugs, so it can't hurt to test how your application would behave given certain server bugs. I don't think it is usually a productive assumption that lower layers fail to uphold their end of the contract. Maybe an extrapolation/hyperbole illustrates my opinion: Cosmic rays might also flip bits in your computer's RAM or disk, but I don't think it's worthwile to test how your application reacts when the python interpreter (or whoever, really) presents it with mangled data structures or objects or whatnot. And for some situations you do want to explicitly test for such things. It all depends on how critical your app is. I'm not sure I'm not the only one who has tested code with randomly broken/bit-flipped input to test robustness. That double negative confuses the hell out of me. :) However, I don't think the request of the given bug matches that requirement anyway. Christian -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Help review #181754
Hi, I just rejected issue https://bugs.edge.launchpad.net/zope.app.testing/+bug/181754 There might be room for different oppinions and if anyone would like to veto the decision, I'd welcome a discussion. Christian -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help review #181754
On 2010-7-20 17:39, Christian Theune wrote: Hi, I just rejected issue https://bugs.edge.launchpad.net/zope.app.testing/+bug/181754 There might be room for different oppinions and if anyone would like to veto the decision, I'd welcome a discussion. Your rejection contains an assumption that the request won't make it to the application. Is that assumption testable? Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help review #181754
On 07/20/2010 06:01 PM, Wichert Akkerman wrote: On 2010-7-20 17:39, Christian Theune wrote: Hi, I just rejected issue https://bugs.edge.launchpad.net/zope.app.testing/+bug/181754 There might be room for different oppinions and if anyone would like to veto the decision, I'd welcome a discussion. Your rejection contains an assumption that the request won't make it to the application. Is that assumption testable? I guess so. I think it's relatively clear that the application server should insulate the application from malignant requests. The details probably depend on the HTTP implementation. zope.server, zope.app.twisted, Paster and others might deal with this differently. Looking at the interfaces between those parts of the application it makes no sense to have syntactially invalid requests end up on the application level. At least, WRT this bug, I don't think it's a good idea to ask explicitly for bad requests to go to the application as the test layer should model real server behaviour as closely as possible. And again it wouldn't make sense anyway as you can't pass an unparsable request to the application. Christian -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help review #181754
On 2010-7-20 18:15, Christian Theune wrote: At least, WRT this bug, I don't think it's a good idea to ask explicitly for bad requests to go to the application as the test layer should model real server behaviour as closely as possible. And again it wouldn't make sense anyway as you can't pass an unparsable request to the application. I'm not sure I agree. Like everything else servers have bugs, so it can't hurt to test how your application would behave given certain server bugs. Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help review #181754
On 07/20/2010 07:28 PM, Wichert Akkerman wrote: On 2010-7-20 18:15, Christian Theune wrote: At least, WRT this bug, I don't think it's a good idea to ask explicitly for bad requests to go to the application as the test layer should model real server behaviour as closely as possible. And again it wouldn't make sense anyway as you can't pass an unparsable request to the application. I'm not sure I agree. Like everything else servers have bugs, so it can't hurt to test how your application would behave given certain server bugs. Right. IMHO this specific bug asked for would usually mean that the server breaks and can pass anything to the application. Whatever happens: the server needs to prepare a data structure to hand over to the application. If it can't do that, then there's nothing to test what happens with the application. I guess this kind of test (what happens with the application if it receives invalid data) needs to work around server/publisher components and inject data directly to application methods. Christian -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help review #181754
* Wichert Akkerman wich...@wiggy.net [2010-07-20 19:28]: On 2010-7-20 18:15, Christian Theune wrote: At least, WRT this bug, I don't think it's a good idea to ask explicitly for bad requests to go to the application as the test layer should model real server behaviour as closely as possible. And again it wouldn't make sense anyway as you can't pass an unparsable request to the application. I'm not sure I agree. Like everything else servers have bugs, so it can't hurt to test how your application would behave given certain server bugs. I don't think it is usually a productive assumption that lower layers fail to uphold their end of the contract. Maybe an extrapolation/hyperbole illustrates my opinion: Cosmic rays might also flip bits in your computer's RAM or disk, but I don't think it's worthwile to test how your application reacts when the python interpreter (or whoever, really) presents it with mangled data structures or objects or whatnot. To put it differently, yes, servers have bugs, but the place to fix them is in the server. If we can't rely on our layers/abstractions to hold, I feel we lose most if not all benefits of having them in the first place. Wolfgang ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Help!
Well, that should be all I need to say - the help system is missing from Zope 2 trunk. I don't know exactly when it disappeared but I use it occasionally as a quick way to check on stuff and Hanno didn't mention it was due to be called in Zope 2.13 Is it coming back? Charlie -- Charlie Clark Managing Director Clark Consulting Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help!
On Wed, Jun 30, 2010 at 9:44 AM, Charlie Clark charlie.cl...@clark-consulting.eu wrote: Well, that should be all I need to say - the help system is missing from Zope 2 trunk. I don't know exactly when it disappeared but I use it occasionally as a quick way to check on stuff and Hanno didn't mention it was due to be called in Zope 2.13 Ah, sorry. That's a side-effect of disabling the persistent product installation by default. If you add enable-product-installation on to your zope.conf, the help system should come back. I'll add that information to the change log. Is it coming back? I consider the help system definitely deprecated and it will go away for good at some point. It's not been updated in ages. If there's any useful information in there at all, we should move it to http://docs.zope.org/zope2/. Hanno ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help!
Am 30.06.2010, 09:57 Uhr, schrieb Hanno Schlichting ha...@hannosch.eu: Ah, sorry. That's a side-effect of disabling the persistent product installation by default. If you add enable-product-installation on to your zope.conf, the help system should come back. I'll add that information to the change log. Thanks. Is it coming back? I consider the help system definitely deprecated and it will go away for good at some point. It's not been updated in ages. If there's any useful information in there at all, we should move it to http://docs.zope.org/zope2/. It's certainly antiquated but I find it still has it's uses. And it's available offline. So if we could keep it, or something like it around that would be good, I think. Charlie -- Charlie Clark Managing Director Clark Consulting Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hanno Schlichting wrote: On Wed, Jun 30, 2010 at 9:44 AM, Charlie Clark charlie.cl...@clark-consulting.eu wrote: Well, that should be all I need to say - the help system is missing from Zope 2 trunk. I don't know exactly when it disappeared but I use it occasionally as a quick way to check on stuff and Hanno didn't mention it was due to be called in Zope 2.13 Ah, sorry. That's a side-effect of disabling the persistent product installation by default. If you add enable-product-installation on to your zope.conf, the help system should come back. I'll add that information to the change log. Is it coming back? I consider the help system definitely deprecated and it will go away for good at some point. It's not been updated in ages. If there's any useful information in there at all, we should move it to http://docs.zope.org/zope2/. We should be migrating anything useful into Sphinx form in the 'docs' subdirectory of the Zope2 tree, or the broken-out projects. We can populate docs.zope.org from those sources. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkwrPrYACgkQ+gerLs4ltQ4bJQCgvYNGAT0/Ji3Gaf7+vqfAxHuJ QmAAoKoJfM4RqDRJpeIeEZqyTsLDLnwA =T0T2 -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
On 06/03/2010 04:12 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan-Wijbrand Kolman wrote: On 6/3/10 8:40 AM, Christian Theune wrote: On 06/02/2010 05:19 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan-Wijbrand Kolman wrote: On 6/2/10 15:11 , Christian Theune wrote: Hi, the ZF needs to finish updating the copyright attributions to state that the Zope code now belongs to the foundation. I've prepared some scripts to help with monitoring which packages need to be updated and also a helper to update most cases. Can you point me to these scripts? $ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\ ~/projects/Zope/zrp $ cd zrp $ /opt/Python-2.6.5/bin/python bootstrap.pybin/buildout $ cd /path/to/other/project $ ~/projects/Zope/zrp/bin/zope-org-check-project ... $ ~/projects/Zope/zrp/bin/zope-org-fix-project ... $ ~/projects/Zope/zrp/bin/zope-org-check-project (should be empty) $ bin/test -v --all $ svn add LICENSE.txt COPYRIGHT.txt $ svn commit -m Conform to repository policy. How do you deal with packages that have broken tests due to broken dependencies? I had z3c.recipe.paster with failing tests. These failed both before and after the copyright-fix. So, assumed I could go ahead with the copyright fix itself. I do want to help out on the important copyright fixing, but I do not have the time right now to also fix each of the packages that I come across. Maybe we could/should make note of the broken packages somewhere. Perhaps if the package's tests are broken before the cleanup, we should leave the cleanup un-done. We defeinitely want to isolate the abandoned projects into a separate list, so leaving them in the nightly nag-mail list helps keep them on the radar for that. Hmm. With the goal of getting the copyright attributions up do date as soon as possible, I think running the tests is a good sanity check. If the same (amount of) tests fail after the fix as before, then I'd go ahead. I agree we should track abandoned projects, though, but I'd separate that issue from the (C) update. This needs to get to a point where we can talk about the whole repository and say it's been updated. Christian -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
On 06/02/2010 05:19 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan-Wijbrand Kolman wrote: On 6/2/10 15:11 , Christian Theune wrote: Hi, the ZF needs to finish updating the copyright attributions to state that the Zope code now belongs to the foundation. I've prepared some scripts to help with monitoring which packages need to be updated and also a helper to update most cases. Can you point me to these scripts? $ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\ ~/projects/Zope/zrp $ cd zrp $ /opt/Python-2.6.5/bin/python bootstrap.py bin/buildout $ cd /path/to/other/project $ ~/projects/Zope/zrp/bin/zope-org-check-project ... $ ~/projects/Zope/zrp/bin/zope-org-fix-project ... $ ~/projects/Zope/zrp/bin/zope-org-check-project (should be empty) $ bin/test -v --all $ svn add LICENSE.txt COPYRIGHT.txt $ svn commit -m Conform to repository policy. How do you deal with packages that have broken tests due to broken dependencies? Christian -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
On 6/3/10 8:40 AM, Christian Theune wrote: On 06/02/2010 05:19 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan-Wijbrand Kolman wrote: On 6/2/10 15:11 , Christian Theune wrote: Hi, the ZF needs to finish updating the copyright attributions to state that the Zope code now belongs to the foundation. I've prepared some scripts to help with monitoring which packages need to be updated and also a helper to update most cases. Can you point me to these scripts? $ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\ ~/projects/Zope/zrp $ cd zrp $ /opt/Python-2.6.5/bin/python bootstrap.py bin/buildout $ cd /path/to/other/project $ ~/projects/Zope/zrp/bin/zope-org-check-project ... $ ~/projects/Zope/zrp/bin/zope-org-fix-project ... $ ~/projects/Zope/zrp/bin/zope-org-check-project (should be empty) $ bin/test -v --all $ svn add LICENSE.txt COPYRIGHT.txt $ svn commit -m Conform to repository policy. How do you deal with packages that have broken tests due to broken dependencies? I had z3c.recipe.paster with failing tests. These failed both before and after the copyright-fix. So, assumed I could go ahead with the copyright fix itself. I do want to help out on the important copyright fixing, but I do not have the time right now to also fix each of the packages that I come across. Maybe we could/should make note of the broken packages somewhere. regards, jw ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan-Wijbrand Kolman wrote: On 6/3/10 8:40 AM, Christian Theune wrote: On 06/02/2010 05:19 PM, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan-Wijbrand Kolman wrote: On 6/2/10 15:11 , Christian Theune wrote: Hi, the ZF needs to finish updating the copyright attributions to state that the Zope code now belongs to the foundation. I've prepared some scripts to help with monitoring which packages need to be updated and also a helper to update most cases. Can you point me to these scripts? $ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\ ~/projects/Zope/zrp $ cd zrp $ /opt/Python-2.6.5/bin/python bootstrap.py bin/buildout $ cd /path/to/other/project $ ~/projects/Zope/zrp/bin/zope-org-check-project ... $ ~/projects/Zope/zrp/bin/zope-org-fix-project ... $ ~/projects/Zope/zrp/bin/zope-org-check-project (should be empty) $ bin/test -v --all $ svn add LICENSE.txt COPYRIGHT.txt $ svn commit -m Conform to repository policy. How do you deal with packages that have broken tests due to broken dependencies? I had z3c.recipe.paster with failing tests. These failed both before and after the copyright-fix. So, assumed I could go ahead with the copyright fix itself. I do want to help out on the important copyright fixing, but I do not have the time right now to also fix each of the packages that I come across. Maybe we could/should make note of the broken packages somewhere. Perhaps if the package's tests are broken before the cleanup, we should leave the cleanup un-done. We defeinitely want to isolate the abandoned projects into a separate list, so leaving them in the nightly nag-mail list helps keep them on the radar for that. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkwHuDcACgkQ+gerLs4ltQ6QwwCgynh6OFEUr4cj8cQURihYhAAW kjYAmwfPPpmS9EyoE2cOA+CFQZP3Q37d =6u5f -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
Hello Tres, Thursday, June 3, 2010, 4:12:07 PM, you wrote: I had z3c.recipe.paster with failing tests. These failed both before and after the copyright-fix. So, assumed I could go ahead with the copyright fix itself. I do want to help out on the important copyright fixing, but I do not have the time right now to also fix each of the packages that I come across. Maybe we could/should make note of the broken packages somewhere. TS Perhaps if the package's tests are broken before the cleanup, we should TS leave the cleanup un-done. We defeinitely want to isolate the TS abandoned projects into a separate list, so leaving them in the TS nightly nag-mail list helps keep them on the radar for that. I'd say not abandoned, but buildbot missing+other packages moved under it's ass is the case here. -- Best regards, Adam GROSZERmailto:agros...@gmail.com -- Quote of the day: Fools live to regret their words, wise men to regret their silence. - Will Henry ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Help updating the copyright attributions
Hi, the ZF needs to finish updating the copyright attributions to state that the Zope code now belongs to the foundation. I've prepared some scripts to help with monitoring which packages need to be updated and also a helper to update most cases. It still involves manual work though, as we need to check out the individual branches, run the fixers, make some manual tweaks, run the tests, and check in. The test runners currently report a bit less than 600 of those and we're kind of stalling. I'd like to ask the favor that a few of us step up to help out and fix those over a short period of time. Tres' noted that each fix takes about 5 minutes. If we find 10 people where each of us did 10 of them on a day, we'd be done in about a week. So, I'm the first one to step up to do a hundred of them until Friday 2010-06-11. Who else is joining me? Christian -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
On 6/2/10 15:11 , Christian Theune wrote: So, I'm the first one to step up to do a hundred of them until Friday 2010-06-11. Who else is joining me? I'll take a batch of ten per day until 2010-06-11. Can I just pick from the list, or will you (or someone) hand out a batch? regards, jw ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
On 6/2/10 15:11 , Christian Theune wrote: Hi, the ZF needs to finish updating the copyright attributions to state that the Zope code now belongs to the foundation. I've prepared some scripts to help with monitoring which packages need to be updated and also a helper to update most cases. Can you point me to these scripts? regards, jw ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan-Wijbrand Kolman wrote: On 6/2/10 15:11 , Christian Theune wrote: Hi, the ZF needs to finish updating the copyright attributions to state that the Zope code now belongs to the foundation. I've prepared some scripts to help with monitoring which packages need to be updated and also a helper to update most cases. Can you point me to these scripts? $ svn co svn+ssh://svn.zope.org/repos/main/zope.repositorypolicy/trunk\ ~/projects/Zope/zrp $ cd zrp $ /opt/Python-2.6.5/bin/python bootstrap.py bin/buildout $ cd /path/to/other/project $ ~/projects/Zope/zrp/bin/zope-org-check-project ... $ ~/projects/Zope/zrp/bin/zope-org-fix-project ... $ ~/projects/Zope/zrp/bin/zope-org-check-project (should be empty) $ bin/test -v --all $ svn add LICENSE.txt COPYRIGHT.txt $ svn commit -m Conform to repository policy. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkwGdowACgkQ+gerLs4ltQ5FUQCcDAnb+4OCJCqDkDIsi1jQuEVE DNQAoK08L77/AwL2Wg3VhAaZD1UIKJTF =ndm8 -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
Hi, What should I do with a package such as lovely.memcached where the copyright is currently attributed to Lovely Systems and Contributors? Just apply the fix script? regards, jw ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
Hi, Another one I'm not sure about: jquery.javascript The zope.repositorypolicy readme instructs me to remove the files that are copyright to a non-committer. So in this case I should remove the whole 'js' directory from the package I guess? regards, jw ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan-Wijbrand Kolman wrote: Hi, Another one I'm not sure about: jquery.javascript The zope.repositorypolicy readme instructs me to remove the files that are copyright to a non-committer. So in this case I should remove the whole 'js' directory from the package I guess? In this case, it would be best to check with the original authors: they may prefer to move the project to another code hosting site. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkwGjNAACgkQ+gerLs4ltQ60fwCdGzw+7yR1D9G+STlEb9Sx+sJk tv4AnR534w3DbQK1mhjqQdfNzuJYjODb =fK12 -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan-Wijbrand Kolman wrote: Hi, What should I do with a package such as lovely.memcached where the copyright is currently attributed to Lovely Systems and Contributors? Just apply the fix script? I would double-check with the original authors as found via 'svn log' / 'svn blame'. Technically, by checking into the repository, they have already done the assignment under the terms of the committer agreement, but it wouldn't hurt to verify. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkwGjS8ACgkQ+gerLs4ltQ45KwCgsSVER8nV6ktvS+wCZBhmJ1fa u9kAnRoGyQ7yjdzy/KTjxs10paPcx7PK =RrZt -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help updating the copyright attributions
On 06/02/2010 04:39 PM, Jan-Wijbrand Kolman wrote: On 6/2/10 15:11 , Christian Theune wrote: So, I'm the first one to step up to do a hundred of them until Friday 2010-06-11. Who else is joining me? I'll take a batch of ten per day until 2010-06-11. Great! Can I just pick from the list, or will you (or someone) hand out a batch? I'll copy the last list of known issues over to the wiki. Mark those that you're going after, I'd say. See: http://wiki.zope.org/ztk/ReposCopyrightUpdateList Christian -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Help! Getting there, I hope ...
Right, many thanks to those who have offered advice. I'm conscious that as I've drifted from a coding topic then I'm probably in the wrong mailing list, but everyone has been very patient up to now and I'm hoping that a fix is in sight! :) I have done a backup of the Dats.fs file (took three days!). I have used fsdump and fstest to produce listings about my Data.fs file - fsdump produced a 2.67GB textfile! I have tracked down the first entry that I believe begins all the deletes: tid=0367c03fc4325022 time=2006-08-26 08:31:45.983563 offset=749481328632 user= admin description=/library/reference/manage_delObjects If I'm right ... does that mean if I trim the Data.fs file to 749481328632 bytes long and start Zope off again, that the files should be restored? If so, does anyone know of a good way of trimming such a large binary file down to a specific size? I'm using Suse Linux as a server. Cheers, and thanks again, Kris. www.danceswithferrets.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] Help! Getting there, I hope ...
Kris Adcock wrote at 2006-9-1 09:33 +0100: Right, many thanks to those who have offered advice. I'm conscious that as I've drifted from a coding topic then I'm probably in the wrong mailing list, but everyone has been very patient up to now and I'm hoping that a fix is in sight! :) I have done a backup of the Dats.fs file (took three days!). I have used fsdump and fstest to produce listings about my Data.fs file - fsdump produced a 2.67GB textfile! I have tracked down the first entry that I believe begins all the deletes: tid=0367c03fc4325022 time=2006-08-26 08:31:45.983563 offset=749481328632 user= admin description=/library/reference/manage_delObjects You can truncate your file to the given offset. This will remove any modifications after this time. -- 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] Help! Need to extract files out of Data.fs!
Hiya, My company has been using a Zope server to store some reference material, but it has grown beyond belief, and I need to extract all the collected files (about 1.3 terabytes!) from the Data.fs into distinct files onto a different server. Unfortunately, I've run into some problems. Firstly, the FTP transfer process seems to be extremely slow, and if I try and transfer too large or deep a folder structure in one go then things grind to a halt. To beat this I've been carefully recreating the folder structure manually, and copying things in easier-to-digest chunks. Unfortunately, because I was a bit rushed over the weekend I have accidentally deleted about 130,000 files! I've tried going through the Undo procedure, but the idea of manually ticking 130,000 boxes (in pages of 20) and undoing them fills me with dread. So ... Please please /please/ does anyone happen to have the file format for the Data.fs file so that I could write a C program to extract and recreate the files and folders to another server? Or has anyone written such a program already? If so, I'll happily have your children if you can help me out! As it stands, I'm going to have to break it to the librarian (the poor man who has been collating all the reference material for the last six months) that I've lost half of his work, and blaming it on the poor FTP client in Windows seems a bit lame! If it helps: I'm running Zope 2.9.2 on a SuSE Linux box. I have full access to the Linux box ... and a large hammer, if I need it! :( Help! Many thanks in advance, Kris (considering giving up this computing job and going to live in a cave somewhere). ___ 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] Help! Need to extract files out of Data.fs!
Kris, I assume you have a backup of the Data.fs. If you do, nothing is really lost. Have you compressed the Data.fs? There is an option in the control panel to do this. I can be run on a live machine, but you may not want to do so given the size of stuff. I'd do it on a quiet machine. This will remove any cruft you have in the Data.fs and will improve your speed of access somewhat, Things are probably slow because of swapping. Reducing the size of Data.fs may speed things up. Take a look at the documentation for the ZODB (Google is your friend). You could write a program in Python to simply open the ZODB and extract the files you need. It might save a bit of overhead. Remember 1.3TB is a large file and is going to take some time to process no matter what. On Mon, 28 Aug 2006, Kris Adcock wrote: Hiya, My company has been using a Zope server to store some reference material, but it has grown beyond belief, and I need to extract all the collected files (about 1.3 terabytes!) from the Data.fs into distinct files onto a different server. Unfortunately, I've run into some problems. Firstly, the FTP transfer process seems to be extremely slow, and if I try and transfer too large or deep a folder structure in one go then things grind to a halt. To beat this I've been carefully recreating the folder structure manually, and copying things in easier-to-digest chunks. Unfortunately, because I was a bit rushed over the weekend I have accidentally deleted about 130,000 files! I've tried going through the Undo procedure, but the idea of manually ticking 130,000 boxes (in pages of 20) and undoing them fills me with dread. So ... Please please /please/ does anyone happen to have the file format for the Data.fs file so that I could write a C program to extract and recreate the files and folders to another server? Or has anyone written such a program already? If so, I'll happily have your children if you can help me out! As it stands, I'm going to have to break it to the librarian (the poor man who has been collating all the reference material for the last six months) that I've lost half of his work, and blaming it on the poor FTP client in Windows seems a bit lame! If it helps: I'm running Zope 2.9.2 on a SuSE Linux box. I have full access to the Linux box ... and a large hammer, if I need it! :( Help! Many thanks in advance, Kris (considering giving up this computing job and going to live in a cave somewhere). ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) -- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help! Need to extract files out of Data.fs!
One more thing, what does the disk where the Data.fs resides look like? On Mon, 28 Aug 2006, Dennis Allison wrote: Kris, I assume you have a backup of the Data.fs. If you do, nothing is really lost. Have you compressed the Data.fs? There is an option in the control panel to do this. I can be run on a live machine, but you may not want to do so given the size of stuff. I'd do it on a quiet machine. This will remove any cruft you have in the Data.fs and will improve your speed of access somewhat, Things are probably slow because of swapping. Reducing the size of Data.fs may speed things up. Take a look at the documentation for the ZODB (Google is your friend). You could write a program in Python to simply open the ZODB and extract the files you need. It might save a bit of overhead. Remember 1.3TB is a large file and is going to take some time to process no matter what. On Mon, 28 Aug 2006, Kris Adcock wrote: Hiya, My company has been using a Zope server to store some reference material, but it has grown beyond belief, and I need to extract all the collected files (about 1.3 terabytes!) from the Data.fs into distinct files onto a different server. Unfortunately, I've run into some problems. Firstly, the FTP transfer process seems to be extremely slow, and if I try and transfer too large or deep a folder structure in one go then things grind to a halt. To beat this I've been carefully recreating the folder structure manually, and copying things in easier-to-digest chunks. Unfortunately, because I was a bit rushed over the weekend I have accidentally deleted about 130,000 files! I've tried going through the Undo procedure, but the idea of manually ticking 130,000 boxes (in pages of 20) and undoing them fills me with dread. So ... Please please /please/ does anyone happen to have the file format for the Data.fs file so that I could write a C program to extract and recreate the files and folders to another server? Or has anyone written such a program already? If so, I'll happily have your children if you can help me out! As it stands, I'm going to have to break it to the librarian (the poor man who has been collating all the reference material for the last six months) that I've lost half of his work, and blaming it on the poor FTP client in Windows seems a bit lame! If it helps: I'm running Zope 2.9.2 on a SuSE Linux box. I have full access to the Linux box ... and a large hammer, if I need it! :( Help! Many thanks in advance, Kris (considering giving up this computing job and going to live in a cave somewhere). ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) -- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help! Need to extract files out of Data.fs!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28 Aug 2006, at 22:33, Dennis Allison wrote: Have you compressed the Data.fs? There is an option in the control panel to do this. I can be run on a live machine, but you may not want to do so given the size of stuff. I'd do it on a quiet machine. This will remove any cruft you have in the Data.fs and will improve your speed of access somewhat, Things are probably slow because of swapping. Reducing the size of Data.fs may speed things up. Umh, packing the database is something you expressly *do not want to do* in this situation, because that will immediately destroy the Undo history which currently allows him access to the deleted items. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFE81pMRAx5nvEhZLIRAt3KAJ4lzO25kjckhX3+WKeUqqGOXuyDWQCdF1Ya tWJpfMlJCIdP8EfdlXr8Nio= =mJU8 -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] Help! Need to extract files out of Data.fs!
--- Dennis Allison [EMAIL PROTECTED] wrote: Kris, I assume you have a backup of the Data.fs. If you do, nothing is really lost. Have you compressed the Data.fs? There is an option in the control panel Wouldn't this remove all the deleted files? Or is compression different to packing? Cheers, Kris. ___ 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] Help with two strange errors.
I'm pretty much finished with my WSGI-implementation for Zope2, and everything works just fine, even with twisted. Except that I get one highly bizarre test failure in PythonScripts! In my branch (but not in trunk) the test that you can't import certain modules in PythonScripts fails. It makes a python script that imports mmap. This fails in my branch but, and here is the bizarre part, only if you have twisted installed. Yeah, really. Any insight into this would be helpful... Also, the ZServer test seems to leave cruft behind. Possibly a thread, that the gets detected by the zope.server tests, because it will complain that a thread is left behind by those test, while if I skip the ZServer tests with -t '!ZServer' it works fine. Does anybody with more experience of those things have any good idea of how to debug that? -- 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] Help: __getstate__ overriding
Tim Peters [EMAIL PROTECTED] writes: That adds something to the BTree that is bound to an attribute of articleDb, but still doesn't set _p_changed on articleDb (mutating the BTree does not mutate the object containing the BTree). So far as the *database* is concerned, there's still no path from the root object to the BTree your __setstate__() created, so the BTree never gets committed. So the BTree is not registered with the database until _p_changed and a commit? After that first commit, the BTree is registered as reachable and then when just the BTree is _p_changed I get my changes saved. Right? Calling __setstate__ as a side effect of a persistent load does not, by itself, support making changes that persist. It apparently wasn't designed to, either (see the other msgs in this thread, particularly from ChrisM). I can understand the reasoning behind it, in the way that you don't want nothing to change on disk when you logically haven't called a mutating method on your object, just loaded it. But I do think it is badly broken to not save the changes when I have made additional changes to the state of the object after load time. Why not just take the performance hit and be done with it? What do other object databases do with schema migration issues, f.ex. GemStone? Now well, I believe I understand why this happens and that is a very good thing! Thanks to all who have helped me in gaining a better understanding of ZODB. ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
Tim Peters wrote at 2004-5-31 20:49 -0400: ... Perhaps we could say that if it returns True, then the object should be considered to be in the changed state rather than in the uptodate state. +1 -- Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
Tim Peters [EMAIL PROTECTED] writes: [Syver Enstad, wants to switch an attribute of a Persitent subclass From PersistentList to an IOBTree] [Tim, guessing] Quick guess (untested, untried, ... ... Perhaps shuffling the code around would work, a la: Persistent.__setstate__(self, state) articleList = state.get('_articleList') if articleList is not None: # make the BTree in local oidsToArticles as above, then del self._articlelist self._oidsToArticles = oidsToArticles The thinking there is that then you've truly modified self, after self has been activated. Nope, sorry, not a chance. You have truly modified self then, but __setstate__ is called by magic as part of activation (unghostifying), and the activation machinery resets self._p_changed after it calls __setstate__. So same result as your code: the in-memory version of self has the BTree, but commit() doesn't change anything about self in the database (again because self._p_changed is false -- and will be no matter what you try to do in __setstate__()). I was aware that __setstate__ doesn't allow me to commit my changes after only loading the object into memory (__setstate__ is called). I may have explained myself unclearly (not a native english speaker/writer), the problem is that it won't save my changes when I add more items to the _oidsToArticles BTree long after __setstate__ time. Example code: # articleDb is an ArticleDb and has the __setstate__ method articleDb = connection.root()['articledb'] for each in articleDb.articles() # loop through all article print each computer = Computer(1030) articleDb.addArticle(computer) connection.commit() # nothing is saved Everything works smoothly until connection.commit(). The __setstate__ method correctly converts to using the BTree and the addArticle method adds a new computer to ArticleDb. If I instead create a new ArticleDb instance with the BTree instead of using __setstate__ the new computer is saved as it should. In none of the cases is articleDb._p_changed == True, but when the ArticleDb is created cleanly instead of upgraded, commit works anyway. Since this works if the object that holds _oidsToArticles is created from scratch, it seems that ZODB isn't properly aware of the _oidsToArticles attribute since it was created in __setstate__ instead of in __init__. I would really like to know exactly what happens here as the reason I am utilizing an object database is to be able to refactor the database with a minimum of fuss, and I would expect __setstate__ to allow me to make additional attributes in my instances. ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
[Syver Enstad] I was aware that __setstate__ doesn't allow me to commit my changes after only loading the object into memory (__setstate__ is called). I may have explained myself unclearly (not a native english speaker/writer), I don't think that matters much: English instead of code is always ambiguous, even for native writers. the problem is that it won't save my changes when I add more items to the _oidsToArticles BTree long after __setstate__ time. Right. I tried to explain that in my first reply. It's expected. You have to get _p_changed set on your *object*. It doesn't matter how much you mutate new objects attached *to* the object you loaded, you have to get _p_changed set to 1 on the original object. Example code: # articleDb is an ArticleDb and has the __setstate__ method articleDb = connection.root()['articledb'] At this point articleDb._p_changed is not 1, and nothing you do later changes this fact. for each in articleDb.articles() # loop through all article print each It's obvious that this doesn't set articleDb._p_changed, right? computer = Computer(1030) articleDb.addArticle(computer) That adds something to the BTree that is bound to an attribute of articleDb, but still doesn't set _p_changed on articleDb (mutating the BTree does not mutate the object containing the BTree). So far as the *database* is concerned, there's still no path from the root object to the BTree your __setstate__() created, so the BTree never gets committed. If you do articleDb._p_changed = 1 at this point too, then your changes will get stored. connection.commit() # nothing is saved Right. As far as the persistence machinery is concerned, articleDb itself never changed, so there was no reason to store it. Since it didn't get stored, the BTree you attached to it in __setstate__ doesn't get stored either. Everything works smoothly until connection.commit(). The __setstate__ method correctly converts to using the BTree and the addArticle method adds a new computer to ArticleDb. The problem is that, while adding the BTree to articleDb did change (did set _p_changed to 1) articleDb, because that happened as a side effect of loading the object, the unghostification machinery clears _p_changed after __setstate__ returns. Then nothing you did after that set articleDb._p_changed to a true value. If I instead create a new ArticleDb instance with the BTree instead of using __setstate__ the new computer is saved as it should. Yes. If you had called __setstate__ *directly*, it would also work (contradicting the current minimal docs, but so it goes). The problem is that unghostifying by magic clears _p_changed. In none of the cases is articleDb._p_changed == True, When you create an object directly, it's not associated with a Connection (a jar), and some of the persistence machinery is sidestepped then. New objects only get into the database if you attach them to an object that's already in the database, and the latter object is marked changed. Think about that wink, and the purpose of the root() object will become clearer. but when the ArticleDb is created cleanly instead of upgraded, commit works anyway. Sorry, I'm not clear on what that means. In any case, it doesn't really matter how an object gets created, what matters is whether the persistence machinery sees a path to it from a changed object already in the database. Since this works if the object that holds _oidsToArticles is created from scratch, it seems that ZODB isn't properly aware of the _oidsToArticles attribute since it was created in __setstate__ instead of in __init__. Both ways set _p_changed *at the time* oidsToArticles is bound to the new BTree. The difference is that uhghostification deliberately clears _p_changed after calling __setstate__. I would really like to know exactly what happens here as the reason I am utilizing an object database is to be able to refactor the database with a minimum of fuss, and I would expect __setstate__ to allow me to make additional attributes in my instances. Calling __setstate__ as a side effect of a persistent load does not, by itself, support making changes that persist. It apparently wasn't designed to, either (see the other msgs in this thread, particularly from ChrisM). ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
Tim Peters wrote at 2004-5-30 14:49 -0400: [Dieter Maurer] I think, this is a ZODB buglet: It should set _p_changed = 0 before it calls __setstate__ and not afterwards... I don't know; Jim (or Jeremy) may know the reasoning here, but I don't. Activation currently sets the state to changed *before* calling __setstate__ too. A comment says this is to prevent recursively calling _PyPersist_Load, and that makes sense to me, else unbounded recursion could occur. I see... ... On ZODB head, Jeremy also documented that __setstate__ can't affect the persistent state (in persistent/interfaces.py's IPersistent). Whether this is deliberate design, or a consequence of the current implementation, I can't say. A potential problem: it *can* change the persistent state but it does not do it reliably. It does precisely when the object is later modified again: in this case modifications made in __setstate__ become persistent, otherwise, they do not. -- Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
[Tim Peters] ... On ZODB head, Jeremy also documented that __setstate__ can't affect the persistent state (in persistent/interfaces.py's IPersistent). Whether this is deliberate design, or a consequence of the current implementation, I can't say. [Dieter Maurer] A potential problem: it *can* change the persistent state but it does not do it reliably. It does precisely when the object is later modified again: in this case modifications made in __setstate__ become persistent, otherwise, they do not. I agree, but the docs are cryptic (because so brief) enough that I can read them as being correct or incorrect: def __setstate__(state): Set the object state data Note that this does not affect the object's persistent state. There are enough ambiguities there to fill a whole thread wink. It is true that a call to __setstate__() alone doesn't affect the object's state in the DB. It needs more words. OTOH, I'd rather dream up a way to make object changes made in __setstate__() persistent, if desired. For example, __setstate__'s return value is ignored now. Perhaps we could say that if it returns True, then the object should be considered to be in the changed state rather than in the uptodate state. ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
Tim Peters wrote at 2004-5-28 14:51 -0400: ... This appears to be one of those severely underdocumented minefields. The best older thread I found is here: http://mail.zope.org/pipermail/zodb-dev/2002-March/002442.html but it doesn't actually spell out something that works in the way you want. I think, this is a ZODB buglet: It should set _p_changed = 0 before it calls __setstate__ and not afterwards... -- Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
[Dieter Maurer] I think, this is a ZODB buglet: It should set _p_changed = 0 before it calls __setstate__ and not afterwards... I don't know; Jim (or Jeremy) may know the reasoning here, but I don't. Activation currently sets the state to changed *before* calling __setstate__ too. A comment says this is to prevent recursively calling _PyPersist_Load, and that makes sense to me, else unbounded recursion could occur. Given this abuse of _p_changed, and that the purpose of activating a ghost is to transition it to the up-to-date state, making mutations to the persistent state inside __setstate__ seems hard to accommodate. On ZODB head, Jeremy also documented that __setstate__ can't affect the persistent state (in persistent/interfaces.py's IPersistent). Whether this is deliberate design, or a consequence of the current implementation, I can't say. ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
I have a Persistent derived class where I want to upgrade from using a PersistentList to a BTrees.IOBTree.IOBTree. _articleList is the old Persistent list _oidsToArticles is the new IOBTree. def __setstate__(self, state): articleList = state.get('_articleList') if articleList: oidsToArticles = self.makeBTree() for each in articleList: oidsToArticles[each.oid()] = each del state['_articleList'] state['_oidsToArticles'] = oidsToArticles Persistent.__setstate__(self, state) This seems to work fine, and I am adding more objects to _oidsToArticles. The problem is that when I commit the transaction, nothing is saved. I have tested the same code without __setstate__ and then it saves just fine. What hoops does one have to jump through to upgrade the state of a ZODB object? ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
[Syver Enstad] I have a Persistent derived class where I want to upgrade from using a PersistentList to a BTrees.IOBTree.IOBTree. _articleList is the old Persistent list _oidsToArticles is the new IOBTree. def __setstate__(self, state): articleList = state.get('_articleList') if articleList: oidsToArticles = self.makeBTree() for each in articleList: oidsToArticles[each.oid()] = each del state['_articleList'] state['_oidsToArticles'] = oidsToArticles Persistent.__setstate__(self, state) This seems to work fine, and I am adding more objects to _oidsToArticles. The problem is that when I commit the transaction, nothing is saved. Quick guess (untested, untried, just from eyeballing this snippet quickly): nothing is marking self itself as being changed. The only things getting changed are the throw-away in-memory 'state' dict, the throw-away in-memory self.__dict__, and a throw-away in-memory BTree. The primary purpose of p.__setstate__ is to activate a ghost, after which point p is in the up-to-date state (i.e., not changed -- calling Persistent.__setstate__(self, ...) isn't going to mark self as changed, and nothing in the code above modifies self itself). If self doesn't look changed, its state in the DB won't change during commit(), and the DB will still reference your old PersistentList. Perhaps shuffling the code around would work, a la: Persistent.__setstate__(self, state) articleList = state.get('_articleList') if articleList is not None: # make the BTree in local oidsToArticles as above, then del self._articlelist self._oidsToArticles = oidsToArticles The thinking there is that then you've truly modified self, after self has been activated. ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
[Syver Enstad, wants to switch an attribute of a Persitent subclass From PersistentList to an IOBTree] [Tim, guessing] Quick guess (untested, untried, ... ... Perhaps shuffling the code around would work, a la: Persistent.__setstate__(self, state) articleList = state.get('_articleList') if articleList is not None: # make the BTree in local oidsToArticles as above, then del self._articlelist self._oidsToArticles = oidsToArticles The thinking there is that then you've truly modified self, after self has been activated. Nope, sorry, not a chance. You have truly modified self then, but __setstate__ is called by magic as part of activation (unghostifying), and the activation machinery resets self._p_changed after it calls __setstate__. So same result as your code: the in-memory version of self has the BTree, but commit() doesn't change anything about self in the database (again because self._p_changed is false -- and will be no matter what you try to do in __setstate__()). This appears to be one of those severely underdocumented minefields. The best older thread I found is here: http://mail.zope.org/pipermail/zodb-dev/2002-March/002442.html but it doesn't actually spell out something that works in the way you want. One possibility is to use any of these __setstate__ implementations temporarily, in a one-shot database conversion script: load every object of your subclass's type, and for each one obj, after loading it do obj._p_changed = True get_transaction().commit() Note again that setting _p_changed *inside* __setstate__ won't do any good. Note too that Jim Fulton has a recent proposal for Zope3 in this area: http://tinyurl.com/ypkhk [Zope URLs are generally so long my mailer refuses to keep them on one line] ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help: __getstate__ overriding
Syver Enstad wrote at 2004-5-28 12:41 +0200: I have a Persistent derived class where I want to upgrade from using a PersistentList to a BTrees.IOBTree.IOBTree. _articleList is the old Persistent list _oidsToArticles is the new IOBTree. def __setstate__(self, state): articleList = state.get('_articleList') if articleList: oidsToArticles = self.makeBTree() for each in articleList: oidsToArticles[each.oid()] = each del state['_articleList'] state['_oidsToArticles'] = oidsToArticles Persistent.__setstate__(self, state) This seems to work fine, and I am adding more objects to _oidsToArticles. The problem is that when I commit the transaction, nothing is saved. I have tested the same code without __setstate__ and then it saves just fine. What hoops does one have to jump through to upgrade the state of a ZODB object? This does not work as changes made in __setstate__ are not explicitly persisted. Whether or not they become persistent depends on whether the object is changed again outside __setstate__. Use an explicit conversion script instead... -- Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
Hi I installed zope2.7.0 on SUSE Linux as a non root user(vandana) and psycopg1.11 All steps of installation were successful, accept for the 'make install-zope' step. But when i try to use psycopg to connect to the database on the local machineZope asks me for a username and password. Where even if i give the username and password with which i installed zope(i.e vandana) , it does not accpet it. The same thing happens with 'root' username and password. Can some one please guide me how to access system resources through zope. Thanking you in advance.Vandana Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
You are using pyscopg directly instead of using the ZPsycopg Database adapter?? -aj --On Dienstag, 16. März 2004 9:54 Uhr -0800 Vandana Bajaj [EMAIL PROTECTED] wrote: Hi I installed zope2.7.0 on SUSE Linux as a non root user(vandana) and psycopg1.11 All steps of installation were successful, accept for the 'make install-zope' step. But when i try to use psycopg to connect to the database on the local machine Zope asks me for a username and password. Where even if i give the username and password with which i installed zope(i.e vandana) , it does not accpet it. The same thing happens with 'root' username and password. Can some one please guide me how to access system resources through zope. Thanking you in advance. Vandana Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
Hi Can any one tell me whether zope 2.6.2 version works with which versons of python.Does it work with python 2.3. How? my psycopg install in conflicting with the python version on my SUSE linux (python2.3) and the python version files in /Zope-home/lib/python2.1 Thank you Vandana Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
hi after installing pysycopg following the steps as mentioned in the INSTALL file of pyscopg when i started Zope i got following error. Coluld anyone please guide me about it thanks you Vandana home4:/Zope-2.6.2-linux2-x86 # ./start -- 2004-03-11T15:45:49 INFO(0) zdaemon Started subprocess: pid 10269 -- 2004-03-11T15:45:51 ERROR(200) Zope Could not import Products.ZPsycopgDA Traceback (innermost last): File /Zope-2.6.2-linux2-x86/lib/python/OFS/Application.py, line 522, in import_product File /Zope-2.6.2-linux2-x86/lib/python/Products/ZPsycopgDA/__init__.py, line 92, in ? File /Zope-2.6.2-linux2-x86/lib/python/Products/ZPsycopgDA/DA.py, line 93, in ? File /Zope-2.6.2-linux2-x86/lib/python/Products/ZPsycopgDA/db.py, line 99, in ? ImportError: /Zope-2.6.2-linux2-x86/lib/python2.1/lib-dynload/psycopgmodule.so: undefined symbol: PyType_IsSubtype -- 2004-03-11T15:45:51 PANIC(300) z2 Startup exception Traceback (innermost last): File /Zope-2.6.2-linux2-x86/z2.py, line 585, in ? File /Zope-2.6.2-linux2-x86/lib/python/Zope/__init__.py, line 46, in startup (Object: startup) File /Zope-2.6.2-linux2-x86/lib/python/Zope/App/startup.py, line 45, in startup File /Zope-2.6.2-linux2-x86/lib/python/OFS/Application.py, line 500, in import_products File /Zope-2.6.2-linux2-x86/lib/python/OFS/Application.py, line 522, in import_product File /Zope-2.6.2-linux2-x86/lib/python/Products/ZPsycopgDA/__init__.py, line 92, in ? File /Zope-2.6.2-linux2-x86/lib/python/Products/ZPsycopgDA/DA.py, line 93, in ? File /Zope-2.6.2-linux2-x86/lib/python/Products/ZPsycopgDA/db.py, line 99, in ? ImportError: /Zope-2.6.2-linux2-x86/lib/python2.1/lib-dynload/psycopgmodule.so: undefined symbol: PyType_IsSubtype __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
Il gio, 2004-03-11 alle 11:30, Vandana Bajaj ha scritto: /Zope-2.6.2-linux2-x86/lib/python2.1/lib-dynload/psycopgmodule.so: undefined symbol: PyType_IsSubtype you probably built psycopg using python 2.2/2.3 and your zope still uses python 2.1. see psycopg's FAQ about building with the python packaged with zope (http://wiki.initd.org/Projects/PsycopgFaq). -- Federico Di Gregorio http://people.initd.org/fog Debian GNU/Linux Developer[EMAIL PROTECTED] INIT.D Developer [EMAIL PROTECTED] Don't dream it. Be it. -- Dr. Frank'n'further signature.asc Description: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
(Learn to use better subject lines!) Vandana Bajaj wrote: /Zope-2.6.2-linux2-x86/lib/python2.1/lib-dynload/psycopgmodule.so: undefined symbol: PyType_IsSubtype Looks like you didn't manage to compile it properly, maybe you compiled it to the wrong python version... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
Vandana Bajaj wrote: I am not able to access zope management interface through mozilla. Could any one guide me why is it happening so. Can i use Javascript within Zope Page Templates to embed logic 1. zope-dev is for development of Zope, not with it, move your discussion to [EMAIL PROTECTED] 2. Don't post in HTML to a non-html list. 3. Provide more detail. What happens when you try and access the ZMI with mozilla? cheers, Chris PS: Yes of course you can put Javascript in ZPT. Using it to embed logic other than maybe simple form validation is siully though ;-) -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
I am not able to access zope management interface through mozilla.Could any one guide me why is it happening so.Can i use _javascript_ within Zope Page Templates to embed logic Thank you in advanceVandana Do you Yahoo!? Yahoo! Search - Find what youre looking for faster.___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
I am a software developer in SuSEI have installed Zope in SUSE.I want to be able to print from a html page to a printer with measurements as per to the html page produced.I wish to know whther printing from a web page is possoble or not.If yes then is it possible to print accurately upto measurements specified.Will it depend on the type of the printer.Please reply as soon as possible Thank you in advanceVandana Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want.___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help
Vandana Bajaj wrote: I am a software developer in SuSE I have installed Zope in SUSE. I want to be able to print from a html page to a printer with measurements as per to the html page produced. I wish to know whther printing from a web page is possoble or not. If yes then is it possible to print accurately upto measurements specified. Will it depend on the type of the printer. This has almost nothing to do with Zope. (And I say almost only because Zope is a web server and this asks about HTML.) Printing of web pages is almost entirely up to the browser. Most will try to print something that looks very much like the page you see on your screen. You can, however, define CSS styles specifically for printing, which should allow you to have some control over sizes et al. Perhaps you can look at how Plone does this. --jcc -- He who fights with monsters should look to it that he himself does not become a monster. And when you gaze long into an abyss the abyss also gazes into you. ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] HELP NEEDED!!!
Hi everyone, I am getting an error Error Type: OperationalError Error Value: (1205, 'Lock wait timeout exceeded; Try restarting transaction') i am trying to insert vaules into 2 tables (MYSQL). In the first table i make a new record and get the unique id for tht using THE MYSQL FUNCTION . but when it try to insert a record for the next table for which i am using this idit gives an error. but when i try to give a static id for the second tableit is not giving any error. so i guess it is bcoz of transactions of zope... how to overcome this problem...any sugesstions are welcome! Regards, Rajesh Rajesh Shiggaon___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help me convert from j2ee to zope
Hi Ryan, I am not certain if this is the right mailing list here, because zope-dev is for the development _of_ Zope, not the development of products _with_ Zope. However if this thread starts to assemble a survey comparing Zope to J2EE, this may be interesting for the Zope development, especially if there are things in J2EE which may inspire Zope, or converse there are Zopish ways which provide a better solution than J2EE for some problems. I would like to stop developing with JBoss and convert to Zope. I have been able to figure most things out using the Zope website but I have a few questions... The majority of my code was in EJB's. So I am trying to create Zope products to replace them. What kind of naming service is available within Zope? For example, how can I get a reference to one object from another object within Zope? This would be the equivalent of a local interface in J2EE. In JBoss I would use a session bean as the remote user interface and it would manage entity beans. So in Zope if I have a non-persistent object as the XML-RPC published user interface, how can I have it access persistent objects within Zope? Usually You should have some persistent object around by the Zope framework when handling request. If doing an XML-RPC call You are already talking to some persistent object given to You by the ZPublisher. I am not sure what is the appropriate equivalent of a session bean in J2EE if looking at Zope. Inside any persistent object You should be able to get other objects by calling unrestrictedTraverve('/path/to/object') if You know the path to the object. Alternatively You could use a catalog to look up objects if You are not sure where the objects are ... as the catalog is a persistent object itself this means You need a globally available catalog for Your application which You know You can look up in a certain location ... How can I create new objects programmatically in Zope? In J2EE I would get get a home interface to a bean and then call a create method on it to create the bean. I know how to create new objects using ZMI in Zope, but I need objects to be created through remote calls from clients. For example if I had objects that represent tasks in Zope, I need the clients to be able to create and delete tasks. How do I do that? There are factory methods for nearly all persistent objects. They are registered in the context.registerClass call in the __init__.py of the corresponding product (normally). These methods then are available via the manage_addProduct attribute on every folder object; i.e. for adding a Page Template (which is a class defined in the PageTemplates Product) programatically You say: folder.manage_addProduct['PageTemplates'].manage_addPageTemplate('template_id', template_content) where folder is the object which should contain the new page template, and template_content is a string containing the contents of the new template. I've read all the documentation I can find on the web site, so if I've missed something please point me to it. Another source of inspiration is to install products which seem to do something similar what You want and try to figure out how they did it. (I personally prefer Silva for rather obvious reasons ;) Cheers, Clemens ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help me convert from j2ee to zope
Hi, I would like to stop developing with JBoss and convert to Zope. I have been able to figure most things out using the Zope website but I have a few questions... The majority of my code was in EJB's. So I am trying to create Zope products to replace them. What kind of naming service is available within Zope? For example, how can I get a reference to one object from another object within Zope? This would be the equivalent of a local interface in J2EE. In JBoss I would use a session bean as the remote user interface and it would manage entity beans. So in Zope if I have a non-persistent object as the XML-RPC published user interface, how can I have it access persistent objects within Zope? How can I create new objects programmatically in Zope? In J2EE I would get get a home interface to a bean and then call a create method on it to create the bean. I know how to create new objects using ZMI in Zope, but I need objects to be created through remote calls from clients. For example if I had objects that represent tasks in Zope, I need the clients to be able to create and delete tasks. How do I do that? Are there any other gotchas that ex J2EE developers can tell me about switching to Zope? I've read all the documentation I can find on the web site, so if I've missed something please point me to it. Thanks, -- Ryan Boder http://www.bitwiser.org/icanoop ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help with ZClasses
Dear Sir or Madame I'm workign with zope ZClasses in zope 2.7.0b.I decided to do the example given to us at this site http://zope.org/Members/dedalu/precosHowto/#top1.I can not do the question 3.1 and 3.2 for the same reason.They tell us to change PrecosFolder_add but when we do that it is displayed the follow error frase Title Parameter List Bound Names context, container, script, traverse_subpath Last Modified 2004-01-20 17:23 Errors invalid syntax (Script (Python), line 1) html headtitleAdicionar PrecosFolder/title/head body bgcolor=#FF link=#99 vlink=#55 dtml-with PrecosFolder.createInObjectManager(REQUEST['id'], REQUEST) dtml-call propertysheets.PrecosFolder.manage_editProperties(REQUEST) /dtml-with dtml-if DestinationURL dtml-call RESPONSE.redirect(DestinationURL+'/manage_workspace') dtml-else dtml-call RESPONSE.redirect(URL2+'/manage_workspace') /dtml-if /body /html I hope some one can help us. Yours faithfully, Fábio Bruno _ MSN Messenger: converse com os seus amigos online. http://messenger.msn.com.br ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help with ZClasses
Fábio Bruno wrote: Dear Sir or Madame I'm workign with zope ZClasses in zope 2.7.0b.I decided to do the example given to us at this site http://zope.org/Members/dedalu/precosHowto/#top1.I can not do the question 3.1 and 3.2 for the same reason.They tell us to change PrecosFolder_add but when we do that it is displayed the follow error frase Title Parameter List Bound Names context, container, script, traverse_subpath Last Modified 2004-01-20 17:23 Errors invalid syntax (Script (Python), line 1) html I'm guessing you're using a Script (Python) rather than a DTML Method. Make sure you pay attention to the type of object you're supposed to use. This list, btw, if for development of Zope, not with Zope. For that you want [EMAIL PROTECTED] --jcc -- My point and period will be throughly wrought, Or well or ill, as this day's battle's fought. ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help with the change of URL and/or port
Fábio Bruno wrote: Dear Sir or Madame I'm wrigting because I started to do a plone site in zope.I would lke to know if I can change the url and/or port where the plone site stays.I would like to know how to chenge this path http:\\localhost:8080\Plone. You need a VirtualHostMonster and possibly Apache. See the relevant chapter in the Zope Book for details, or search zope.org for VHM. --jcc ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help with the change of URL and/or port
Dear Sir or Madame I'm wrigting because I started to do a plone site in zope.I would lke to know if I can change the url and/or port where the plone site stays.I would like to know how to chenge this path http:\\localhost:8080\Plone. Yours faithfully, Fábio Afonso _ MSN Messenger: converse com os seus amigos online. http://messenger.msn.com.br ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help to find URL logs in Zope
Hi, can you give us an explanation in order to trace URL logs in Zope on linux debian ? Wed like to retrieve the percentage of utilization of our different web sites. Best regards, ___ Dany MAHAUT - Responsable d'Application Groupe EDHEC - Direction des Systèmes d'Information 58, rue du Port 59046 LILLE Tel. +33 (0)3 20 15 45 55 - Fax. +33 (0)3 20 15 45 01 ___ ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help w/ LocalFS
Roberto Benitez wrote at 2003-9-6 16:49 -0700: I am trying to use LocalFS to access a directory in my linux server (zope running on same suse linux server) i am able to see the directory listing, but when i try to access any file i get the following error message The object at ../../5741.RPT has an empty or missing docstring. Objects must have a docstring to be published. What object type do you see in the directory listing (I am not sure, that you can see the type there)? Your files might be mapped to a somewhat broken object. If this does not reveal easily the cause of your problem, I would start debugging. On http://www.dieter.handshake.de/pyprojects/zope you find a small module (Interactive debugging support) that lets you build the publishing environment in an interactive interpreter. Build a request and traverse to your object. Hopefully, you will get the same error which you can now analyse with the pm (post mortem) function of pdb (the Python debugger). Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help w/ LocalFS
Does the user zope is run as (normaly 'zope') have all the neccessary rights to access the files ? You can set the user zope is run under with the -u parameter when starting zope. Robert Am Sunday 07 September 2003 01:49 schrieb Roberto Benitez: I am trying to use LocalFS to access a directory in my linux server (zope running on same suse linux server) i am able to see the directory listing, but when i try to access any file i get the following error message The object at ../../5741.RPT has an empty or missing docstring. Objects must have a docstring to be published. i get the same error when attempting to access any file i also have a zope server runnin on a couple of other windows computers and it seems to work just fine. the LocalFS is of course treated like a local folder. i would appreciate any help on this issue __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ___ Zope-Dev maillist - [EMAIL PROTECTED] 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 ) -- mit freundlichen Grüssen Robert Rottermann www.redCOR.ch ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help w/ LocalFS
I am trying to use LocalFS to access a directory in my linux server (zope running on same suse linux server) i am able to see the directory listing, but when i try to access any file i get the following error message The object at ../../5741.RPT has an empty or missing docstring. Objects must have a docstring to be published. i get the same error when attempting to access any file i also have a zope server runnin on a couple of other windows computers and it seems to work just fine. the LocalFS is of course treated like a local folder. i would appreciate any help on this issue __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help!!
Hi all, We are facing a small issue in formulator. Suppose we have a fiels which is repetitve in nature for ex name1 , name2, name 3.depending on the user input. If we want to validate these name we have to create required fields i.e name1, name2 etc..in validator in advance. Can we do the same using only one field in formulator i.e name and put all the derivatives of it like name1 , name 2 as a array to name. in that case, we can have more control in field handling and so would not have the headache of pre formation of the fields which may susbsequently increase later on. Looking forward for a reply.. Subhankar exteam Yahoo! India Matrimony: Find your partner online. Go to http://yahoo.shaadi.com ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help!!
Hi Todd, This isn't the error that is preventing Zope from starting. This is a warning message. Startup should proceed normally thereafter. - c - Original Message - From: Todd Loomis, (SAIC) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 28, 2003 12:06 PM Subject: [Zope-dev] Help!! All: I'm getting this error message every time I try to start Zope: /var/www/zope/lib/python/ts_regex.py:87: DeprecationWarning: the regex module is deprecated; please use the re module import regex, regsub #, Sync /usr/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) What gives, it was working fine then I got a call saying the site wasn't responding. So I restarted Zope and got this. Any help will be greatly appreciated. Todd -- -- ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help!!
Title: Message All: I'm getting this error message every time I try to start Zope: /var/www/zope/lib/python/ts_regex.py:87: DeprecationWarning: the regex module is deprecated; please use the re module import regex, regsub #, Sync/usr/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) What gives, it was working fine then I got a call saying the site wasn't responding. So I restarted Zope and got this. Any help will be greatly appreciated. Todd ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help!!
Paul, Thanks, however I've searched the mailing lists and found nothing. Also I consider this an error when Zope will not startup! Todd -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Thursday, August 28, 2003 12:18 PM To: [EMAIL PROTECTED] Subject: Re: [Zope-dev] Help!! On Thu, Aug 28, 2003 at 12:06:21PM -0400, Todd Loomis, (SAIC) wrote: All: I'm getting this error message every time I try to start Zope: /var/www/zope/lib/python/ts_regex.py:87: DeprecationWarning: the regex module is deprecated; please use the re module import regex, regsub #, Sync /usr/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) What gives, it was working fine then I got a call saying the site wasn't responding. So I restarted Zope and got this. Any help will be greatly appreciated. Please search the mailing list archives. This is not an error. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's PYSCHOMETRIC DISGRUNTLED BIOLOGIST! (random hero from isometric.spaceninja.com) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help!!
On Thu, Aug 28, 2003 at 12:30:11PM -0400, Todd Loomis, (SAIC) wrote: Paul, Thanks, however I've searched the mailing lists and found nothing. http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?SearchView=Query=DeprecationWarning a lot of those are irrelevant - several will tell you the same thing I did. Also I consider this an error when Zope will not startup! This is just a warning. It *cannot* prevent zope from starting. Your problem is something else. You say zope is not starting... what happens when you try to start? What have you done to verify that zope isn't running? What platform are you on? What version of Zope? -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's THE BOAT! (random hero from isometric.spaceninja.com) ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help!!
What have you done to verify that zope isn't running? When I do a start it comes back with these warnings in the log files and when I try to load the site it gives me a proxy error. What platform are you on? Redhat 7.2 What version of Zope? 2.4.3 Todd Loomis Web Developer Defense Modeling Simulation Office (SAIC) 1901 N. Beauregard Street, Suite 500 Alexandria, VA 22311 Office: (703) 824-3407 Fax: (703) 379-3778 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Thursday, August 28, 2003 12:42 PM To: [EMAIL PROTECTED] Subject: Re: [Zope-dev] Help!! On Thu, Aug 28, 2003 at 12:30:11PM -0400, Todd Loomis, (SAIC) wrote: Paul, Thanks, however I've searched the mailing lists and found nothing. http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?SearchView=Query= DeprecationWarning a lot of those are irrelevant - several will tell you the same thing I did. Also I consider this an error when Zope will not startup! This is just a warning. It *cannot* prevent zope from starting. Your problem is something else. You say zope is not starting... what happens when you try to start? What have you done to verify that zope isn't running? What platform are you on? What version of Zope? -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's THE BOAT! (random hero from isometric.spaceninja.com) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help!!
Thanks, however I've searched the mailing lists and found nothing. Wow really? http://www.google.ca/search?q=regsub.py%3A15%3A+DeprecationWarning+zope Something else is causing your problem then. What that might be, we need more information. -- Andy McKay http://www.agmweb.ca ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help!!
This is a wild guess. A common problem on UNIX is to run Zope initially as the root user. In that situation, even if you declare an effective user via the -u switch, the log files and pid files are written as the root user. It will run fine. Then later on, someone stops the process. You attempt to start the process as the effective user. Because the initial log and pid files were written as the root user, the process cannot open them for writing and Zope will not start. As I said, a wild guess, but might be your problem here (especially as you don't seem to see anything useful in your log files). - C On Thu, 2003-08-28 at 12:53, Todd Loomis, (SAIC) wrote: What have you done to verify that zope isn't running? When I do a start it comes back with these warnings in the log files and when I try to load the site it gives me a proxy error. What platform are you on? Redhat 7.2 What version of Zope? 2.4.3 Todd Loomis Web Developer Defense Modeling Simulation Office (SAIC) 1901 N. Beauregard Street, Suite 500 Alexandria, VA 22311 Office: (703) 824-3407 Fax: (703) 379-3778 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Thursday, August 28, 2003 12:42 PM To: [EMAIL PROTECTED] Subject: Re: [Zope-dev] Help!! On Thu, Aug 28, 2003 at 12:30:11PM -0400, Todd Loomis, (SAIC) wrote: Paul, Thanks, however I've searched the mailing lists and found nothing. http://zope.nipltd.com/public/lists/zope-archive.nsf/Main?SearchView=Query= DeprecationWarning a lot of those are irrelevant - several will tell you the same thing I did. Also I consider this an error when Zope will not startup! This is just a warning. It *cannot* prevent zope from starting. Your problem is something else. You say zope is not starting... what happens when you try to start? What have you done to verify that zope isn't running? What platform are you on? What version of Zope? -- Chris McDonough [EMAIL PROTECTED] Zope Corporation ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] Help!!
What you see is not an error but a warning. It is not the reason why zope does not start up. What OS and what Zope Version are you using ? Robert Am Thursday 28 August 2003 18:30 schrieb Todd Loomis, \(SAIC\): Paul, Thanks, however I've searched the mailing lists and found nothing. Also I consider this an error when Zope will not startup! Todd -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Thursday, August 28, 2003 12:18 PM To: [EMAIL PROTECTED] Subject: Re: [Zope-dev] Help!! On Thu, Aug 28, 2003 at 12:06:21PM -0400, Todd Loomis, (SAIC) wrote: All: I'm getting this error message every time I try to start Zope: /var/www/zope/lib/python/ts_regex.py:87: DeprecationWarning: the regex module is deprecated; please use the re module import regex, regsub #, Sync /usr/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) What gives, it was working fine then I got a call saying the site wasn't responding. So I restarted Zope and got this. Any help will be greatly appreciated. Please search the mailing list archives. This is not an error. -- mit freundlichen Grüssen Robert Rottermann www.redCOR.ch ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] help system and .py files
Is it at all productive to have .py files in the help system byte-compiled? ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Help with DTML-IN statement
Hello, I am very new to Zope/DTML and I am a little confused with the operation of the DTML-IN statement. Here is the snippet of code table border=1 width=100%dtml-in expr="( ((1), (1,2),(4,5,6),(7,8,9)) )" tr tddtml-var sequence-item/td /tr/dtml-in/table This code displays the contents 4 cells in a table and the output is12(4,5,6)(7,8,9)I am a litte confused because I thought it would display the contents of the list as(1)(1,2)(4,5,6)(7,8,9)I believe this is related to something I read about tuples of ( key, value) will handled with sequence-key and sequence-item I must be traversing the list incorrectly.can anyone give me an example of how to traverse this list of tuples correctly. Any help would be greatly appreciated.thank you very much in advance Gary
Re: [Zope-dev] Help with DTML-IN statement
Hi Gary, This question is more suited to [EMAIL PROTECTED] instead of [EMAIL PROTECTED], and you should not send html e-mail to any of these two lists, but since we are here... On Wed, 2002-03-13 at 16:13, Gary Yee wrote: Hello, I am very new to Zope/DTML and I am a little confused with the operation of the DTML-IN statement. Here is the snippet of code table border=1 width=100% dtml-in expr=( ((1), (1,2),(4,5,6),(7,8,9)) ) tr tddtml-var sequence-item/td /tr /dtml-in /table This code displays the contents 4 cells in a table and the output is 1 2 (4,5,6) (7,8,9) I am a litte confused because I thought it would display the contents of the list as (1) (1,2) (4,5,6) (7,8,9) I believe this is related to something I read about tuples of ( key, value) will handled with sequence-key and sequence-item That's exactly what's happening. It's a misfeature in my opinion, but it makes it easy to iterate thru a dictionary .items() and a folder .objectItems(). I must be traversing the list incorrectly. No, you're not, the feature is wrong :-) can anyone give me an example of how to traverse this list of tuples correctly. The workaround is to make each tuple of your sequence the second elemento of a 2-tuple, as in '((1, (1,)), (2, (1, 2)), (3, (4, 5, 6)), (4, (4, 5, 6)))' Kind of like that old joke were the paranoid statician would take a bomb with himself to the plane because the odds of there being two bombs on a plane were so low... -- Ideas don't stay in some minds very long because they don't like solitary confinement. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help System Searches
would it make sense to make the help system still allow searching but do storage in a mounted zodb ? cheers kapil On Saturday 09 March 2002 10:55 am, Chris McDonough wrote: There is no way to fix this? What other problems are there with the help system? Not that I can think of. Other problems with the help system are presentation, mostly. Would it somehow be possible to make the helpsystem ignore versions? No, unfortunately. It uses the Catalog, which is based on ZODB, and it puts a Catalog instance into the main FileStorage, which is undoing and versioning. It then proceeds to do writes to the database when it appears that all you're doing is reading a pre-existing page. If you're in a version at the time, a set of objects will be written into the Catalog and into other places in instance space that have version. This is a bad pattern, and the only way to fix it is to prevent it from happening, which requires some helpsystem architectural changes that amount (IMHO) to a rewrite. - C ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Help on LDAP LoginManager Adapter
Helloo, I intalled LDAPLogin manger in Zope2.5.0 in this product where can i create my cutomised Login Form Authentication like LoginManager Product we can have loginform.where i can create and do BasiAuthentication By LDA.Please suggest me for this problem Thanks in Advance regards Suresh Babu Eddala Looking for a job? Visit Yahoo! India Careers Visit http://in.careers.yahoo.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] help identifying a structure inside Zope.
I'm hunting for a very very obscure python-crashing bug on Solaris with Zope2.4 on Python2.1.1. The structure that's getting corrupted looks something like: 299, (300, (301, (302, (303, ( 304, ( 3, c_o_s ) ) ) ) ) ) (nested tuples) I'm wondering if anyone can think of somewhere inside Zope that generates this sort of structure? c_o_s is a string we use in our code as a property, a database column, and a REQUEST variable. As far as we can tell, it's not something being generated by our code... Thanks, Anthony -- Anthony Baxter [EMAIL PROTECTED] It's never too late to have a happy childhood. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] help identifying a structure inside Zope.
I'd be tempted to suspect the BTrees module setstate code. Anthony Baxter wrote: I'm hunting for a very very obscure python-crashing bug on Solaris with Zope2.4 on Python2.1.1. The structure that's getting corrupted looks something like: 299, (300, (301, (302, (303, ( 304, ( 3, c_o_s ) ) ) ) ) ) (nested tuples) I'm wondering if anyone can think of somewhere inside Zope that generates this sort of structure? c_o_s is a string we use in our code as a property, a database column, and a REQUEST variable. As far as we can tell, it's not something being generated by our code... Thanks, Anthony -- Anthony Baxter [EMAIL PROTECTED] It's never too late to have a happy childhood. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) -- Chris McDonoughZope Corporation http://www.zope.org http://www.zope.com Killing hundreds of birds with thousands of stones ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] help identifying a structure inside Zope.
Chris McDonough wrote I'd be tempted to suspect the BTrees module setstate code. Yeah? This is something that you'd expect to see with it? Anthony -- Anthony Baxter [EMAIL PROTECTED] It's never too late to have a happy childhood. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] help identifying a structure inside Zope.
Maybe... it's a guess. Anthony Baxter wrote: Chris McDonough wrote I'd be tempted to suspect the BTrees module setstate code. Yeah? This is something that you'd expect to see with it? Anthony -- Chris McDonoughZope Corporation http://www.zope.org http://www.zope.com Killing hundreds of birds with thousands of stones ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: Was:([Zope-dev] HELP PLEASE)
Hi, After viewing all log-files, i have found out, that everytime when a SQL-Method was called and the SQL-Method takes several minutes to return a result then a erro code 13 was raised. Last time i change the DA from ZPygres to ZPsycopg, because of the error code 13, but that was not the problem. The problem seems that if a SQL-query takes several time, then the error is raised. There was a message from Shai Berger written on Mon, 06 Aug 2001 18:44:06 +0300 which describes(for me) this problem. thanls as Andre Schubert schrieb: The only things i know, are the following lines in the stupid_log_file. 2001-10-14T18:03:21 ERROR(200) zdaemon zdaemon: Sun Oct 14 20:03:21 2001: Aiieee! 32437 exited with error code: 13 -- 2001-10-14T18:03:21 INFO(0) zdaemon zdaemon: Sun Oct 14 20:03:21 2001: Houston, we have forked -- 2001-10-14T18:03:21 INFO(0) zdaemon zdaemon: Sun Oct 14 20:03:21 2001: Houston, we have forked -- 2001-10-14T18:03:21 INFO(0) zdaemon zdaemon: Sun Oct 14 20:03:21 2001: Hi, I just forked off a kid: 588 as Richard Jones schrieb: On Monday 15 October 2001 17:09, Andre Schubert wrote: Hi all, i have serious problems with my zope. Last time he dies very often with error code 13,and since to today he slows down extremly. To view the Control_Panel/DebugForm it takes up to 1 minute and thats not acceptable. How can i track down these problems. I run Zope-2.2.4 on Immunix-RedHat 6.2 Hi, all Is there anybody, who can help me tracking down where the Error Code: 13 comes from, it is very important for my Zope Installation. You probably need to give more information - like where this error code 13 appears. If it's an OSError or IOError, it's probably an Access Error (as defined in the errno module, EACCES). What _that_ means depends entirely on the _rest_ of the error, which you haven't supplied. A full traceback of the error will go a long way to helping you. Richard ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] HELP PLEASE
Hi, i don't no what the problem was, but it was not the swap. I found out, that if i took lynx on the same machine everything works fine and fast, but if i connect over our network everything slows down. This happens until my sysop was at work. I think there was a network problem, but i dont know this. If this error occurs a second time a know what i have to do. thanks as Robert Rottermann schrieb: I had this once (the slowing down) when an other process was eating up all memory and zope was constantly paged out. Robert - Original Message - From: Andre Schubert [EMAIL PROTECTED] To: zope [EMAIL PROTECTED] Sent: Friday, October 12, 2001 6:49 AM Subject: [Zope-dev] HELP PLEASE Hi all, i have serious problems with my zope. Last time he dies very often with error code 13,and since to today he slows down extremly. To view the Control_Panel/DebugForm it takes up to 1 minute and thats not acceptable. How can i track down these problems. I run Zope-2.2.4 on Immunix-RedHat 6.2 thanks a lot as ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] HELP PLEASE
Hi all, i have serious problems with my zope. Last time he dies very often with error code 13,and since to today he slows down extremly. To view the Control_Panel/DebugForm it takes up to 1 minute and thats not acceptable. How can i track down these problems. I run Zope-2.2.4 on Immunix-RedHat 6.2 thanks a lot as ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] HELP PLEASE
I had this once (the slowing down) when an other process was eating up all memory and zope was constantly paged out. Robert - Original Message - From: Andre Schubert [EMAIL PROTECTED] To: zope [EMAIL PROTECTED] Sent: Friday, October 12, 2001 6:49 AM Subject: [Zope-dev] HELP PLEASE Hi all, i have serious problems with my zope. Last time he dies very often with error code 13,and since to today he slows down extremly. To view the Control_Panel/DebugForm it takes up to 1 minute and thats not acceptable. How can i track down these problems. I run Zope-2.2.4 on Immunix-RedHat 6.2 thanks a lot as ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] help! I've broken refresh
And life is just not the same without it! I had auto refresh working fine until recently. Today, if I change a py file I see the pyc file being regenerated, but only when I do a manual refresh. And I do not see the effect of the changes until I do a full zope restart. FWIW, several things happened lately: - I cleaned out some shadowed older product versions from /usr/lib/zope/lib/python/Products - I experimented with ZEO (but I'm not running it now), and - I rearranged the product quite a lot. __init__.py was changed, modules were split up, imports moved around, and there is a new sub-package tests which also contains a refresh.txt. Does this sound familiar to anyone ? -Simon ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Help !!!
Hi, I'm a student, doing my Masters in Clinet/Server Computing. I was interested in Content Server stuff, thats why I decided to do my master project on Content Server. I was going through the web, and found Zope Application server, and decided to work on it.Right now Zope works with any web server that supports the Common Gateway Interface (CGI). I want to develope some adapter that willenable Zopeworking with any web serverthat supports ASP. I downloaded the Zope source code that is available at http://www.zope.org/Products/Zope/2.3.3 I want to play with the source code of Zope application server to have a better idea of this application, butcouldn't find any good documentation. I'm wandering whether thats the only peace of code availble for users? Is that full source code for Zope Application server, if not where can I get the full source code? Do u know any documentation which will be helpful for understanding and playing aound with source code?? Please respond to this mail if u have answer to my questions. Thanks, AtulDo You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year!http://personal.mail.yahoo.com/
RE: [Zope-dev] Help !!!
One of the links on that page ends in -src.tgz. That's the source to Zope. Cheers, // mark -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of atul dedhiaSent: Wednesday, July 11, 2001 10:34 PMTo: [EMAIL PROTECTED]Subject: [Zope-dev] Help !!! Hi, I'm a student, doing my Masters in Clinet/Server Computing. I was interested in Content Server stuff, thats why I decided to do my master project on Content Server. I was going through the web, and found Zope Application server, and decided to work on it.Right now Zope works with any web server that supports the Common Gateway Interface (CGI). I want to develope some adapter that willenable Zopeworking with any web serverthat supports ASP. I downloaded the Zope source code that is available at http://www.zope.org/Products/Zope/2.3.3 I want to play with the source code of Zope application server to have a better idea of this application, butcouldn't find any good documentation. I'm wandering whether thats the only peace of code availble for users? Is that full source code for Zope Application server, if not where can I get the full source code? Do u know any documentation which will be helpful for understanding and playing aound with source code?? Please respond to this mail if u have answer to my questions. Thanks, Atul Do You Yahoo!?Get personalized email addresses from Yahoo! Mail - only $35 a year!http://personal.mail.yahoo.com/
[Zope-dev] help with external method
Hi... I'm just new with Zope, and I m trying to make an external method with python that return me the names of the files that are in an especific folder of the Zope i.e:the folder: Root Folder/function_repository.. (For files, I mean every kind of them...dtml methods, instances of zclass, etc.). It's that posible? If anyone can help me with thisi'll be very gratefully.thanks... PD: Sory for my English Edgardo Zulian. El Sitio.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] help with external method
On Fri, 29 Jun 2001, Edgardo Zulian wrote: I'm just new with Zope, and I m trying to make an external method with python that return me the names of the files that are in an especific folder of the Zope i.e:the folder: Root Folder/function_repository.. I'm not quite sure what you want to do, but you could try to add a a DTML Method in the folder which contained this: dtml-in objectValues() dtml-var id /dtml-in This would print all the names (I guess you ment id's) of the objects in that folder. HTH. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] help with external method
On Fri, 29 Jun 2001, Edgardo Zulian wrote: I'm just new with Zope, and I m trying to make an external method with python that return me the names of the files that are in an especific folder of the Zope i.e:the folder: Root Folder/function_repository.. I'm not quite sure what you want to do, but you could try to add a a DTML Method in the folder which contained this: dtml-in objectValues() dtml-var id /dtml-in Hi, that's work pretty fine, but the problem is that I want to get that result with an external method because then I want to assign that result to a text folder's property ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Help! - I want to understand Acquisition...
Hi, First of all I'm converting an existing (and working) Zope product from version 2.1.4 to 2.3.1 and I'm having the following problem when trying to run the (new) converted version. In a dtml document which is run many times for different types of objects ie. something like dtml-in " ... " . . . IMG ... src="dtml-var expr="getIcon(REQUEST)"" ... . . . /dtml-in where it iterates through a list of objects, I get mixed results which I don't understand. When it works the getIcon function returns the path (using the REQUEST namespace) and icon for the particular object type and then this gets rendered as expected. But when it fails the icon for the type does not get rendered at all (understandably). After some debugging (ie. print statements) I found that when it failed the REQUEST namespace was not passing what I expected (it was empty), and when I tried to print the namespace it printed the following; Special Object Used to Force Acquisition So the python function (getIcon()) was expecting the REQUEST object but actually getting (it seems) is a derived (and unexpected) object, and failing when looking for particular attributes. I don't understand this behaviour (why it works for some and not others and why it worked in a previous version of Zope) and therefore how to fix it. Any help or pointers on the above or other relevant issues to upgrading older products would be appreciated. Thanks in advance Bernie Rossi. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help !
the zcatalog is built to search items in the ZODB, it cannot search unrelated data storages, like databases, out of the box. jens on 4/4/01 22:22, Honey George at [EMAIL PROTECTED] wrote: Hello, I am not able to search a postgres database using Z Catalog. I am not clear of the procedure basically. If you could help me in this regard please reply. I am a programmer from India.If I get an example it will be great. Regards, Honey __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Help! Can't unsubscribe!
Help! I'm trying to unsubscribe from this list because it's filling up my mailbox too fast. However, when I try to use the web interface or the e-mail interface to unsubscribe, it gives me an odd error message. It says something to the effect of, "There's something wrong with your account. Please contact the postmaster." Yet I keep getting zope-dev messages. Could somebody tell me how to get off this list? Thanks, T.J. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Help! Can't unsubscribe!
On Fri, 17 Nov 2000, T.J. Mannos wrote: I'm trying to unsubscribe from this list because it's filling up my mailbox too fast. However, when I try to use the web interface or the e-mail interface to unsubscribe, it gives me an odd error message. It says something to the effect of, "There's something wrong with your account. Please contact the postmaster." Yet I keep getting zope-dev messages. Could somebody tell me how to get off this list? I've cancelled your zope-dev subscription. (We're running an old version of the maillist system, which occasionally has this problem - fortunately, we now have some people with the time and leverage to shepherd, fix, etc an upgrade to a newer version - will be happening soon. In the meanwhile, sorry about the capture!) Ken Manheimer [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Help, please!!! __call__ problems with DTML templates
Today is not a good day:-( I've just spent 2 days trying to force __call__ to render my product properly, got every error possible at least seven times, and wasted last night working out what was wrong with Refresh (I was calling refresh on the wrong product. Duh!). Please, please, please, can someone point me in the right direction. I have a class called Element which has three components: 1. purpose: a string describing the element's role (rendered as structured text) 2. template: a string that is rendered to display the element (DTML) 3. Element inherits from Folder so it can contain sub-elements which can be included in the template For example, suppose A is an element that contains a sub-element B (i.e. B is A.B) Ahas template 'Element A contains dtml-var B' and purpose 'Contain B' Bhas template 'element B, which contains nix' and purpose 'Element with no subelement' Now for the tricky bit: "dtml-var A" needs to be rendered one of three possible ways depending on a variable in the REQUEST. So __call__ needs to return one of - case a: the purpose property (as structured text) wrapped in [] - case b: render the template, with sub-elements properly rendered - case c: render the template, with sub-elements wrapped in [] showing their purpose Then 'dtml-var A' must be rendered in the three cases as: - case a: '[Contain B]' - case b: 'Element A contains element B, which contains nix' - case c: 'Element A contains [Element with no subelement]' To do this, I need to write my own __call__ method since __call__ is what detemines how objects gets rendered in DTML (is this correct?) def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): With this, I discovered that 'dtml-var A' gives client=None and REQUEST={} while 'dtml-var "A(_,REQUEST)"' gets client=_ and REQUEST=REQUEST. But I cannot for the life of me, work out how to do what I need. In particular: 1.) How do you magically get the DTML context from 'dtml-var A' without having to resort to 'dtml-var "A(_,REQUEST)"' in the templates? In the __call__ methods of different classes, I've seen some code like: 'if REQUEST is None and not kw: REQUEST=self.REQUEST' (from Catalog.py) and other code like 'if hasattr(self, 'aq_explicit'): bself=self.aq_explicit else: bself=self' and 'security=getSecurityManager() security.addContext(self)' (from DTMLDocument.py) I can't see any consistency in what these classes are doing, so I don't know what I need to do. 2.) How to convert an arbitrary text string into rendered DTML inside a python product method? How do you get the object's properties, REQUEST and acquisition context all in the namespace? I've been trying code like: template = 'span class="purpose"dtml-var purpose fmt="structured_text"/span' dtml = HTML(template, globals()) rendered = dtml(self, REQUEST) but this doesn't work. All the example classes I've seen (such as ZWikiPage.py in ZWiki) use DTMLDocument as their base class so can call DTMLDocument's __call__ on themselves as in text = apply(DTMLDocument.__call__,(self, client, REQUEST, RESPONSE), kw)(ZWikiPage.py, line 135) This doesn't help me because I don't have DTMLDocument as a base class. Looking through the source for DTMLMethod etc is not very clear because lots of "apply(__call__,(...),kw)" calls are all mixed up with acquisition code. 3.) Do I need to write a custom tag (dtml-element A) to get this behaviour? So, if anyone out in Zope land can help me, I'll be eternally grateful. I've exhausted my patience looking through the NIP mailing list archives, the How-Tos and the Zope site and need to have something to demonstrate on Thursday. Thanks in advace, Stephen P.S. ChrisW, searching NIP for "__call__" returns every message with 'call' in it, which is not quite the same thing! ___ Stephen Simmons HealthArena B.V. phone +31 20 486 0555 mobile +31 6 1505 3086 [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )