[ZODB-Dev] RE: [Zope-Annce] ZODB 3.2.4 release candidate 1released

Dieter Maurer dieter at handshake.de
Wed Sep 15 13:55:24 EDT 2004


Chris McDonough wrote at 2004-9-14 22:02 -0400:
> ...
>> I have code that expects "POSKeyError"s because it looks at
>> old ZODB state (state as it was at a given time; because some
>> objects states at that time might have been packed away, "POSKeyError"s
>> are inevitable). Of course, it catches "POSKeyError".
>
>I'm sure I just lack imagination, but I'm not sure I understand.  How
>could objects that apparently had a nonzero reference count have been
>packed away?

Assume for concreteness that I want to see a ZODB as it was
at 2004-01-01T00:00:00. Assume that I have an object O
created 2003-12-31T00:00:00 and modified yesterday.
If I did not pack the ZODB since the modification,
I can see the state of O at it was at the beginning of the year.
When I now pack the ZODB (to now) and try again, there
is no longer any state corresponding to the beginning of the year.
My special historical connection maps this to a "POSKeyError".

> ...
>I just wish it didn't subclass KeyError.  Maybe instead of going on a
>sticky jihad I should make a ZODB branch that had a POSKeyError that
>didn't subclass KeyError.  Would it be reasonable to make this change
>for 3.3 or should I just forget it?

I would forget about it.

"POSKeyError"s are sufficiently rare that they do not call
for cleanup work.

Surely, there are more pressing tasks.

-- 
Dieter


More information about the ZODB-Dev mailing list