[Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joshua Immanuel
Hello all, I am using zope.formlib.form package for my forms, when overriding the 'createAndAdd' method of form.AddForm I don't explicitly do the zope.event.notify(ObjectCreatedEvent(..)) call. I just add the data to self.context and it gets added (persisted) in the ZODB. But

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Charlie Clark
Hi Joshua, Am 08.06.2011, 10:34 Uhr, schrieb Joshua Immanuel j...@hipro.co.in: Hello all, I am using zope.formlib.form package for my forms, when overriding the 'createAndAdd' method of form.AddForm I don't explicitly do the zope.event.notify(ObjectCreatedEvent(..)) call. I just add

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
Hello Charlie, On Wed, 2011-06-08 at 10:48 +0200, Charlie Clark wrote: From memory I can recall something similar related to making changes to copies of instance attributes but failing to apply them to attributes and needing to specifically go context.attribute = form_result for the changes

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Charlie Clark
Hi Joe, Am 08.06.2011, 11:05 Uhr, schrieb Joe Steeve j...@hipro.co.in: Supposing, we have a form action like: @form.action('Apply') def handle_edit(self, action, data): self.context.name += Blah This change is visible in subsequent requests. i.e if we view this

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
Hello Charlie, On Wed, 2011-06-08 at 11:16 +0200, Charlie Clark wrote: I'm surprised at this but I'm not familiar with Bluebream's transactional processing. The quickest thing to do is to reenable notification and add a debug so that you can follow all the subscription calls and see what you

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
On Wed, 2011-06-08 at 15:01 +0530, Joe Steeve wrote: We are killing the server with a Ctrl-C. Maybe something is not getting flushed out to the disk yet? Tried this with --daemon and --stop-daemon to paster. Still no change. So, this is not an issue. -- Joe Steeve HiPro IT Solutions Pvt. Ltd.

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Charlie Clark
Am 08.06.2011, 11:31 Uhr, schrieb Joe Steeve j...@hipro.co.in: How do we get the list of subscribers for a particular event? By checking the registry for all adapters registered. from zope.component import queryAdapter queryAdapter(object, interface) ... # check the syntax and make sure you

[Zope-dev] Transaction successful, but changes not pushed to disk (was) Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
On Wed, 2011-06-08 at 11:40 +0200, Charlie Clark wrote: Further, if we have to expect the developer to manually notify after every change, it could invite unnecessary bugs. Which is why you should let the library handle this for you wherever possible and something you write tests for.

Re: [Zope-dev] Transaction successful, but changes not pushed to disk (was) Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
On Wed, 2011-06-08 at 15:23 +0530, Joe Steeve wrote: I would have been happy if the transaction failed completely. But, it had not. The transaction was successful. Subsequent requests on the same object show that the previous modifications are intact. The object's changes just did not make it

Re: [Zope-dev] zope-tests - FAILED: 9, OK: 72

2011-06-08 Thread Jan-Wijbrand Kolman
On 6/6/11 16:48 , Tres Seaver wrote: On 06/05/2011 02:24 PM, Hanno Schlichting wrote: On Sun, Jun 5, 2011 at 6:31 PM, Tres Seaver tsea...@palladion.com wrote: [1]FAILED Zope Buildbot / zope2.13-py2.7 slave-ubuntu64 https://mail.zope.org/pipermail/zope-tests/2011-June/042535.html

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Laurence Rowe
On 8 June 2011 10:05, Joe Steeve j...@hipro.co.in wrote: Hello Charlie, On Wed, 2011-06-08 at 10:48 +0200, Charlie Clark wrote: From memory I can recall something similar related to making changes to copies of instance attributes but failing to apply them to attributes and needing to

Re: [Zope-dev] zope-tests - FAILED: 17, OK: 91

2011-06-08 Thread Gediminas Paulauskas
2011/5/25 Gediminas Paulauskas mene...@pov.lt: 2011/5/25 Marius Gedminas mar...@gedmin.as: On Wed, May 25, 2011 at 09:18:46AM -0400, Tres Seaver wrote: [3]    FAILED  Zope Buildbot / zopetoolkit-1.0-py2.5 slave-osx        https://mail.zope.org/pipermail/zope-tests/2011-May/041867.html The

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
As I mentioned on a follow-up post, we figured the 'Persistent' part. :) On Wed, 2011-06-08 at 13:29 +0100, Laurence Rowe wrote: My guess is that the ObjectModifiedEvent is dispatched to your object's parent and causes something to change there, with the side effect of storing your updated

Re: [Zope-dev] zope-tests - FAILED: 8, OK: 67

2011-06-08 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [8]FAILED winbot / ztk_10 py_254_win32 https://mail.zope.org/pipermail/zope-tests/2011-June/042814.html Network timeout in bootstrap, trying to find the zc.buildout egg. Tres. - --

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Marius Gedminas
On Wed, Jun 08, 2011 at 06:20:26PM +0530, Joe Steeve wrote: As I mentioned on a follow-up post, we figured the 'Persistent' part. :) On Wed, 2011-06-08 at 13:29 +0100, Laurence Rowe wrote: My guess is that the ObjectModifiedEvent is dispatched to your object's parent and causes something

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/08/2011 01:40 PM, Marius Gedminas wrote: On Wed, Jun 08, 2011 at 06:20:26PM +0530, Joe Steeve wrote: As I mentioned on a follow-up post, we figured the 'Persistent' part. :) On Wed, 2011-06-08 at 13:29 +0100, Laurence Rowe wrote: My guess

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
On Wed, 2011-06-08 at 14:48 +0100, Laurence Rowe wrote: A BTree efficiently stores a large number of key,value pairs because the storage is split across a number of persistent objects (buckets) each of which stores a part of the tree, so only the bucket that changes needs to be stored when a

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Laurence Rowe
On 8 June 2011 20:47, Joe Steeve j...@hipro.co.in wrote: On Wed, 2011-06-08 at 14:48 +0100, Laurence Rowe wrote: A BTree efficiently stores a large number of key,value pairs because the storage is split across a number of persistent objects (buckets) each of which stores a part of the tree, so

Re: [Zope-dev] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joe Steeve
On Wed, 2011-06-08 at 21:46 +0100, Laurence Rowe wrote: Okay. So, if there are (say) 10 objects in a bucket. And, one of them changes. Then, are all 10 objects serialized again? If they are not persistent objects themselves then yes. Ok. That explains. Thank you :) -- Joe Steeve HiPro IT

Re: [Zope-dev] [BlueBream] Reg. persisting data in ZODB via forms

2011-06-08 Thread Joshua Immanuel
Hello Jonah, Thanks for the reply. On Wed, 2011-06-08 at 09:53 -0700, Jonah Crawford wrote: Joshua - persistence in zope occurs based on assignment of values. You have to explicitly assign the values your form collects to the object you're persisting. That object then gets pickled to the ZODB