--python-version 3.9 should warn about generic usages
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Feature
From the Python documentation:
The redundant types are deprecated as of Python 3.9 but no deprecation warnings will be issued by the interpreter. It is expected that type checkers will flag the deprecated types when the checked program targets Python 3.9 or newer.
However that does not seem to be the case with mypy even if it's run with --python-version 3.9.
Pitch
Currently there is no way to learn about these deprecation warnings in automated way, because they're not issued by anything, which makes making the code future-proof a hassle.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how mypy handles the --python-version 3.9 target and where it analyzes generic type usages. Compare that behavior with the Python documentation’s deprecated redundant types, then add diagnostics for the targeted usages and verify that warnings appear when checking code against Python 3.9.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100