Skip to content

Sync typeshed #19664

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

Merged
merged 7 commits into from
Aug 16, 2025
Merged

Sync typeshed #19664

merged 7 commits into from
Aug 16, 2025

Conversation

cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Aug 15, 2025

Source commit:
python/typeshed@554701e

cdce8p and others added 7 commits August 15, 2025 11:57
This is allegedly causing large performance problems, see 13821

typeshed/8231 had zero hits on mypy_primer, so it's not the worst thing
to undo. Patching this in typeshed also feels weird, since there's a
more general soundness issue. If a typevar has a bound or constraint, we
might not want to solve it to a Literal.

If we can confirm the performance regression or fix the unsoundness
within mypy, I might pursue upstreaming this in typeshed.

(Reminder: add this to the sync_typeshed script once merged)
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

urllib3 (https://github.com/urllib3/urllib3)
+ src/urllib3/util/ssl_.py:139: error: Cannot assign to final name "OP_NO_COMPRESSION"  [misc]
+ src/urllib3/util/ssl_.py:139: note: Error code "misc" not covered by "type: ignore" comment
+ src/urllib3/util/ssl_.py:140: error: Cannot assign to final name "OP_NO_TICKET"  [misc]
+ src/urllib3/util/ssl_.py:140: note: Error code "misc" not covered by "type: ignore" comment
+ src/urllib3/util/ssl_.py:141: error: Cannot assign to final name "OP_NO_SSLv2"  [misc]
+ src/urllib3/util/ssl_.py:141: note: Error code "misc" not covered by "type: ignore" comment
+ src/urllib3/util/ssl_.py:142: error: Cannot assign to final name "OP_NO_SSLv3"  [misc]
+ src/urllib3/util/ssl_.py:142: note: Error code "misc" not covered by "type: ignore" comment
+ src/urllib3/util/ssl_.py:143: error: Cannot assign to final name "PROTOCOL_TLS"  [misc]
+ src/urllib3/util/ssl_.py:143: note: Error code "misc" not covered by "type: ignore" comment
+ src/urllib3/util/ssl_.py:144: error: Cannot assign to final name "PROTOCOL_TLS_CLIENT"  [misc]
+ src/urllib3/util/ssl_.py:144: note: Error code "misc" not covered by "type: ignore" comment
+ src/urllib3/util/ssl_.py:146: error: Cannot assign to final name "VERIFY_X509_STRICT"  [misc]
+ src/urllib3/util/ssl_.py:146: note: Error code "misc" not covered by "type: ignore" comment

discord.py (https://github.com/Rapptz/discord.py)
- discord/ext/commands/hybrid.py:834: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/hybrid.py:834: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/hybrid.py:858: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/hybrid.py:858: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/hybrid.py:883: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/hybrid.py:883: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/hybrid.py:935: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/hybrid.py:935: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/bot.py:291: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/bot.py:291: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/bot.py:315: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/bot.py:315: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]

@cdce8p
Copy link
Collaborator Author

cdce8p commented Aug 15, 2025

Mypy primer hits

JukkaL pushed a commit that referenced this pull request Aug 15, 2025
Discovered in
#19664 (comment).
Sets are unsorted which could make the primer output differ
unnecessarily.
Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@hauntsaninja hauntsaninja merged commit 3fcfcb8 into python:master Aug 16, 2025
20 checks passed
@cdce8p cdce8p deleted the sync-typeshed branch August 16, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants