-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
stubgen reports wrong Python version when used with debug f-string #10905
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
Labels
Comments
Looks like stubgen effectively hardcodes 3.6. Easy enough to fix... |
hauntsaninja
pushed a commit
to hauntsaninja/mypy
that referenced
this issue
Aug 1, 2021
Not too familiar with stubgen, so maybe there's a good reason for hardcoding, e.g. to ensure stubs capture sys.version checks in the source? Most stubs in typeshed use sys.version checks for a) checking Python 2, b) if they're stdlib backports. So hopefully this is still reasonable. Fixes python#10905
hauntsaninja
pushed a commit
to hauntsaninja/mypy
that referenced
this issue
Aug 1, 2021
Not too familiar with stubgen, so maybe there's a good reason for hardcoding, e.g. to ensure stubs capture sys.version checks in the source? Most stubs in typeshed use sys.version checks for a) checking Python 2, b) if they're stdlib backports. So hopefully this is a reasonable change. Fixes python#10905
I also see this error |
JelleZijlstra
pushed a commit
that referenced
this issue
Nov 21, 2021
Not too familiar with stubgen, so maybe there's a good reason for hardcoding, e.g. to ensure stubs capture sys.version checks in the source? Most stubs in typeshed use sys.version checks for a) checking Python 2, b) if they're stdlib backports. So hopefully this is a reasonable change. Fixes #10905
tushar-deepsource
pushed a commit
to DeepSourceCorp/mypy
that referenced
this issue
Jan 20, 2022
Not too familiar with stubgen, so maybe there's a good reason for hardcoding, e.g. to ensure stubs capture sys.version checks in the source? Most stubs in typeshed use sys.version checks for a) checking Python 2, b) if they're stdlib backports. So hopefully this is a reasonable change. Fixes python#10905
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
When running stubgen on a module that contains a debug f-string, stubgen reports a "Critical error" and reports the wrong python version.
To Reproduce
Expected Behavior
Actual Behavior
Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: