Skip to content

Conversation

@cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Oct 16, 2025

Source commit:
python/typeshed@11c7821

cdce8p and others added 7 commits October 17, 2025 01:39
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)
@github-actions
Copy link
Contributor

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

pydantic (https://github.com/pydantic/pydantic)
+ pydantic/errors.py:131: error: Argument "name" to "PydanticUndefinedAnnotation" has incompatible type "str | None"; expected "str"  [arg-type]

altair (https://github.com/vega/altair)
+ altair/utils/execeval.py:81: error: Argument "filename" to "compile" has incompatible type "str | Buffer | PathLike[Any]"; expected "str | bytes | PathLike[Any]"  [arg-type]
+ altair/utils/execeval.py:87: error: Argument "filename" to "compile" has incompatible type "str | Buffer | PathLike[Any]"; expected "str | bytes | PathLike[Any]"  [arg-type]

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/ext/autodoc/type_comment.py:121: error: Unused "type: ignore" comment  [unused-ignore]

@JelleZijlstra JelleZijlstra merged commit b38413d into python:master Oct 17, 2025
20 checks passed
@cdce8p cdce8p deleted the sync-typeshed branch October 17, 2025 00:34
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.

4 participants