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

Detect incompatibile mypy version and print a warning #1793

Open
intgr opened this issue Oct 23, 2023 · 0 comments
Open

Detect incompatibile mypy version and print a warning #1793

intgr opened this issue Oct 23, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed mypy-plugin Issues specific to mypy_django_plugin

Comments

@intgr
Copy link
Collaborator

intgr commented Oct 23, 2023

Every now and then, users report issues when using the django-stubs mypy plugin with old mypy versions that are not compatible, which may be due to being unaware of the coupling between these packages, or just by mistake. E.g. #1784, #1434.

Mypy's plugin API has been pretty stable recently, but it still happens occasionally that we introduce dependency on new mypy features or APIs that breaks older mypy, e.g. #1703

So to save developer time as well as users' time, we should consider issuing a warning or error message, to make debugging this easier.

Of course there's a balance to be struck here. In my projects, I often upgrade mypy out of sync with django-stubs's official compatible-mypy; mypy's version is sometimes one major version ahead or behind compatible-mypy. And I think we shouldn't prevent that use case.

@intgr intgr added enhancement New feature or request help wanted Extra attention is needed mypy-plugin Issues specific to mypy_django_plugin labels Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed mypy-plugin Issues specific to mypy_django_plugin
Development

No branches or pull requests

1 participant