Public bug reported: Hi,
Running `flake8` `5.0.4-4` included with Noble, I'm getting the following errors: | ]$ flake8 pe.py | Traceback (most recent call last): | File "/usr/lib/python3/dist-packages/flake8/plugins/finder.py", line 296, in _load_plugin | obj = plugin.entry_point.load() | ^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 205, in load | module = import_module(match.group('module')) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module | return _bootstrap._gcd_import(name[level:], package, level) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "<frozen importlib._bootstrap>", line 1387, in _gcd_import | File "<frozen importlib._bootstrap>", line 1360, in _find_and_load | File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked | File "<frozen importlib._bootstrap>", line 935, in _load_unlocked | File "<frozen importlib._bootstrap_external>", line 995, in exec_module | File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed | File "/usr/lib/python3/dist-packages/flake8/plugins/pycodestyle.py", line 25, in <module> | from pycodestyle import missing_whitespace_around_operator as _missing_whitespace_around_operator # noqa: E501 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ImportError: cannot import name 'missing_whitespace_around_operator' from 'pycodestyle' (/usr/lib/python3/dist-packages/pycodestyle.py). Did you mean: 'whitespace_around_operator'? | | During handling of the above exception, another exception occurred: | | Traceback (most recent call last): | File "/usr/bin/flake8", line 33, in <module> | sys.exit(load_entry_point('flake8==5.0.4', 'console_scripts', 'flake8')()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3/dist-packages/flake8/main/cli.py", line 22, in main | app.run(argv) | File "/usr/lib/python3/dist-packages/flake8/main/application.py", line 336, in run | self._run(argv) | File "/usr/lib/python3/dist-packages/flake8/main/application.py", line 324, in _run | self.initialize(argv) | File "/usr/lib/python3/dist-packages/flake8/main/application.py", line 302, in initialize | self.find_plugins( | File "/usr/lib/python3/dist-packages/flake8/main/application.py", line 128, in find_plugins | self.plugins = finder.load_plugins(raw, opts) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3/dist-packages/flake8/plugins/finder.py", line 370, in load_plugins | return _classify_plugins(_import_plugins(plugins, opts), opts) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3/dist-packages/flake8/plugins/finder.py", line 312, in _import_plugins | return [_load_plugin(p) for p in plugins] | ^^^^^^^^^^^^^^^ | File "/usr/lib/python3/dist-packages/flake8/plugins/finder.py", line 298, in _load_plugin | raise FailedToLoadPlugin(plugin.package, e) | flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle" due to cannot import name 'missing_whitespace_around_operator' from 'pycodestyle' (/usr/lib/python3/dist-packages/pycodestyle.py). Commenting that out in `/usr/lib/python3/dist- packages/flake8/plugins/pycodestyle.py`, I get others. It looks like this is fixed upstream in https://github.com/PyCQA/flake8/commit/9786562feb573d30c73f18e1a0a6685c8584e9b5 Can we please include this? ** Affects: flake8 (Ubuntu) Importance: Undecided Status: New ** Affects: flake8 (Ubuntu Noble) Importance: Undecided Status: New ** Also affects: flake8 (Ubuntu Noble) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2056093 Title: ImportError: cannot import name 'missing_whitespace_around_operator' from 'pycodestyle' (/usr/lib/python3/dist-packages/pycodestyle.py). Did you mean: 'whitespace_around_operator'? To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/flake8/+bug/2056093/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs