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

--install-types suggests incompatible stub packages #10602

Closed
tpazderka opened this issue Jun 8, 2021 · 3 comments · Fixed by #10610
Closed

--install-types suggests incompatible stub packages #10602

tpazderka opened this issue Jun 8, 2021 · 3 comments · Fixed by #10610
Labels
bug mypy got something wrong

Comments

@tpazderka
Copy link

Bug Report

Running mypy --install-types suggest installation of stubs that are ot compatible with the current running version of python.
To Reproduce

(Write your steps here:)

  1. Create a project containing import OpenSSL.crypto
  2. mypy --install-types

Expected Behavior

Does not suggest installing library stubs incompatible with python version.

Actual Behavior

Suggests (and installs) stubs incompatible with the current version.

Your Environment

  • Mypy version used: 0.901
  • Mypy command-line flags: none
  • Mypy configuration options from mypy.ini (and other config files): none
  • Python version used: 3.8, 3.9
  • Operating system and version: Debian
@tpazderka tpazderka added the bug mypy got something wrong label Jun 8, 2021
@tpazderka
Copy link
Author

python/typeshed#5593

@JukkaL
Copy link
Collaborator

JukkaL commented Jun 9, 2021

I'm working on a fix. I'll add Python version compatibility metadata for all the stub packages that mypy suggests.

JukkaL added a commit that referenced this issue Jun 10, 2021
Keep track of supported Python versions of legacy bundled packages, and
only suggest a stub package if the major Python version is compatible.

Fixes #10602.
JukkaL added a commit that referenced this issue Jun 10, 2021
Keep track of supported Python versions of legacy bundled packages, and
only suggest a stub package if the major Python version is compatible.

Fixes #10602.
@JukkaL
Copy link
Collaborator

JukkaL commented Jun 10, 2021

The fix to this issue was released in mypy 0.902.

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

Successfully merging a pull request may close this issue.

2 participants