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

Missing Release for latest mypy release (1.11.0) #652

Closed
leandrodesouzadev opened this issue Aug 15, 2024 · 10 comments · Fixed by #659
Closed

Missing Release for latest mypy release (1.11.0) #652

leandrodesouzadev opened this issue Aug 15, 2024 · 10 comments · Fixed by #659
Labels
bug Something isn't working

Comments

@leandrodesouzadev
Copy link

leandrodesouzadev commented Aug 15, 2024

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
  • python version: 3.12.5
  • django version: 4.2.11
  • mypy version: 1.11.1
  • django-stubs version: 5.0.4
@leandrodesouzadev leandrodesouzadev added the bug Something isn't working label Aug 15, 2024
@sobolevn
Copy link
Member

@intgr @flaeppe we should make a new release of drf-stubs to fix this

@flaeppe
Copy link
Member

flaeppe commented Aug 15, 2024

Yeah sure, that sounds reasonable

@akhayyat
Copy link

In the meantime, is there a way to install djangorestframework-stubs, or do I just wait for the new release?

@sobolevn
Copy link
Member

@akhayyat you can use the latest git commit from main branch 👍

@ivan-klass
Copy link

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

@leandrodesouzadev
Copy link
Author

Is there any timeline to issue this release?

@leandrodesouzadev
Copy link
Author

@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.

@ivan-klass
Copy link

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?

@intgr
Copy link
Contributor

intgr commented Sep 11, 2024

@intgr
Copy link
Contributor

intgr commented Sep 11, 2024

Also to facilitate more frequent releases in the future, I've opened PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

6 participants