Skip to content

Fix another variance issue with __replace__#21737

Merged
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:replacevar
Jul 16, 2026
Merged

Fix another variance issue with __replace__#21737
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:replacevar

Conversation

@hauntsaninja

Copy link
Copy Markdown
Collaborator

Fixes #21736

@github-actions

Copy link
Copy Markdown
Contributor

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

steam.py (https://github.com/Gobot1234/steam.py)
- steam/invite.py:77: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/invite.py:78: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/app.py:524: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/app.py:593: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/profile.py:194: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/profile.py:273: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/abc.py:298: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/abc.py:1015: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/abc.py:1017: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/post.py:30: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/comment.py:52: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/comment.py:54: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/leaderboard.py:81: error: Cannot use a covariant type variable as a parameter  [misc]
- steam/leaderboard.py:89: error: Cannot use a covariant type variable as a parameter  [misc]

Expression (https://github.com/cognitedata/Expression)
- expression/core/result.py:60: error: Cannot use a covariant type variable as a parameter  [misc]
- expression/core/result.py:61: error: Cannot use a covariant type variable as a parameter  [misc]
- expression/core/option.py:53: error: Cannot use a covariant type variable as a parameter  [misc]

ibis (https://github.com/ibis-project/ibis)
- ibis/expr/datatypes/core.py:890: error: Cannot use a covariant type variable as a parameter  [misc]
- ibis/expr/datatypes/core.py:914: error: Cannot use a covariant type variable as a parameter  [misc]
- ibis/expr/datatypes/core.py:916: error: Cannot use a covariant type variable as a parameter  [misc]
- ibis/expr/operations/generic.py:141: error: Cannot use a covariant type variable as a parameter  [misc]
- ibis/common/tests/test_patterns.py:256: error: Cannot use a covariant type variable as a parameter  [misc]
- ibis/common/tests/test_patterns.py:257: error: Cannot use a covariant type variable as a parameter  [misc]
- ibis/common/tests/test_grounds.py:130: error: Cannot use a covariant type variable as a parameter  [misc]
- ibis/common/tests/test_grounds.py:221: error: Cannot use a covariant type variable as a parameter  [misc]
- ibis/common/tests/test_grounds.py:222: error: Cannot use a covariant type variable as a parameter  [misc]

alectryon (https://github.com/cpitclaudel/alectryon)
+ alectryon/core.py:468: error: Unused "type: ignore" comment  [unused-ignore]

@hauntsaninja hauntsaninja merged commit 67eecf0 into python:master Jul 16, 2026
25 checks passed
@hauntsaninja hauntsaninja deleted the replacevar branch July 16, 2026 00:48
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.

Allow covariant attributes for frozen data classes in Python 3.13+

1 participant