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

tests fail python 3.5 #543

Closed
brianmay opened this issue Nov 28, 2015 · 3 comments
Closed

tests fail python 3.5 #543

brianmay opened this issue Nov 28, 2015 · 3 comments

Comments

@brianmay
Copy link

Lots of errors like the following one:

======================================================================
ERROR: Failure: ImportError (cannot import name '_uuid_generate_random')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 420, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib/python3.5/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.5/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 693, in _load
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 662, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/«PKGBUILDDIR»/kombu/tests/test_syn.py", line 9, in <module>
    from kombu.tests.case import Case, patch, module_exists
  File "/«PKGBUILDDIR»/kombu/tests/case.py", line 17, in <module>
    from kombu.utils.encoding import ensure_bytes
  File "/«PKGBUILDDIR»/kombu/utils/__init__.py", line 19, in <module>
    from uuid import UUID, uuid4 as _uuid4, _uuid_generate_random
ImportError: cannot import name '_uuid_generate_random'

----------------------------------------------------------------------

Why does kombu use _* symbols from UUID?

As far as I can tell, Python 3.5.1rc1 no longer has the _uuid_generate_random symbol, although my installation of 3.5.0 does have it.

(sid-amd64)root@prune:/home/brian/tree/debian/python-modules/kombu# python3.5
Python 3.5.1rc1 (default, Nov 24 2015, 07:26:06) 
[GCC 5.2.1 20151123] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from uuid import UUID, uuid4 as _uuid4, _uuid_generate_random
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name '_uuid_generate_random'
>>> 
@brianmay
Copy link
Author

It looks like this code is a work around from a Python 2.5 bug - as Kombu no longer appears to support Python 2.5, I suggest this work around should be removed.

@malinoff
Copy link
Contributor

Duplicate #540

@ask
Copy link
Contributor

ask commented Dec 7, 2015

Kombu 3.0.30 is on PyPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants