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

Emit warning when using mypy on python versions it doesn't support yet #9844

Closed
velit opened this issue Dec 29, 2020 · 3 comments
Closed

Emit warning when using mypy on python versions it doesn't support yet #9844

velit opened this issue Dec 29, 2020 · 3 comments
Labels

Comments

@velit
Copy link

velit commented Dec 29, 2020

Feature

When specifying a python version mypy doesn't yet fully support, emit a warning about the situation.

Pitch

Mypy 0.790 allows the specification of python 3.9 version without complaint. When using it mypy will complain about list[str] syntax because full 3.9 support is not implemented yet. Emitting a warning will make it clear to the end-user that the software is working as intended and there is no problem in their environment, mypy just doesn't fully support the requested version yet.

@velit velit added the feature label Dec 29, 2020
@abhinaypandey02
Copy link
Contributor

I can try working on this.
You mean the warning should be visible each time we check with mypy?

@velit
Copy link
Author

velit commented Dec 29, 2020

I can only tell my perspective as a user that I would've wanted some info from the tool when I request 3.9 and the tool cannot really comply accurately yet. I spent some time scouring google and docs trying to figure out if mypy supports this feature yet or if there was some problem in my configuration or environment. First hit on google was this thread #7907 which looked like it did. Finally I found this #9761 which gave me the answer that it doesn't.

As to the potential implementation of this I'm not nearly familiar enough with the tool and its user groups that I could answer the ramifications of a specific implementation. It might be problematic if the warning was always emitted and it couldn't be silenced because I can imagine there being a lot of users who would quite quickly migrate into a new python version without using any features in that new version that would cause problems with mypy.

@hauntsaninja
Copy link
Collaborator

Sorry, mypy isn't going to do this. Things mostly work from Python version to Python version. If you're interested in checking out which Python versions mypy claims to support, check out the trove classifiers (as is fairly standard across the ecosystem) over at https://pypi.org/project/mypy/ or https://github.com/python/mypy/blob/v0.790/setup.py#L158

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

No branches or pull requests

3 participants