[opensuse-python] python-enum34 missing the auto class
Hi! I have to package the Python module "requests-auth" which is a transitive dependency for Oracle's Cloud SDK which we need in the Public Cloud Team [1]. While creating the package was not a problem, I'm having issues with running the testsuite which fails with Python 2.7 as the enum module from python-enum34 is missing the auto module: [ 34s] ====================================================================== [ 34s] ERROR: tests.test (unittest.loader.ModuleImportFailure) [ 34s] ---------------------------------------------------------------------- [ 34s] ImportError: Failed to import test module: tests.test [ 34s] Traceback (most recent call last): [ 34s] File "/usr/lib64/python2.7/unittest/loader.py", line 254, in _find_tests [ 34s] module = self._get_module_from_name(name) [ 34s] File "/usr/lib64/python2.7/unittest/loader.py", line 232, in _get_module_from_name [ 34s] __import__(name) [ 34s] File "/home/abuild/rpmbuild/BUILD/requests_auth-4.0.1/tests/test.py", line 17, in <module> [ 34s] import requests_auth [ 34s] File "/home/abuild/rpmbuild/BUILD/requests_auth-4.0.1/requests_auth/__init__.py", line 1, in <module> [ 34s] from enum import Enum, auto [ 34s] ImportError: cannot import name auto [ 34s] [ 34s] [ 34s] ---------------------------------------------------------------------- Does anyone have a suggestion how to resolve this? Should I just disable the testsuite on Python 2.7? Adrian
[1] https://build.opensuse.org/package/show/home:glaubitz:branches:devel:languag... -- To unsubscribe, e-mail: opensuse-python+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-python+owner@opensuse.org
On Thu, Feb 7, 2019 at 6:05 AM John Paul Adrian Glaubitz
Hi!
I have to package the Python module "requests-auth" which is a transitive dependency for Oracle's Cloud SDK which we need in the Public Cloud Team [1].
While creating the package was not a problem, I'm having issues with running the testsuite which fails with Python 2.7 as the enum module from python-enum34 is missing the auto module:
[ 34s] ====================================================================== [ 34s] ERROR: tests.test (unittest.loader.ModuleImportFailure) [ 34s] ---------------------------------------------------------------------- [ 34s] ImportError: Failed to import test module: tests.test [ 34s] Traceback (most recent call last): [ 34s] File "/usr/lib64/python2.7/unittest/loader.py", line 254, in _find_tests [ 34s] module = self._get_module_from_name(name) [ 34s] File "/usr/lib64/python2.7/unittest/loader.py", line 232, in _get_module_from_name [ 34s] __import__(name) [ 34s] File "/home/abuild/rpmbuild/BUILD/requests_auth-4.0.1/tests/test.py", line 17, in <module> [ 34s] import requests_auth [ 34s] File "/home/abuild/rpmbuild/BUILD/requests_auth-4.0.1/requests_auth/__init__.py", line 1, in <module> [ 34s] from enum import Enum, auto [ 34s] ImportError: cannot import name auto [ 34s] [ 34s] [ 34s] ----------------------------------------------------------------------
Does anyone have a suggestion how to resolve this? Should I just disable the testsuite on Python 2.7?
Adrian
Disabling the tests isn't going to work. Note that the error is from the top-level __init__.py file. That file is run every time anything tries using that package. So if you disable the test, you will end up with a completely broken package that will not run at all on python 2.7 (or python3 < 3.6).
From what I can tell, enum34 doesn't have the "auto" class. As its name implies, enum34 has the Python 3.4 version of enum, while the "auto" class was added in python 3.6.
You are going to need to discuss this with the people behind the package. As it stands, I don't see how the package can possibly work with any version of python less than 3.6. -- To unsubscribe, e-mail: opensuse-python+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-python+owner@opensuse.org
participants (2)
-
John Paul Adrian Glaubitz
-
Todd Rme