Skip to content

Conversation

@cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Nov 15, 2025

Source commit:
python/typeshed@ebce8d7

cdce8p and others added 7 commits November 16, 2025 00:45
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)
@cdce8p cdce8p mentioned this pull request Nov 15, 2025
@github-actions
Copy link
Contributor

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

psycopg (https://github.com/psycopg/psycopg)
+ psycopg_c/psycopg_c/_uuid.py:28: error: Incompatible types in assignment (expression has type "Callable[[str, Any], None]", base class "UUID" defined the type as "Callable[[object, object], Never]")  [assignment]

prefect (https://github.com/PrefectHQ/prefect)
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:138: note: "__init_subclass__" of "object" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:139: note: "__init_subclass__" of "object" defined here
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:138: note: "__init_subclass__" of "object" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:139: note: "__init_subclass__" of "object" defined here
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:138: note: "__init_subclass__" of "object" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:139: note: "__init_subclass__" of "object" defined here
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:138: note: "__init_subclass__" of "object" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:139: note: "__init_subclass__" of "object" defined here
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:138: note: "__init_subclass__" of "object" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:139: note: "__init_subclass__" of "object" defined here

zulip (https://github.com/zulip/zulip)
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:116: note: "SubTest" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:117: note: "SubTest" defined here

strawberry (https://github.com/strawberry-graphql/strawberry)
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:138: note: "__init_subclass__" of "object" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:139: note: "__init_subclass__" of "object" defined here

core (https://github.com/home-assistant/core)
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:138: note: "__init_subclass__" of "object" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:139: note: "__init_subclass__" of "object" defined here
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:138: note: "__init_subclass__" of "object" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:139: note: "__init_subclass__" of "object" defined here

ibis (https://github.com/ibis-project/ibis)
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:116: note: "Any" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:117: note: "Any" defined here
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:116: note: "__init__" of "object" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/builtins.pyi:117: note: "__init__" of "object" defined here

discord.py (https://github.com/Rapptz/discord.py)
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/typing.pyi:1040: note: "update" of "TypedDict" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/typing.pyi:1036: note: "update" of "TypedDict" defined here

dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/debugging/_safety.py:13: error: Unused "type: ignore" comment  [unused-ignore]

@hauntsaninja hauntsaninja merged commit 9286425 into python:master Nov 16, 2025
21 checks passed
@cdce8p cdce8p deleted the sync-typeshed branch November 16, 2025 06:00
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