Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#79276 - [flake8] 6.0.0 not compatible with pycodestyle 2.11

Attached to Project: Arch Linux
Opened by Blair Bonnett (bcb) - Wednesday, 02 August 2023, 08:48 GMT
Last edited by Daniel M. Capella (polyzen) - Wednesday, 02 August 2023, 18:25 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

After the update of pycodestyle to 2.11.0, flake8 can no longer be used:

$ flake8
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/flake8/plugins/finder.py", line 291, in _load_plugin
obj = plugin.entry_point.load()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.11/site-packages/flake8/plugins/pycodestyle.py", line 26, 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.11/site-packages/pycodestyle.py)

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==6.0.0', 'console_scripts', 'flake8')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/flake8/main/cli.py", line 23, in main
app.run(argv)
File "/usr/lib/python3.11/site-packages/flake8/main/application.py", line 198, in run
self._run(argv)
File "/usr/lib/python3.11/site-packages/flake8/main/application.py", line 186, in _run
self.initialize(argv)
File "/usr/lib/python3.11/site-packages/flake8/main/application.py", line 165, in initialize
self.plugins, self.options = parse_args(argv)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/flake8/options/parse_args.py", line 42, in parse_args
plugins = finder.load_plugins(raw_plugins, plugin_opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/flake8/plugins/finder.py", line 365, in load_plugins
return _classify_plugins(_import_plugins(plugins, opts), opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/flake8/plugins/finder.py", line 307, in _import_plugins
return [_load_plugin(p) for p in plugins]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/flake8/plugins/finder.py", line 307, in <listcomp>
return [_load_plugin(p) for p in plugins]
^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/flake8/plugins/finder.py", line 293, 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.11/site-packages/pycodestyle.py)

It looks like [pull request #1848](https://github.com/PyCQA/flake8/pull/1848) has a fix for that which should be in the released flake8 v6.1.0.
This task depends upon

Closed by  Daniel M. Capella (polyzen)
Wednesday, 02 August 2023, 18:25 GMT
Reason for closing:  Fixed
Additional comments about closing:  1:6.1.0-1

Loading...