[ZODB-Dev] ZODB3.3.0b1 and ExtensionClass?

Jim Fulton jim at zope.com
Fri Jun 25 14:35:47 EDT 2004


Tim Peters wrote:
> [Jim Fulton, with notes about ExtensionClass vs ZODB 3.3]
> 
> Jim, trying to import Persistence using current ZODB 3.3 yields this
> message, where #2 now appears to be quite a project (to judge from
> Christian's lack of luck so far):

<shrug>

We could bother separately packaging a new-style-EC-based
Persistence if anyone wants it.

I suspect that Christian's biggest problems are due to
the fact that new-style EC's are subclasses differently from
old-style ECs.  Unless he really needs EC features (e.g. __of__
or __class_init__), he should switch to using new-style classes.

BTW, there are a fair number of examples of persistent.Persistent
subclasses, including BTrees and

http://svn.zope.org/Zope3/trunk/src/zope/app/container/_zope_app_container_contained.c?rev=25177&view=log

Jim

> """
> 
>>>>import Persistence
> 
> C:\code\zodb\src\Persistence\__init__.py:25: UserWarning: Couldn't import
> the ExtensionClass-based base class
> 
>     There are two possibilities:
> 
>     1. You don't care about ExtensionClass. You are importing
>        Persistence because that's what you imported in the past.
>        In this case, you should really use the persistent package
>        instead:
> 
>           >>> from persistent import Persistent
>           >>> from persistent.list import PersistentList
>           >>> from persistent.mapping import PersistentMapping
> 
>     2. You want your classes to be ExtensionClasses. In this case,
>        you need to install the ExtensionClass package
>        separately. ExtensionClass is no-longer included with ZODB3.
> 
> 
>   warn("""Couldn't import the ExtensionClass-based base class
> 
> """
> 
> Is it our intent now that there *be* a (sanely installable) "ExtensionClass
> package", or should I replace that part of the msg by, e.g., a link to your
> reply to Christian?
> 


-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the ZODB-Dev mailing list