Skip to content

Sync typeshed #19585

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 8 commits into from
Aug 4, 2025
Merged

Sync typeshed #19585

merged 8 commits into from
Aug 4, 2025

Conversation

cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Aug 4, 2025

Source commit:
python/typeshed@e16c23d

cdce8p and others added 8 commits August 4, 2025 13: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)
Copy link
Contributor

github-actions bot commented Aug 4, 2025

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

colour (https://github.com/colour-science/colour)
- colour/plotting/colorimetry.py:565: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "floating[_16Bit] | floating[_32Bit] | float64"  [type-var]
- colour/plotting/colorimetry.py:566: error: Value of type variable "SupportsRichComparisonT" of "max" cannot be "floating[_16Bit] | floating[_32Bit] | float64"  [type-var]

jax (https://github.com/google/jax)
+ jax/_src/pallas/mosaic/pipeline.py:1779: error: Unused "type: ignore" comment  [unused-ignore]

trio (https://github.com/python-trio/trio)
+ src/trio/_tests/test_exports.py:36: error: Unused "type: ignore" comment  [unused-ignore]

arviz (https://github.com/arviz-devs/arviz)
- arviz/stats/ecdf_utils.py:72: error: Value of type variable "SupportsRichComparisonT" of "min" cannot be "Any | float64"  [type-var]

prefect (https://github.com/PrefectHQ/prefect)
- ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/inspect.pyi:332: note: "signature" defined here
+ ...venv/lib/python3.13/site-packages/mypy/typeshed/stdlib/inspect.pyi:333: note: "signature" defined here

dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/internal/wrapping/__init__.py:14: error: Unused "type: ignore" comment  [unused-ignore]
+ ddtrace/internal/wrapping/context.py:15: error: Unused "type: ignore" comment  [unused-ignore]
+ ddtrace/internal/products.py:28: error: Unused "type: ignore" comment  [unused-ignore]
+ ddtrace/debugging/_function/discovery.py:14: error: Unused "type: ignore" comment  [unused-ignore]

meson (https://github.com/mesonbuild/meson)
+ mesonbuild/minstall.py:42: error: Unused "type: ignore" comment  [unused-ignore]

DateType (https://github.com/glyph/DateType)
+ src/datetype/__init__.py:29: error: Unused "type: ignore" comment  [unused-ignore]

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

graphql-core (https://github.com/graphql-python/graphql-core)
+ src/graphql/utilities/get_introspection_query.py:14: error: Unused "type: ignore" comment  [unused-ignore]

janus (https://github.com/aio-libs/janus)
+ janus/__init__.py:714: error: Value of type variable "_T" of "heappush" cannot be "T"  [type-var]
+ janus/__init__.py:717: error: Value of type variable "_T" of "heappop" cannot be "T"  [type-var]

dacite (https://github.com/konradhalas/dacite)
+ dacite/data.py:4: error: Unused "type: ignore" comment  [unused-ignore]

optuna (https://github.com/optuna/optuna)
+ optuna/artifacts/_protocol.py:9: error: Unused "type: ignore" comment  [unused-ignore]

ibis (https://github.com/ibis-project/ibis)
- ibis/expr/types/relations.py:3396: error: Value of type variable "SupportsRichComparisonT" of "sorted" cannot be "NumericValue | float"  [type-var]

@cdce8p
Copy link
Collaborator Author

cdce8p commented Aug 4, 2025

@cdce8p cdce8p requested a review from hauntsaninja August 4, 2025 13:47
@JelleZijlstra JelleZijlstra merged commit 1c48286 into python:master Aug 4, 2025
20 checks passed
@cdce8p cdce8p deleted the sync-typeshed branch August 4, 2025 15:03
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