-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Remove Python 3.7 branches #11238
Remove Python 3.7 branches #11238
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only got up to D, but this looks generally good.
@@ -650,8 +644,8 @@ SocketType = socket | |||
|
|||
# ----- Functions ----- | |||
|
|||
def close(__fd: _FD) -> None: ... | |||
def dup(__fd: _FD) -> int: ... | |||
def close(__fd: SupportsIndex) -> None: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have a _typeshed.FileDescriptor
alias but it's just int
. No change needed in this PR, but might be worth looking into whether we can make that alias usable here.
So, this crashes mypy:
mypy fails to find |
I'm guessing there is some disturbance in the builtin import cycle. Possibly because the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The jinja2 warning is in a Python 3.7 code branch. |
This comment has been minimized.
This comment has been minimized.
Thanks for working on this! One request, can we merge #11219 first? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E-M looked good, and I have faith in you and our tests for the rest
Diff from mypy_primer, showing the effect of this PR on open source code: spack (https://github.com/spack/spack)
+ lib/spack/spack/install_test.py:520: error: Unused "type: ignore" comment [unused-ignore]
+ lib/spack/spack/install_test.py:522: error: Unused "type: ignore" comment [unused-ignore]
jinja (https://github.com/pallets/jinja)
+ src/jinja2/debug.py:130: error: Argument 6 to "CodeType" has incompatible type "bytes"; expected "int" [arg-type]
+ src/jinja2/debug.py:131: error: Argument 7 to "CodeType" has incompatible type "Tuple[Any, ...]"; expected "bytes" [arg-type]
+ src/jinja2/debug.py:134: error: Argument 10 to "CodeType" has incompatible type "str"; expected "Tuple[str, ...]" [arg-type]
+ src/jinja2/debug.py:136: error: Argument 12 to "CodeType" has incompatible type "int"; expected "str" [arg-type]
+ src/jinja2/debug.py:137: error: Argument 13 to "CodeType" has incompatible type "bytes"; expected "int" [arg-type]
+ src/jinja2/debug.py:138: error: Argument 14 to "CodeType" has incompatible type "Tuple[str, ...]"; expected "bytes" [arg-type]
+ src/jinja2/ext.py:297: error: Incompatible redefinition (redefinition with type "Callable[[Arg(str, 'c'), Arg(str, 's')], str]", original type "Callable[[Arg(str, 'context'), Arg(str, 'message')], str]") [misc]
+ src/jinja2/ext.py:304: error: Incompatible redefinition (redefinition with type "Callable[[Arg(str, 'c'), Arg(str, 's'), Arg(str, 'p'), Arg(int, 'n')], str]", original type "Callable[[Arg(str, 'context'), Arg(str, 'msgid1'), Arg(str, 'msgid2'), Arg(int, 'n')], str]") [misc]
|
Part of #10113