← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1856600] [NEW] Unit test jobs are failing with ImportError: cannot import name 'engine' from 'flake8'

 

Public bug reported:

Neutron unit test CI jobs are failing with the following error:

=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: neutron.tests.unit.hacking.test_checks
Traceback (most recent call last):
  File "/usr/lib/python3.7/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/hacking/test_checks.py", line 15, in <module>
    from flake8 import engine
ImportError: cannot import name 'engine' from 'flake8' (/home/zuul/src/opendev.org/openstack/neutron/.tox/py37/lib/python3.7/site-packages/flake8/__init__.py)

Example:
https://e859f0a6f5995c9142c5-a232ce3bdc50fca913ceba9a1c600c62.ssl.cf5.rackcdn.com/572767/23/check
/openstack-tox-py37/1d036e0/job-output.txt

Looks like flake8 no longer has an engine but they had kept the api for
backward compatibility [1], perhaps they broke it somehow.

[1] based on comment in
https://gitlab.com/pycqa/flake8/blob/master/src/flake8/api/legacy.py#L3

** Affects: neutron
     Importance: Critical
     Assignee: Nate Johnston (nate-johnston)
         Status: In Progress


** Tags: gate-failure

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1856600

Title:
  Unit test jobs are failing with ImportError: cannot import name
  'engine' from 'flake8'

Status in neutron:
  In Progress

Bug description:
  Neutron unit test CI jobs are failing with the following error:

  =========================
  Failures during discovery
  =========================
  --- import errors ---
  Failed to import test module: neutron.tests.unit.hacking.test_checks
  Traceback (most recent call last):
    File "/usr/lib/python3.7/unittest/loader.py", line 436, in _find_test_path
      module = self._get_module_from_name(name)
    File "/usr/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name
      __import__(name)
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/hacking/test_checks.py", line 15, in <module>
      from flake8 import engine
  ImportError: cannot import name 'engine' from 'flake8' (/home/zuul/src/opendev.org/openstack/neutron/.tox/py37/lib/python3.7/site-packages/flake8/__init__.py)

  Example:
  https://e859f0a6f5995c9142c5-a232ce3bdc50fca913ceba9a1c600c62.ssl.cf5.rackcdn.com/572767/23/check
  /openstack-tox-py37/1d036e0/job-output.txt

  Looks like flake8 no longer has an engine but they had kept the api
  for backward compatibility [1], perhaps they broke it somehow.

  [1] based on comment in
  https://gitlab.com/pycqa/flake8/blob/master/src/flake8/api/legacy.py#L3

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1856600/+subscriptions


Follow ups