Missing Release for latest mypy release (1.11.0)
Bug report
What's wrong
The latest version available (3.15.0) requires a different mypy version from what the latest django-stubs latest version (5.0.4) requires. Here's a traceback when trying to use the latest version from each package
31.98 INFO: pip is looking at multiple versions of djangorestframework-stubs[compatible-mypy] to determine which version is compatible with other requirements. This could take a while.
32.00 ERROR: Cannot install django-stubs[compatible-mypy]==5.0.4, djangorestframework-stubs[compatible-mypy]==3.15.0 and mypy==1.11.1 because these package versions have conflicting dependencies.
32.00
32.00 The conflict is caused by:
32.00 The user requested mypy==1.11.1
32.00 django-stubs[compatible-mypy] 5.0.4 depends on mypy~=1.11.0; extra == "compatible-mypy"
32.00 djangorestframework-stubs[compatible-mypy] 3.15.0 depends on mypy~=1.10.0; extra == "compatible-mypy"
32.00
32.00 To fix this you could try to:
32.00 1. loosen the range of package versions you've specified
32.00 2. remove package versions to allow pip to attempt to solve the dependency conflict
32.00
32.26 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
How is that should be
It looks like that the breaking change can be fixed by releasing the current main branch
System information
- OS: Windows 11
-
pythonversion: 3.12.5 -
djangoversion: 4.2.11 -
mypyversion: 1.11.1 -
django-stubsversion: 5.0.4
@intgr @flaeppe we should make a new release of drf-stubs to fix this
Yeah sure, that sounds reasonable
In the meantime, is there a way to install djangorestframework-stubs, or do I just wait for the new release?
@akhayyat you can use the latest git commit from main branch 👍
Confirming the issue.
I have django-stubs[compatible-mypy]==5.0.4 and mypy==1.11.1
When I run
pip install "djangorestframework-stubs[compatible-mypy]==3.15.0"
I got:
Installing collected packages: mypy, django-stubs
Attempting uninstall: mypy
Found existing installation: mypy 1.11.1
Uninstalling mypy-1.11.1:
Successfully uninstalled mypy-1.11.1
Attempting uninstall: django-stubs
Found existing installation: django-stubs 5.0.4
Uninstalling django-stubs-5.0.4:
Successfully uninstalled django-stubs-5.0.4
Successfully installed django-stubs-5.0.2 mypy-1.10.1
Is there any timeline to issue this release?
@flaeppe I would really like to upgrade to the latest version of mypy and django-stubs. It seems that what's missing is just this GH/pypi release.
Any updates on this?
It's literally the only thing that blocks us from smooth usage of new 3.12 syntax such as type keyword and generic definitions which was added to mypy 1.11 with -enable-incomplete-feature=NewGenericSyntax
If the problem is to align new stub version with the same DRF version, maybe consider versioning approach like they do in requests typing?
Version 3.15.1 is out!
- PyPI https://pypi.org/project/djangorestframework-stubs/3.15.1/
- Release notes https://github.com/typeddjango/djangorestframework-stubs/releases/tag/3.15.1
Also to facilitate more frequent releases in the future, I've opened PRs:
- #660
- #661