Comments (12)
from persistent.
I have a feeling this is because the tests run on a 32-bit build rather than because it's Windows or because it's Python 2.6.
Note that hash('a string')
will differ on 32- and 64-bit platforms (and also different Python versions may compute different hashes):
>>> hash('a string') # Python 2.6.5, Linux, 32-bit
1827144452
>>> hash('a string') # Python 2.6.9, Linux, 64-bit
-8411828025894108412
>>> hash('a string') # Python 3.4.2, Linux, 64-bit
-8227545103199816438
from persistent.
At some point Travis CI might allow us to test both 32- and 64-bit builds in the build matrix: travis-ci/travis-ci#986
from persistent.
Okay, string hashes are irrelevant for this issue:
persistent/persistent/_timestamp.c
Lines 155 to 167 in 663497d
from persistent.
Perhaps it would be sufficient to replace ctypes.c_int64
with ctypes.c_long
in pyTimeStamp.hash?
from persistent.
Unfortunately the test still fails: http://winbot.zope.org/builders/persistent_py_265_32/builds/972/steps/test/logs/stdio
Failure in test test_hash_equal_constants (persistent.tests.test_timestamp.PyAndCComparisonTests)
Traceback (most recent call last):
File "c:\Python26_32\lib\unittest.py", line 279, in run
testMethod()
File "c:\buildslave\persistent\build\persistent\tests\test_timestamp.py", line 302, in test_hash_equal_constants
self.assertEqual(hash(c), 1000006000001)
File "c:\Python26_32\lib\unittest.py", line 350, in failUnlessEqual
(msg or '%r != %r' % (first, second))
AssertionError: -721379967 != 1000006000001L
Failure in test test_py_hash_32_64_bit (persistent.tests.test_timestamp.PyAndCComparisonTests)
Traceback (most recent call last):
File "c:\Python26_32\lib\unittest.py", line 279, in run
testMethod()
File "c:\buildslave\persistent\build\persistent\tests\test_timestamp.py", line 275, in test_py_hash_32_64_bit
self.assertEqual(hash(py), bit_64_hash)
File "c:\Python26_32\lib\unittest.py", line 350, in failUnlessEqual
(msg or '%r != %r' % (first, second))
AssertionError: 1979033151 != -3850693964765720575L
from persistent.
The 1st failure (test_hash_equal_constants) is the same as before. The failure in test_hash_equal is gone. The failure in test_py_hash_32_64_bit is new.
from persistent.
In test_py_hash_32_64_bit
, I probably need to directly call __hash__
to avoid the interpreter's built-in truncating of the 64-bit value.
As for the constants, sorry I missed those the first time around. I obviously calculated those based on a 64-bit platform. What if we skip that test on a 32-bit platform?
from persistent.
By the way, these failures don't go to the "zope-dev" mailing list, like, for example, the zope.toolkit failures do. Is there some other list they go to so I could catch them earlier?
from persistent.
I found a 32-bit Python to test on, so hopefully PR #23 should really do it.
from persistent.
The failures go to [email protected], and then a daily summary is sent to [email protected] (but it's basically delayed by a whole day). I use this script to analyze the daily summaries in a non-painful way.
from persistent.
Thank you.
from persistent.
Related Issues (20)
- pypy -m pip install persistent==4.6.0 fails with ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/travis/virtualenv/pypy2.7-7.1.1/include/site' HOT 3
- Segfault in persistent 4.6.0 HOT 4
- Install _compat.h HOT 5
- AssertionError clearing PersistentMap not added to connection.
- Two potential reference leaks
- 6.4.6 test test_inst_does_not_conform_to_IExtendedPickleCache fails with latest zope.interface
- RTD out of date, needs new webhook HOT 2
- PyPy: Sweeping the cache may need to call gc.collect()
- AttributeError: '_WeakValueDictionary' object has no attribute '_addr_to_oid' HOT 1
- Issue in macOS binary wheel for 4.6.4/3.8: Illegal Instruction (my fault, but needs a change to prevent in the future) HOT 4
- C/Python difference: Setting __class__ activates in C, doesn't activate in Python HOT 4
- Move Mac and manylinux builds to GitHub Actions HOT 3
- Move to the src/ layout? HOT 2
- CI breakage: docs builds fail on GHA (yes, it's repoze.sphinx.autointerface)
- RTD should publish the changelog
- Building a wheel fails on GHA for PyPy2 on Windows
- 4.9.0: pytest is failing HOT 1
- 4.9.0: sphinx warnings `reference target not found`
- macOS: symbol not found in flat namespace '_ffi_prep_closure' HOT 2
- The python 3.11 wheel for linux x86 is missing HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from persistent.