On Thu, Dec 10, 2009 at 5:58 AM, Marius Gedminas <mar...@gedmin.as> wrote:
> On Wed, Dec 09, 2009 at 01:04:03PM -0500, Jim Fulton wrote:
>> On Wed, Dec 9, 2009 at 12:06 PM, Marius Gedminas <mar...@gedmin.as> wrote:
>> > (Supporting both ZODB 3.8 and 3.9 is kinda tricky, but with some very
>> > ugly hacks I managed.)
>> This sounds like something that needs to be fixed. Can you share some of the
>> issues you ran into? (Or maybe file bugs reports.)
> Two issues only:
> * In ZODB 3.8 PersistentDict and PersistentMapping are unrelated
> classes, so if I want to have adapters for both, I have to register
> them separately in ZCML. In ZODB 3.9, PersistentDict is an alias
> for PersistentMapping, so I get a ZCML configuration conflict error
> if I have adapter directives for both.
OK, it's impractical to do anything about this.
> Solved by defining a decoy class for one of the adapters so they
> don't conflict.
Hm, I'm not sure I follow this. You could have used a different
approach of providing the second adapter registration as an override.
> * In ZODB 3.8, the 'version' argument of ClientStorage.history (as well
> as other kinds of storages, I suppose) is mandatory. In ZODB 3.9
> it's gone.
It's mandatory in ClientStorage and optional in FileStorage. (MappingStorage and
DemoStorage don't have a history method in 3.8.
I suggest we treat this as a bug in 3.8 and make the version argument
to ClientStorage's history method optional in a 3.8 bug fix release.
> Solved by peeking into the method signature with inspect.getargspec()
> and supplying a version only if it's needed.
>> In particular, I think it should be a goal that it isn't too hard to
>> write code that works with both ZODB 3.8 and 3.9.
> Normal code doesn't usually play with storage.history, I'd say, so I'm
> not too peeved by having to do various contortions.
Zope 2 had (has?) a standard view for looking at an object's history
that I found very useful. I wish there was one for Zope3.
History can be very useful in my experience.
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org