[ZODB-Dev] Zope 2.8.0-a1 issues

Tim Peters tim at zope.com
Mon Mar 14 17:23:02 EST 2005


>>> kupu:
>>>
>>> plonelibrarytool.py - Replace ZODB.PersistentList with persistent.list
>>> plonelibrarytool.py - Replace ZODB.PersistentMapping with
>>>                               persistent.mapping

[Tim Peters]
>> ... I may have to add a hack so that the "old paths" for PersistentList
>> and PersistentMapping still work in a future ZODB 3.3 or 3.4 release.

[Christian Heimes]
> I've reported this bugs about a month ago. It's an incompatibility w/o
> migration path and b/w compatibility.

Would it help if I did what I threatened to do there?  ZODB 3.3 folded in
parts of the now-dead ZODB4, which latter renamed oodles of stuff in
incompatible ways.  Most of those got changed back again for ZODB 3.3, but
PersistentList and PersistentMapping were oddballs because they moved into
an entirely-new-in-3.3 package ("persistent").  However, the ZODB NEWS file
never said the old dotted paths would stop working, it just said the new
dotted paths were "now preferred" (see NEWS for 3.3a2).

So I consider that the old paths _did_ stop working as more a 3.3 bug than a
feature.  OTOH, if nobody cares, I won't bother -- there's so much code
putting "backward compatibility" cruft into sys.modules in 3.2 I'm not even
sure what the "old paths" were:

>>> import ZODB
>>> ZODB.__version__
'3.2.6'
>>> import PersistentMapping         # works, but not for PersistentList
>>> from Persistence import PersistentMapping  # ditto
>>> import ZODB.PersistentMapping    # works
>>> import BoboPOS.PersistentMapping # works
>>> import ZODB.PersistentList       # works
>>> import BoboPOS.PersistentList    # works
>>> import PersistentList            # fails
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named PersistentList
>>> from Persistence import PersistentList  # fails
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: cannot import name PersistentList

However, some of those _don't_ work unless you "import ZODB" first (magical
side effects).  I sure don't want to try to mimic all of these seeming
accidents.  I'd settle for just making the "ZODB.PersistentList" and
"ZODB.PersistentMapping" spellings work again.



More information about the ZODB-Dev mailing list