Project

General

Profile

Actions

Bug #45636

closed

nautilus: run-tox-mgr-dashboard fails in Python 3.6 environments

Added by Nathan Cutler almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The "run-tox-mgr-dashboard" test (part of "make check") in nautilus recently started failing in "pure" Python 3.6 environments (systems where Python 2 is not present at all) with the following:

03:58:23   Installing build dependencies: finished with status 'error'
03:58:23   ERROR: Command errored out with exit status 1:
03:58:23    command: /opt/j/ws/mkck/build/dashboard/py3-cov/bin/python3 /opt/j/ws/mkck/build/dashboard/py3-cov/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-68ha3s_t/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=42' wheel 'setuptools_scm[toml]>=3.4'
03:58:23        cwd: None
03:58:23   Complete output (14 lines):
03:58:23   Traceback (most recent call last):
03:58:23     File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
03:58:23       "__main__", mod_spec)
03:58:23     File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
03:58:23       exec(code, run_globals)
03:58:23     File "/opt/j/ws/mkck/build/dashboard/py3-cov/lib/python3.6/site-packages/pip/__main__.py", line 23, in <module>
03:58:23       from pip._internal.cli.main import main as _main  # isort:skip # noqa
03:58:23     File "/opt/j/ws/mkck/build/dashboard/py3-cov/lib/python3.6/site-packages/pip/_internal/cli/main.py", line 5, in <module>
03:58:23       import locale
03:58:23     File "/opt/j/ws/mkck/build/dashboard/py3-cov/lib64/python3.6/locale.py", line 16, in <module>
03:58:23       import re
03:58:23     File "/opt/j/ws/mkck/build/dashboard/py3-cov/lib64/python3.6/re.py", line 142, in <module>
03:58:23       class RegexFlag(enum.IntFlag):
03:58:23   AttributeError: module 'enum' has no attribute 'IntFlag'
03:58:23   ----------------------------------------
03:58:23 ERROR: Command errored out with exit status 1: /opt/j/ws/mkck/build/dashboard/py3-cov/bin/python3 /opt/j/ws/mkck/build/dashboard/py3-cov/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-68ha3s_t/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=42' wheel 'setuptools_scm[toml]>=3.4' Check the logs for full command output.
03:58:23 ERROR: InvocationError: '/opt/j/ws/mkck/build/dashboard/py3-cov/bin/pip install -r /opt/j/ws/mkck/src/pybind/mgr/dashboard/requirements-

Googling for the AttributeError yielded this:

https://stackoverflow.com/questions/43124775/why-python-3-6-1-throws-attributeerror-module-enum-has-no-attribute-intflag

which says:

"It's because your enum is not the standard library enum module. You probably have the package enum34 installed. . . .
Since python 3.6 the enum34 library is no longer compatible with the standard library. The library is also unnecessary, so you can simply uninstall it. . . . If you need the code to run on python versions both <=3.4 and >3.4, you can try having enum-compat as a requirement. It only installs enum34 for older versions of python without the standard library enum."

And indeed, we seem to be installing "enum34" in nautilus, because it is a dependency of the py2 teuthology. In a py3-only environment, though, it is not a teuthology dependency.


Related issues 1 (0 open1 closed)

Related to mgr - Bug #42969: python3: run-backend-api-tests.sh failsResolved

Actions
Actions #1

Updated by Nathan Cutler almost 4 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
Actions #2

Updated by Nathan Cutler almost 4 years ago

  • Related to Bug #42969: python3: run-backend-api-tests.sh fails added
Actions #3

Updated by Nathan Cutler almost 4 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 35174
Actions #4

Updated by Neha Ojha almost 4 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF