Re: [Zope] Persistence.py does not define Persistent

2000-08-15 Thread Dieter Maurer

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

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Persistence.py does not define Persistent

2000-08-14 Thread R. David Murray

On Mon, 14 Aug 2000, Skip Montanaro wrote:
> 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.

The comment implies it should work.  There's a cPersistent in the
ZODB directory, which I think is the ExtensionClass you are looking
for.  from ZODB.cPersistence import Persistent seems to do
something...but PersistentMapping.py in the ZODB directory just
does an 'import Persistence', so I don't see why that doesn't work
when I try it from the python command line.

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Persistence.py does not define Persistent

2000-08-14 Thread Skip Montanaro


I'm trying to publish my own module with ZServer (from Zope 2.2.0).  I get
the following traceback:

Traceback (most recent call last):
  File "z2.py", line 673, in ?
from AccessControl.User import super
  File "/home/beluga/skip/src/Zope-2.2.0-src/lib/python/AccessControl/User.py", 
line 89, in ?
import Globals, socket, regex, SpecialUsers
  File "/home/beluga/skip/src/Zope-2.2.0-src/lib/python/Globals.py", line 90, in ?
import Acquisition, ComputedAttribute, App.PersistentExtra, os
  File "/home/beluga/skip/src/Zope-2.2.0-src/lib/python/App/PersistentExtra.py", 
line 87, in ?
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.

Suggestions?

-- 
Skip Montanaro ([EMAIL PROTECTED])
http://www.mojam.com/
http://www.musi-cal.com/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )