[Zope] Persistence.py does not define Persistent
Dieter Maurer
dieter@handshake.de
Tue, 15 Aug 2000 10:38:19 +0200 (CEST)
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