Re: [Zope3-dev] Testing ZODB in Python2.5.

2007-06-08 Thread nikhil n

Tim Peters [EMAIL PROTECTED] wrote:



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

 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.


Tim, thanks for your suggestion. These  errors are  corrected and the
test
will now pass  under all versions of Python.

With regards

Nikhil N

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Testing ZODB in Python2.5.

2007-06-06 Thread Benji York

nikhil n wrote:

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.

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


Looks like it to me, but you should ask the real experts at
[EMAIL PROTECTED]
--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Testing ZODB in Python2.5.

2007-06-06 Thread Tim Peters

[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