Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures on Python 3.9 #44

Closed
stratakis opened this issue Jan 7, 2020 · 2 comments
Closed

Test failures on Python 3.9 #44

stratakis opened this issue Jan 7, 2020 · 2 comments

Comments

@stratakis
Copy link

@stratakis stratakis commented Jan 7, 2020

Running the tests on Python 3.9 make two test cases fail.

ERROR: test_unpack_composite (test_umsgpack.TestUmsgpack)
Traceback (most recent call last):
File "/builddir/build/BUILD/u-msgpack-python-2.5.0/test_umsgpack.py", line 439, in test_unpack_composite
self.assertEqual(umsgpack.unpackb(data), obj)
File "/builddir/build/BUILD/u-msgpack-python-2.5.0/umsgpack.py", line 1019, in _unpackb3
return _unpack(io.BytesIO(s), options)
File "/builddir/build/BUILD/u-msgpack-python-2.5.0/umsgpack.py", line 833, in _unpack
return _unpack_dispatch_table[code](code, fp, options)
File "/builddir/build/BUILD/u-msgpack-python-2.5.0/umsgpack.py", line 813, in _unpack_map
elif not isinstance(k, collections.Hashable):
AttributeError: module 'collections' has no attribute 'Hashable'

ERROR: test_unpack_exceptions (test_umsgpack.TestUmsgpack)
Traceback (most recent call last):
File "/builddir/build/BUILD/u-msgpack-python-2.5.0/test_umsgpack.py", line 446, in test_unpack_exceptions
umsgpack.unpackb(data)
File "/builddir/build/BUILD/u-msgpack-python-2.5.0/umsgpack.py", line 1019, in _unpackb3
return _unpack(io.BytesIO(s), options)
File "/builddir/build/BUILD/u-msgpack-python-2.5.0/umsgpack.py", line 833, in _unpack
return _unpack_dispatch_table[code](code, fp, options)
File "/builddir/build/BUILD/u-msgpack-python-2.5.0/umsgpack.py", line 813, in _unpack_map
elif not isinstance(k, collections.Hashable):
AttributeError: module 'collections' has no attribute 'Hashable'

This is due to the classes from collections.abc not being exposed anymore through the collections module: https://docs.python.org/3.9/whatsnew/3.9.html#removed

In that case Hashable needs to be imported from collections.abc

@hroncok
Copy link

@hroncok hroncok commented Jan 7, 2020

Fixed in 5ece62a

@stratakis
Copy link
Author

@stratakis stratakis commented Jan 7, 2020

Ah we need to update our package then. Closing this and sorry for the noise.

@stratakis stratakis closed this Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.