zopefoundation / persistent

automatic persistence for Python objects
https://pypi.org/project/persistent/
Other
46 stars 28 forks source link

CI for travis and appveyor #36

Closed fgregg closed 8 years ago

fgregg commented 8 years ago

Attn @tseaver and @mgedmin

mgedmin commented 8 years ago

(Please ping me again next week if I fail to find the time to look at this this week. I care about wheels on PyPI, I'm just a bit burned out at the moment.)

tseaver commented 8 years ago

@mgedmin Will do -- I understand completely about depleting one's stack of "round tuits."

fgregg commented 8 years ago

Is there any interest in doing this too? If so, I'll update the PR slightly.

mgedmin commented 8 years ago

LGTM.

I believe you'll need new secrets -- at least for Travis, the encryption keys are per repository:

  secure: "crhnoUI22xUnHzK9B7DY/okdKNVqc5FEbMzV8qj8iclhZpJTZ+D7z2nmEDZuWes3Ar7TlinM9cI4AP0irmjSJMJOKMKXv3ucb7Rr85c7wn0HuKFI1QJwV7OO5kVIbX+McQYmASXZEsl5lDwF4hi1JMKFOwVEU7X6O4u03L3qRrI="

I don't remember how Appveyor's secure variables work. https://ci.appveyor.com/tools/encrypt doesn't ask for the repo name, so maybe the encryption key is tied to my user account? I've added https://ci.appveyor.com/project/mgedmin/persistent.

fgregg commented 8 years ago

@mgedmin you don't need to update the password for appveyor

fgregg commented 8 years ago

@tseaver got tests failing on python3 x64

https://ci.appveyor.com/project/mgedmin/persistent/build/1.0.1/job/j1ci6ednqp07mkk7

mgedmin commented 8 years ago

The failures are

======================================================================
FAIL: test_hash_equal (persistent.tests.test_timestamp.PyAndCComparisonTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\projects\persistent\persistent\tests\test_timestamp.py", line 260, in test_hash_equal
    self.assertEqual(hash(c), hash(py))
AssertionError: 2875592705 != -1419374591

======================================================================
FAIL: test_hash_equal_constants (persistent.tests.test_timestamp.PyAndCComparisonTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\projects\persistent\persistent\tests\test_timestamp.py", line 327, in test_hash_equal_constants
    self.assertEqual(hash(c), -721379967)
AssertionError: 3573587329 != -721379967

The hashes are equal mod 2**32. The tests pass on winbot, which is running a 32-bit Python.

The failing AppVeyor build is using a 64-bit Python.

This looks like a genuine bug in the test suite:

    def test_hash_equal_constants(self):
        ...
        is_32_bit = persistent.timestamp.c_long == ctypes.c_int32 or _is_jython                                                                     
        ....
        if is_32_bit:
            self.assertEqual(hash(c), -721379967)
        else:
            self.assertEqual(hash(c), 1000006000001)

Ha! On 64-bit Windows long is 32-bits long!

I suggest you file a separate issue for this bug.

fgregg commented 8 years ago

Does this https://github.com/zopefoundation/persistent/issues/38 failure block this PR?

mgedmin commented 8 years ago

Compromise: let's comment out the 64-bit Python in appeyor.yml and merge this one, then uncomment it when the fix for #38 lands.

fgregg commented 8 years ago

Sounds fine to me. Then this is ready to merge.

fgregg commented 8 years ago

Do you want to cut a new release, or wait till #38 is fixed?

tseaver commented 8 years ago

I'd rather wait until Appveyor's tests pass.