RE: [ZODB-Dev] know the state of an object

2005-10-14 Thread Tim Peters
[Chris Withers, about getting at the collection of modified objects] > How hard would it be to expose? The coding would be trivial in ZODB 3.6 (earliest version a new feature could land) if limited solely to Connection objects. More work to specify the interface and write tests. > Would there be

RE: [ZODB-Dev] Fixing Broken Objects?

2005-10-14 Thread Tim Peters
[Tino Wildenhain] > ... > Btw, (hijacking the thread because a bit related) how can I serialize the > state of a generator object? (e.g. for caching it between requests) > Pickle does not work for it (whyever) You cannot. A generator-iterator contains (among other things) a Python stack frame, an

RE: [ZODB-Dev] know the state of an object

2005-10-14 Thread dvd
On Thu, 2005-10-13 at 19:04 -0400, Tim Peters wrote: > > from the connection object, > > You didn't say which version of ZODB you're using. Since you believe a > Connection keeps track of which objects have been modified, I'll assume > you're using ZODB 3.3 or later (which is either true, or you

Re: [ZODB-Dev] know the state of an object

2005-10-14 Thread Jim Fulton
Tim Peters wrote: [dvd] ... So, in the end, I don't see any hope for you via this route, short of this: register an object as changed in your __setattr__ without worrying at all about _why_ __setattr__ was called. Later, when you "do something" with your list of modified objects, simply ignore

Re: [ZODB-Dev] know the state of an object

2005-10-14 Thread Chris Withers
Tim Peters wrote: I'm developing a ZODB based Collection Management software, and, for a bunch of reasons, i have to know the list of modified objects before the current transaction commit. Looking around seems there is no a public API to obtains this list That's true. How hard would it be t