[ZCM] [ZC] 1725/ 1 Request "Python 2.3.x Zope 2.8 Cygwin ExtensionClass"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Tue Mar 15 10:00:41 EST 2005


Issue #1725 Update (Request) "Python 2.3.x Zope 2.8 Cygwin ExtensionClass"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1725

==============================================================
= Request - Entry #1 by Anonymous User on Mar 15, 2005 10:00 am

on Python 2.3.5 on cygwin when trying to start a database zodb throws
an exception by loading persistent classes.  here is traceback:
what did work is getting a reference to the klass's Persistent __new__
and assigning it to the klass and then constructing the object - that
worked. i.e.:

klass.__new__ = klass.__bases__[4].__new__
klass(klass, *args, **kwargs)
where klass__bases__[4] was a persistent class definition

Traceback (most recent call last):
  File "runalltests.py", line 23, in ?
    m = __import__(test)
  File "test_editform.py", line 8, in ?
    from Testing import ZopeTestCase
  File "/opt/Zope-2.8/lib/python/Testing/ZopeTestCase/__init__.py", line 7, in ?
    import ZopeLite as Zope2
  File "/opt/Zope-2.8/lib/python/Testing/ZopeTestCase/ZopeLite.py", line 135, in ?
    _cp = _theApp.Control_Panel
  File "/opt/Zope-2.8/lib/python/ZODB/Connection.py", line 813, in setstate
    self._setstate(obj)
  File "/opt/Zope-2.8/lib/python/ZODB/Connection.py", line 867, in _setstate
    self._reader.setGhostState(obj, p)
  File "/opt/Zope-2.8/lib/python/ZODB/serialize.py", line 411, in setGhostState
    state = self.getState(pickle)
  File "/opt/Zope-2.8/lib/python/ZODB/serialize.py", line 404, in getState
    return unpickler.load()
  File "/opt/Zope-2.8/lib/python/ZODB/serialize.py", line 503, in _persistent_load
    return self._conn.get(oid)
  File "/opt/Zope-2.8/lib/python/ZODB/Connection.py", line 343, in get
    obj = self._reader.getGhost(p)
  File "/opt/Zope-2.8/lib/python/ZODB/serialize.py", line 398, in getGhost
    return klass.__new__(klass, *args)
TypeError: ExtensionClass.Base.__new__(DTMLMethod) is not safe, use Persistence.Persistent.__new__()


==============================================================



More information about the Zope-Collector-Monitor mailing list