Skip to content
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

Support flake8==7.0.0 #457

Closed
jonyscathe opened this issue Jan 5, 2024 · 3 comments · Fixed by #458
Closed

Support flake8==7.0.0 #457

jonyscathe opened this issue Jan 5, 2024 · 3 comments · Fixed by #458

Comments

@jonyscathe
Copy link

jonyscathe commented Jan 5, 2024

flake8 7 is out so pyproject.toml should probably change from
"flake8 >= 6.0.0, < 7.0.0",
to
"flake8 >= 6.0.0, < 8.0.0",

as the breaking changes in flake8==7.0.0 are pretty minor.

I would also consider removing the upper bound as well. Flake8 breaking changes are often pretty minor and often don't break anything to do with extensions. And each time there is a new flake8 version, it takes weeks for all the extensions to update their upper bounds for flake8.

https://iscinumpy.dev/post/bound-version-constraints/

@AlexWaygood
Copy link
Collaborator

Thanks for opening the issue! Yeah, I agree that upper bounds (like the one we have!) are in general bad and make things more painful for users -- sorry about that. Unfortunately, we've been pretty badly broken before by flake8 refactoring their internals (see #257). This is entirely our fault rather than flake8's -- we monkey-patch some flake8 internals in an unauthorised way -- but at the same time, it's hard to see how we could stop doing that monkeypatching while keeping our full feature set. So, unfortunately, I think we need to keep the upper bound here.

@AlexWaygood
Copy link
Collaborator

AlexWaygood commented Jan 5, 2024

@jonyscathe, the fix is included in flake8-pyi==24.1.0, which I just released: https://pypi.org/project/flake8-pyi/24.1.0/

@jonyscathe
Copy link
Author

Thanks for the quick fix. And understand not wanting to un-pin the upper bound if you are monkey patching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants