[nikhil n]
ZODB shows an error when tested with
python2.5.(http://zope3.pastey.net/52960)
I think Python 2.5 unified long and normal integer and this caused
the error.


This is actually due to changes in Python's `struct` module, more
accidentally than not related to the ongoing int/long unification.
Here's a little program:

import struct
x = struct.pack(">Q", 42)
print repr(struct.unpack(">Q", x))

Under 2.4 that prints (42L,), under 2.5 (42,).  ZODB's u64() is a
wrapper around a similar struct.unpack() call, so inherits the same
behavior.

Is it enough that we add a renormalizer in testrunner.py?

I think it's better to change the specific test that failed; e.g., change the

   u64(oid)

part to

   int(u64(oid))

in the test, and change the expected output to match the new output,
That way the test will pass under all versions of Python, without
anything hidden in magical normalizers.
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to