durusmail: durus-users: Why Persistent subclases are not working from "durus -c"?
Why Persistent subclases are not working from "durus -c"?
2006-04-24
Re: Why Persistent subclases are not working from "durus -c"?
2006-04-24
2006-05-08
2006-05-12
Why Persistent subclases are not working from "durus -c"?
Jesus Cea
2006-04-24
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm using durus persistent subclassing without problem, but trying to
use a persistent subclass from "durus -c", even in the trivial case, is
not working:

# durus -c
Durus (127.0.0.1:2972)
    connection -> the connection
    root       -> get(0)
    get(oid)   -> get an object
    pp(object) -> pretty-print
>>> from durus.persistent import Persistent
>>> class a(Persistent) :
....   pass
....
>>> root[0]=a()
>>> connection.commit()
Traceback (most recent call last):
  File "", line 1, in ?
  File "/usr/local/lib/python2.4/site-packages/durus/connection.py",
line 224, in commit
    data, refs = writer.get_state(obj)
  File "/usr/local/lib/python2.4/site-packages/durus/serialize.py", line
103, in get_state
    self.pickler.dump(obj.__getstate__())
PicklingError: Can't pickle : attribute lookup __builtin__.a
failed

- --
Jesus Cea Avion                         _/_/      _/_/_/        _/_/_/
jcea@argo.es http://www.argo.es/~jcea/ _/_/    _/_/  _/_/    _/_/  _/_/
jabber / xmpp:jcea@jabber.org         _/_/    _/_/          _/_/_/_/_/
                               _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRE0Qqplgi5GaxT1NAQKAEAQAkEftEUQmzfMNcTbMPtgUM/ZFYk3iiLyx
jspU3+kModU3I4gxmfqu9EOzDW82D4hT8Q2N0Zwxun6PBcps5fuSb+zlV01hZ8O1
mNZEwZDAy2Y/jMqzk+339o3QuTBMtSFmJNUCaP3Qwt4h1cyDl6qBktWzRZjnOZcf
CEblbwhrGmI=
=8kdo
-----END PGP SIGNATURE-----
reply