Skip to content

Commit

Permalink
limit broken importlib-metadata CC @jaraco
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jun 8, 2021
1 parent 72f64e4 commit 975a3f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -41,7 +41,7 @@ install_requires=
pyflakes >= 2.3.0, < 2.4.0
pycodestyle >= 2.7.0, < 2.8.0
mccabe >= 0.6.0, < 0.7.0
importlib-metadata; python_version<"3.8"
importlib-metadata<4.3; python_version<"3.8"

python_requires = >=3.6

Expand Down

6 comments on commit 975a3f4

@jaraco
Copy link
Contributor

@jaraco jaraco commented on 975a3f4 Jun 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think this approach is adequate. It misses two likely expectations:

  • it makes flake8 incompatible with libraries that require >= 4.3 (on older Pythons, so maybe okay).
  • It fails to address the deprecation on Python 3.10. When the deprecation exclusion is removed from the stdlib, the concern will again need to be addressed.

@johnthagen
Copy link

@johnthagen johnthagen commented on 975a3f4 Oct 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a practical level, this makes pinning flake8 harder with packages like click, as if you pin your dependencies on a Python version > 3.8 but still want to support 3.7, you can get resolution errors like:

  The conflict is caused by:
      The user requested importlib-metadata==4.8.1
      click 8.0.3 depends on importlib-metadata; python_version < "3.8"
      backports-entry-points-selectable 1.1.0 depends on importlib-metadata; python_version < "3.8"
      flake8 4.0.1 depends on importlib-metadata<4.3; python_version < "3.8"

@johnthagen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply pinning importlib-metadata<4.3 makes flake8 no longer possible to install with the Markdown package which requires importlib-metadata>=4.4:

https://github.com/Python-Markdown/markdown/blob/1d41f13c774696d651921601c827ed500e2aa285/setup.py#L77

Markdown is a popular package used by MkDocs, etc., so it's a likely peer dev-dependency with flake8 for many users.

@asottile
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take it up with @jaraco -- I'm not going to play open source mafia

@jaraco
Copy link
Contributor

@jaraco jaraco commented on 975a3f4 Nov 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I submitted at least two merge requests at https://gitlab.com/pycqa/flake8/, a history that seems to have been erased which were subsequently migrated to #1004 and #1011. In those requests, I specifically presented different options that would maximize compatibility for now and the future. If I recall correctly, those requests were summarily closed without guidance on how to proceed. I requested to have a call to try to clear the air and work out a solution, but that request went unanswered. It appears there's nothing I can do to help the flake8 project through this transition. python/importlib_metadata#319 explains the motivation for the commit and the lack of engagement. Please, I welcome feedback on how importlib_metadata could be less disruptive (and still achieve its goals).

@asottile
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PRs referenced above did not improve the situation and instead added more dependencies with the same unreliable author which caused the issues in the first place.

I as well as others have provided feedback many times for both importlib.metadata as well as importlib.resources and its aggressive deprecation of working and widely adopted apis.

I'm not going to rehash that here nor continue that argument.

While you say you welcome feedback, you've repeatedly dismissed it as "they're just wrong" and have not truly listened -- instead bulldozing through changes and causing quite a lot of community disruption.

again, I'm not going to continue this discussion -- there's a reason the related threads are locked and unfortunately github does not provide moderation tools for commit comments

Please sign in to comment.