ZODB: What does change if classes get persistent?
akuchlin at mems-exchange.org
Thu Feb 8 10:35:23 EST 2001
"Franz GEIGER" <fgeiger at datec.at> writes:
> class TCarts(TCollection, Persistence.Persistent):
> def __init__(self):
> TCollection.__init__(self, self)
> TypeError: unbound method must be called with class instance 1st argument
> upon creation.
> Does anybody know what's going on here behind the scenes?
Ooh, something I forgot to cover. TCarts is no longer a regular
Python class, but an ExtensionClass; this breaks the usual convention
for calling superclass constructors. (Does Python 2.1 try to fix this?
Anyone from DC know?)
Anyway, the fix would be to use this instead:
See http://www.digicool.com/releases/ExtensionClass/ for a lengthier
discussion (search for __init__).
> File "C:\Program Files\Python20\ZODB\lock_file.py", line 115, in lock_file
> raise error, (StorageSystemError: Could not lock the database file.
> There must be another process that has opened the file.
Use ZEO if you need to have multiple processes accessing data at the
same time. The lowest-level class, the Storage class, isn't written
to handle concurrent access to the same files. You probably couldn't
run two completely different instances of Oracle and point them at the
same disk partitions, either, and the ZODB's storages impose similar
More information about the Python-list