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. Solved by defining a decoy class for one of the adapters so they don't conflict. * 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. 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. Marius Gedminas -- Win32-API is wonderful : Full of things to wonder about...
signature.asc
Description: Digital signature
_______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev