Skip to content

Fix properties with setters after deleters #19248

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 2 commits into from
Jun 7, 2025

Conversation

ilevkivskyi
Copy link
Member

Fixes #19224

Note we must add an additional attribute on OverloadedFuncDef since decorator expressions are not serialized.

This comment has been minimized.

Copy link
Collaborator

@sterliakov sterliakov left a comment

Choose a reason for hiding this comment

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

I'm a bit worried that now there's no single "source of truth" for Var.is_settable_property vs Decorator.setter_index, they may eventually get out of sync somewhere. But I can't suggest anything better yet:(

@ilevkivskyi
Copy link
Member Author

Yeah, I was thinking about this myself. Actually since I am not the only one worried, let me add one assert that will make this less likely.

Copy link
Contributor

github-actions bot commented Jun 7, 2025

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@ilevkivskyi ilevkivskyi merged commit 4c825e9 into python:master Jun 7, 2025
19 checks passed
@ilevkivskyi ilevkivskyi deleted the deleters-before-setters branch June 7, 2025 22:59
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.

[1.16 regression] Relative order of property methods changes mypy output
2 participants