Tim,
That's an awesome clue. Thanks!
Jim
On Jun 16, 2007, at 3:05 PM, Tim Peters wrote:
[Nikhil <[EMAIL PROTECTED]>]
Testing of ZEO is hanging in Python2.5. When i traced i think it is
failing to connect and is attempting to reconnect continously in
client.py.
Does this happen due to changes in socket module or due to in
threading module ?
FWIW, when I looked at this about a year ago, the immediate cause was
that Python 2.5 changed exceptions from old-style classes to new-style
classes. As a result, a bit of low-level code in ZEO's lowest-level
communication layer wasn't recognizing exceptions correctly.
Don't know whether that's still the case. IIRC, it's at least part of
the problem if the find_global() function in ZEO/zrpc/marshal.py still
contains this block:
# TODO: is there a better way to do this?
if type(r) == types.ClassType and issubclass(r, Exception):
return r
types.ClassType is the type of an old-style class:
class C: pass # old-style class
type(C)
<type 'classobj'>
class C(object): pass # new-style class
type(C)
<type 'type'>
2.4:
type(Exception)
<type 'classobj'>
2.5:
type(Exception)
<type 'type'>
Of course it would be wise to review all uses of types.ClassType in
ZODB.
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev
--
Jim Fulton mailto:[EMAIL PROTECTED] Python
Powered!
CTO (540) 361-1714
http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev