Thanks to visit codestin.com
Credit goes to github.com

Skip to content

5.0.0 fails with flake8 #406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xqt opened this issue Oct 2, 2022 · 3 comments · Fixed by nils-braun/b2luigi#176
Closed

5.0.0 fails with flake8 #406

xqt opened this issue Oct 2, 2022 · 3 comments · Fixed by nils-braun/b2luigi#176

Comments

@xqt
Copy link

xqt commented Oct 2, 2022

The new import_meta_data 5.0.0 fails with hacking flake8 extension:

12:58:37 hacking-py37 cannot reuse: no previous config /src/.tox/hacking-py37/.tox-config1
12:58:37 hacking-py37 create: /src/.tox/hacking-py37
12:58:37 [302] /src/.tox$ /usr/bin/python3 -m virtualenv --no-download --python /usr/bin/python3 hacking-py37 >hacking-py37/log/hacking-py37-0.log
12:58:37 hacking-py37 installdeps: .[hacking]
12:58:37 [309] /src$ /src/.tox/hacking-py37/bin/python -m pip install '.[hacking]' >.tox/hacking-py37/log/hacking-py37-1.log
12:58:42 hacking-py37 develop-inst: /src
12:58:42 write config to /src/.tox/hacking-py37/.tox-config1 as 'a333bea1ff24374b5ce3a229b583f709ed538d6822235f40ac210c70df65a22b /usr/bin/python3\n3.21.4 0 1 0\n00000000000000000000000000000000 .[hacking]'
12:58:42 [321] /src$ /src/.tox/hacking-py37/bin/python -m pip install --exists-action w -e . >.tox/hacking-py37/log/hacking-py37-2.log
12:58:44 [332] /src$ /src/.tox/hacking-py37/bin/python -m pip freeze >.tox/hacking-py37/log/hacking-py37-3.log
12:58:44 hacking-py37 installed: certifi==2022.9.24,charset-normalizer==2.1.1,flake8==3.8.4,hacking==4.1.0,idna==3.4,importlib-metadata==5.0.0,mccabe==0.6.1,pycodestyle==2.6.0,pyflakes==2.2.0,# Editable Git install with no remote (pywikibot==8.0.0.dev0),-e /src,requests==2.28.1,typing_extensions==4.3.0,urllib3==1.26.12,zipp==3.8.1
12:58:44 hacking-py37 run-test-pre: PYTHONHASHSEED='2157981050'
12:58:44 hacking-py37 run-test: commands[0] | flake8 --version
12:58:44 [335] /src$ /src/.tox/hacking-py37/bin/flake8 --version
12:58:44 Traceback (most recent call last):
12:58:44   File "/src/.tox/hacking-py37/bin/flake8", line 8, in <module>
12:58:44     sys.exit(main())
12:58:44   File "/src/.tox/hacking-py37/lib/python3.7/site-packages/flake8/main/cli.py", line 22, in main
12:58:44     app.run(argv)
12:58:44   File "/src/.tox/hacking-py37/lib/python3.7/site-packages/flake8/main/application.py", line 363, in run
12:58:44     self._run(argv)
12:58:44   File "/src/.tox/hacking-py37/lib/python3.7/site-packages/flake8/main/application.py", line 350, in _run
12:58:44     self.initialize(argv)
12:58:44   File "/src/.tox/hacking-py37/lib/python3.7/site-packages/flake8/main/application.py", line 330, in initialize
12:58:44     self.find_plugins(config_finder)
12:58:44   File "/src/.tox/hacking-py37/lib/python3.7/site-packages/flake8/main/application.py", line 153, in find_plugins
12:58:44     self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
12:58:44   File "/src/.tox/hacking-py37/lib/python3.7/site-packages/flake8/plugins/manager.py", line 357, in __init__
12:58:44     self.namespace, local_plugins=local_plugins
12:58:44   File "/src/.tox/hacking-py37/lib/python3.7/site-packages/flake8/plugins/manager.py", line 238, in __init__
12:58:44     self._load_entrypoint_plugins()
12:58:44   File "/src/.tox/hacking-py37/lib/python3.7/site-packages/flake8/plugins/manager.py", line 254, in _load_entrypoint_plugins
12:58:44     eps = importlib_metadata.entry_points().get(self.namespace, ())
12:58:44 AttributeError: 'EntryPoints' object has no attribute 'get'
12:58:44 ERROR: InvocationError for command /src/.tox/hacking-py37/bin/flake8 --version (exited with code 1)

See CI test here

It works with the previous release 4.13.0:

@jaraco
Copy link
Member

jaraco commented Oct 2, 2022

It's a known issue that flake8 relies on the deprecated interfaces removed in importlib_metadata 5. I've attempted to engage with the maintainers of that project, but they refuse to engage and dismiss my proposals without suggesting alternatives. Flake8 does declare a dependency on importlib_metadata<4.3, so the fact that an incompatible version of importlib_metadata is being installed is probably an issue with the environment setup.

I do see that I can replicate the issue with pip install hacking (via pip-run):

 draft $ docker run -it jaraco/multipy-tox py -3.7 -m pip-run hacking -- -c pass
Collecting hacking
  Downloading hacking-4.1.0-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.2/42.2 kB 1.6 MB/s eta 0:00:00
Collecting flake8<3.9.0,>=3.8.0
  Downloading flake8-3.8.4-py2.py3-none-any.whl (72 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.9/72.9 kB 8.9 MB/s eta 0:00:00
Collecting mccabe<0.7.0,>=0.6.0
  Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting pycodestyle<2.7.0,>=2.6.0a1
  Downloading pycodestyle-2.6.0-py2.py3-none-any.whl (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.4/41.4 kB 12.4 MB/s eta 0:00:00
Collecting importlib-metadata
  Downloading importlib_metadata-5.0.0-py3-none-any.whl (21 kB)
Collecting pyflakes<2.3.0,>=2.2.0
  Downloading pyflakes-2.2.0-py2.py3-none-any.whl (66 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.0/67.0 kB 16.6 MB/s eta 0:00:00
Collecting typing-extensions>=3.6.4
  Using cached typing_extensions-4.3.0-py3-none-any.whl (25 kB)
Collecting zipp>=0.5
  Downloading zipp-3.8.1-py3-none-any.whl (5.6 kB)
Installing collected packages: mccabe, zipp, typing-extensions, pyflakes, pycodestyle, importlib-metadata, flake8, hacking
Successfully installed flake8-3.8.4 hacking-4.1.0 importlib-metadata-5.0.0 mccabe-0.6.1 pycodestyle-2.6.0 pyflakes-2.2.0 typing-extensions-4.3.0 zipp-3.8.1

Even though flake8 pins importlib_metadata on Python 3.7, pip installs importlib_metadata 5.

Interestingly, if I install only flake8~=4.0.1 (the sole dependency of hacking) using the same command, the declared version of importlib_metadata is pulled:

 draft $ docker run -it jaraco/multipy-tox py -3.7 -m pip-run 'flake8~=4.0.1' -- -c pass
Collecting flake8~=4.0.1
  Downloading flake8-4.0.1-py2.py3-none-any.whl (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.1/64.1 kB 2.1 MB/s eta 0:00:00
Collecting mccabe<0.7.0,>=0.6.0
  Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting pycodestyle<2.9.0,>=2.8.0
  Downloading pycodestyle-2.8.0-py2.py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 kB 9.7 MB/s eta 0:00:00
Collecting pyflakes<2.5.0,>=2.4.0
  Downloading pyflakes-2.4.0-py2.py3-none-any.whl (69 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.7/69.7 kB 17.2 MB/s eta 0:00:00
Collecting importlib-metadata<4.3
  Downloading importlib_metadata-4.2.0-py3-none-any.whl (16 kB)
Collecting zipp>=0.5
  Downloading zipp-3.8.1-py3-none-any.whl (5.6 kB)
Collecting typing-extensions>=3.6.4
  Using cached typing_extensions-4.3.0-py3-none-any.whl (25 kB)
Installing collected packages: mccabe, zipp, typing-extensions, pyflakes, pycodestyle, importlib-metadata, flake8
Successfully installed flake8-4.0.1 importlib-metadata-4.2.0 mccabe-0.6.1 pycodestyle-2.8.0 pyflakes-2.4.0 typing-extensions-4.3.0 zipp-3.8.1

I guess there may be an issue with how pip resolves dependencies of dependencies.

Oh, I see a difference. When installing hacking from a wheel, it gets 4.1.0, which depends on flake8 3.8.x and flake8 3.8.x doesn't pin importlib_metadata.

@jaraco
Copy link
Member

jaraco commented Oct 2, 2022

There's nothing that can be done here from the perspective of importlib_metadata. The deprecation has been in place since Feb 2021 and other projects have been able to adapt to the transition. These issues were anticipated and socialized and this project has worked actively with affected projects to provide multiple avenues to navigate the transition. I'm still willing to help flake8 support the preferred interfaces. What's not going to happen is to undo the deprecation or restore support for these deprecated interfaces indefinitely (or for many years).

As a user of flake8, your best option is probably to preemptively install importlib_metadata<5 until flake8 can adapt.

@jaraco jaraco closed this as completed Oct 2, 2022
@jaraco jaraco changed the title import_meta_data 5.0.0 fails with hacking flake8 extension 5.0.0 fails with flake8 Oct 2, 2022
tony added a commit to cihai/cihai-cli that referenced this issue Oct 2, 2022
…bute 'get'

python/importlib_metadata#406

This reverts commit a37f302.

Traceback (most recent call last):
  File "~/cihai/cihai-cli/.venv/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "~/cihai/cihai-cli/.venv/lib/python3.7/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "~/cihai/cihai-cli/.venv/lib/python3.7/site-packages/flake8/main/application.py", line 363, in run
    self._run(argv)
  File "~/cihai/cihai-cli/.venv/lib/python3.7/site-packages/flake8/main/application.py", line 350, in _run
    self.initialize(argv)
  File "~/cihai/cihai-cli/.venv/lib/python3.7/site-packages/flake8/main/application.py", line 330, in initialize
    self.find_plugins(config_finder)
  File "~/cihai/cihai-cli/.venv/lib/python3.7/site-packages/flake8/main/application.py", line 153, in find_plugins
    self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
  File "~/cihai/cihai-cli/.venv/lib/python3.7/site-packages/flake8/plugins/manager.py", line 357, in __init__
    self.namespace, local_plugins=local_plugins
  File "~/cihai/cihai-cli/.venv/lib/python3.7/site-packages/flake8/plugins/manager.py", line 238, in __init__
    self._load_entrypoint_plugins()
  File "~/cihai/cihai-cli/.venv/lib/python3.7/site-packages/flake8/plugins/manager.py", line 254, in _load_entrypoint_plugins
    eps = importlib_metadata.entry_points().get(self.namespace, ())
AttributeError: 'EntryPoints' object has no attribute 'get'
@tony
Copy link

tony commented Oct 2, 2022

@jaraco @xqt I filed an issue on the flake8 side here: PyCQA/flake8#1701

Workaround is as @jaraco says above, pin importlib_metadata to <5 for now.

tony added a commit to tmux-python/tmuxp that referenced this issue Oct 2, 2022
benclifford added a commit to Parsl/parsl that referenced this issue Oct 3, 2022
`importlib-metadata 5.0.0` breaks `flake8`, causing CI to fail.

`importlib` recommends constraining `importlib < 5` until flake8 adapts.

python/importlib_metadata#406 (comment)
tomersa added a commit to intel/granulate-utils that referenced this issue Oct 3, 2022
* Tests fail on python3.7 because of a problem with the importlib_metadata package.
The issue was fixed using the workaround suggsted here: python/importlib_metadata#406 (comment)
jkrasting added a commit to jkrasting/momlevel that referenced this issue Oct 4, 2022
- Causes xarray netcdf load error
- See python/importlib_metadata#406
jkrasting added a commit to jkrasting/momlevel that referenced this issue Oct 4, 2022
* Updated readthedocs install method
* Pin importlib_metadata to < v5
  - Causes xarray netcdf load error
  - See python/importlib_metadata#406
* Update .readthedocs.yaml
* Update requirements.txt
* Update conf.py
vinnyinverso added a commit to nasa/harmony-service-lib-py that referenced this issue Oct 4, 2022
priteau added a commit to stackhpc/hardware that referenced this issue Oct 10, 2022
There is a compatibility issue with importlib-metadata and flake8 [1].

[1] python/importlib_metadata#406
priteau added a commit to stackhpc/hardware that referenced this issue Oct 10, 2022
There is a compatibility issue between importlib-metadata 5.0.0 and
flake8 under Python 3.7 [1].

[1] python/importlib_metadata#406
priteau added a commit to stackhpc/hardware that referenced this issue Oct 10, 2022
There is a compatibility issue between importlib-metadata 5.0.0 and
flake8 under Python 3.7 [1].

[1] python/importlib_metadata#406
priteau added a commit to stackhpc/hardware that referenced this issue Oct 10, 2022
There is a compatibility issue between importlib-metadata 5.0.0 and
flake8 under Python 3.7 [1].

[1] python/importlib_metadata#406
priteau added a commit to stackhpc/hardware that referenced this issue Oct 10, 2022
There is a compatibility issue between importlib-metadata 5.0.0 and
flake8 under Python 3.7 [1].

[1] python/importlib_metadata#406
spoorn added a commit to spoorn/poeblix that referenced this issue May 28, 2023
Try installing older version of importlib_metadata for python/importlib_metadata#406
spoorn added a commit to spoorn/poeblix that referenced this issue May 28, 2023
Try installing older version of importlib_metadata due to python/importlib_metadata#406
spoorn added a commit to spoorn/poeblix that referenced this issue May 28, 2023
atz added a commit to mantiumai/mantium-client-py that referenced this issue Jun 8, 2023
atz added a commit to mantiumai/mantium-client-py that referenced this issue Jun 8, 2023
Remove python 3.7 from test matrix, conflict in flake8 dependencies.

Refer to: python/importlib_metadata#406
atz added a commit to mantiumai/mantium-client-py that referenced this issue Jun 8, 2023
Remove python 3.7 from test matrix, conflict in flake8 dependencies.

Refer to: python/importlib_metadata#406
linabutler added a commit to linabutler/fathom that referenced this issue Jun 28, 2023
Flake8 3.x uses a deprecated interface that was removed in
`importlib-metadata` 5 (python/importlib_metadata#406).
andialbrecht added a commit to andialbrecht/sqlparse that referenced this issue Sep 4, 2023
fnberta added a commit to flatland-association/flatland-rl that referenced this issue Sep 11, 2023
dylanscott added a commit to hex-inc/sqlparse that referenced this issue Sep 27, 2023
* Cleanup whitespace in README.

* GitHub Actions: Add Py3.10, update Actions, more flake8 tests

"3.10" must be quoted in yaml https://dev.to/hugovk/the-python-3-1-problem-85g

* Test on Python 3.11 beta 5

* Reduce max line length in flake8 to the default of 79.

* Update authors and changelog.

* Update actions in codeql workflow.

* Fix INDICATOR keyword

* docs: Add a PiPY package badge

* Acknowledge support for Python 3.10

A subset of andialbrecht#645 
Follow on to andialbrecht#661

* DIV is Operator

* added some builtin types that can appear in Spark create table statements.

* Don't make slice copies in TokenList._token_matching().

Since we are working with indexes anyway, don't bother calling
enumerate() with a slice from self.tokens (which requires copying
memory).  Instead, just generate the indexes using range() and use
normal indexing to access the desired tokens.

The old behavior resulted in quadratic runtime with respect to the
number of tokens, which significantly impacted performance for
statements with very large numbers of tokens.

With the new behavior, the runtime is now linear with respect to the
number of tokens.

* Refactor to reduce redundant code.

* Add regex pattern to identify REGEXP as a Compasion token

* Make tzcast grouping function less eager

* Update authors and changelog.

* Add DISTINCTROW keyword (fixes andialbrecht#677).

* Update Changelog.

* CREATE TABLE tbl AS SELECT should return get_alias() for its column

* Update Changelog.

* Fixed bad parsing of create table statements that use lower case

* Update CHANGELOG.

yeah... I promise to make fewer commits like that in the future...

* add backtick to remove_quotes character list

* Update Changelog and authors.

* Add tests for utils.remove_quotes.

* Add docstring and comments.

* Allow any unicode character as identifier name (fixes andialbrecht#641).

* Bump version.

* Switch back to development mode.

* Revert "add regex pattern to identify IN as a Compasion token"

This reverts commit 28c4d40.

See andialbrecht#694. The expectation is that IN is primarily recognized as a keyword,
although it acts as a comparison operator. This also matches the definition of
IN in most SQL syntax references where it is listed as a reserved
keyword (PostgreSQL:
https://www.postgresql.org/docs/current/sql-keywords-appendix.html, MySQL:
https://dev.mysql.com/doc/refman/8.0/en/keywords.html, for example).

* Update changelog.

* Update workflow runner.

* Update tested Python versions in workflow.

* Setup a nightly build, even without changes in the module itself.

* Fix schedule trigger syntax.

* Switch to pyproject.toml (fixes andialbrecht#685).

* configurable syntax

* test configurable syntax

* remove type annotations for python 3.5 compatibility

* test for changing the regex

* lexer documentation

* flake8

* additional documentation

* change singleton behavior

* Fix get_type with comments between WITH keyword

* Cleanup regex for detecting keywords (fixes andialbrecht#709).

* CI: Use codecov action.

codecov module is deprecated and was removed from PyPI in
favor of the github action.

* Remove unnecessary parts in regex for bad escaping.

The regex tried to deal with situations where escaping in the
SQL to be parsed was suspicious.

* Testing branch

* Removed test file

* Bump version.

* Update Changelog.

* Switch back to development mode.

* Update python-app.yml: Try with 3.12-beta1

* Update python-app.yml: Revert to 3.12-dev and add check-latest

* Add classifier for Python 3.11 (fixes andialbrecht#726).

* Remove outdated and unused editorconfig.

* Drop support for Python 3.5.

* Get tox running again.

We have to pin versions for tox and virtualenv because newer versions
don't support Python 3.6 anymore.

* Don't pin virtualenv in dev section.

The requirements in dev section are more general (and may require newer versions).

* Add reminder for github release (fixes andialbrecht#732).

* Update issue templates

* Update bug_report.md

* Add link to discussion when creating issues.

* Update config.yml.

* Update test action.

* Add Code of Conduct.

* Add contributing guide.

* Create SECURITY.md

* Add Pull request template.

* Update Python version in test action.

* Updated too early... switching back to 3.12.0-beta.4.

* CI: Try to fix importlib issue with flake8.

See python/importlib_metadata#406

* Bump GitHub Actions

* Add support for Python 3.12

* Update changelog and authors.

* Ignore attributes starting with dunder in _TokenType (fixes andialbrecht#672).

This issue came up, when trying to deepcopy a parsed statement.
deepcopy uses getattr(obj, '__deepcopy__', None) to get a method
for copying an object. Before this change a new attribute
'__deepcopy__' was created as a new instance of _TokenType (a tuple).

* Simplify regex.

* Code cleanup.

---------

Co-authored-by: Andi Albrecht <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: osmnv <[email protected]>
Co-authored-by: Hao Xin <[email protected]>
Co-authored-by: Aki Ariga <[email protected]>
Co-authored-by: Simon Heisterkamp <[email protected]>
Co-authored-by: Daniel Harding <[email protected]>
Co-authored-by: JavierPan <[email protected]>
Co-authored-by: Erik Cederstrand <[email protected]>
Co-authored-by: Long Le Xich <[email protected]>
Co-authored-by: Simon Heisterkamp <[email protected]>
Co-authored-by: Shikanime Deva <[email protected]>
Co-authored-by: Kevin Stubbings <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
RdoubleA added a commit to pytorch/torchsnapshot that referenced this issue Oct 31, 2023
Summary:

Update flake8 version to avoid a dependency error (see python/importlib_metadata#406). Also fix any outstanding flake8 issues.

The broken cpu/gpu tests are being fixed in D50850008 and D50707779.

Differential Revision: D50849894
facebook-github-bot pushed a commit to pytorch/torchsnapshot that referenced this issue Oct 31, 2023
Summary:
Pull Request resolved: #162

Update flake8 version to avoid a dependency error (see python/importlib_metadata#406). Also fix any outstanding flake8 issues.

The broken cpu/gpu tests are being fixed in D50850008 and D50707779.

Reviewed By: JKSenthil

Differential Revision: D50849894

fbshipit-source-id: 1bd8e961d42d24a5faaf9934343f52b0e2c70e80
DahanDv added a commit to DahanDv/pokebase that referenced this issue Dec 12, 2023
…age for ubuntu-latest

bump flake version to work around importlib issue python/importlib_metadata#406
BrendBraeckmans added a commit to BrendBraeckmans/pyspark-nested-fields-functions that referenced this issue Dec 13, 2023
Due to using annotations we can only support python versions from 3.7 onwards so it's possible to allow all pytest versions >= 7.1.0.
Step up flake8 to at least 4.0 to overcome the issue desribed at below link:
python/importlib_metadata#406
martinpitt added a commit to martinpitt/tox-lsr that referenced this issue Apr 4, 2025
With Python 3.12 and 3.13, flake8 fails:

```
   eps = importlib_metadata.entry_points().get(self.namespace, ())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'EntryPoints' object has no attribute 'get'
```

This is somehow related to PyCQA/flake8#1701
and python/importlib_metadata#406. We can't
use the former `import_metadata < 5` workaround any more, as flake8
imports this library from Python's stdlib (`importlib.metadata`), so the
external module gets ignored.

I don't know how to fix that. As the Python version that flake8 runs
with isn't very interesting, pin it to 3.11 for the time being.
richm pushed a commit to linux-system-roles/tox-lsr that referenced this issue Apr 4, 2025
* ci: Disable fast failing

This is annoying, as it serializes the errors of different python
versions.

* ci: Ignore https://data.safetycli.com/v/75180/f17/

We control which wheels we install (which is only setuptools), but we
don't control the pip version for the test, so ignore this. This
unbreaks the Python 3.6 test.

* ci: Drop support for Python 3.8

RHEL 8 has Python 3.6, RHEL 9 has Python ≥ 3.9, currently supported
Fedoras have ≥ 3.12. So none of the platforms we currently support have
3.8.

Dropping 3.8 is helpful because that is really hard to support wrt. the
`pkg_resources` → `importlib` migration. 3.8 doesn't yet have
`importlib.resources.files()`, which we need for that. Littering the
whole code with pylint and mypy overrides for this unknown API would be
error prone and ugly.

* fix: Prefer importlib.resources over pkg_resources

`pkg_resources` was deprecated in Python 3.12 and removed from 3.13 [1].
It still lives on in the `setuptools` package, but let's just move to
the current `importlib.resources` API, see the migration guide [2].

Still keep the `pkg_resources` code path as a fallback for Python 2.

[1] https://setuptools.pypa.io/en/latest/pkg_resources.html
[2] https://importlib-resources.readthedocs.io/en/latest/migration.html

* ci: Test Python 3.12 and 3.13

As the pkg_resources module is deprecated, the pylint env now needs an
explicit setuptools dependency to be able to check it.

Signed-off-by: Martin Pitt <[email protected]>

* ci: HACK: Pin flake8 python to 3.11

With Python 3.12 and 3.13, flake8 fails:

```
   eps = importlib_metadata.entry_points().get(self.namespace, ())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'EntryPoints' object has no attribute 'get'
```

This is somehow related to PyCQA/flake8#1701
and python/importlib_metadata#406. We can't
use the former `import_metadata < 5` workaround any more, as flake8
imports this library from Python's stdlib (`importlib.metadata`), so the
external module gets ignored.

I don't know how to fix that. As the Python version that flake8 runs
with isn't very interesting, pin it to 3.11 for the time being.

---------

Signed-off-by: Martin Pitt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants