Re: [Zope] Persistence.py does not define Persistent
Skip Montanaro writes:
I'm trying to publish my own module with ZServer (from Zope 2.2.0). I get the following traceback:
.... from Persistence import Persistent ImportError: cannot import name Persistent
When I look at lib/python/Persistence.py, all I see is a copyright notice and the following short doc string:
"""Provide access to Persistent and PersistentMapping
This avoids dependency on the database package name. """
I can't find a definition of an object named Persistent (probably ought to be a class or ExtensionClass, based upon the usage I saw) anywhere in the Zope 2.2.0 tree.
"Persistence" is only a "placeholder" module that gets filled by the really used Object Database package (ZODB, BoboPOS2, BoboPOS3, ...) that implements persistence. For the current Zope, "ZODB/__init__.py" fills this module with "cPersistence.Persistent" and "PersistentMapping". By the way, Andrew Kuchling works on separate packages for various Zope parts. I think, ZODB is one of this packages. There was an announcement in zope-dev. Dieter
participants (1)
-
Dieter Maurer