Skip to content

Revert "Check __setattr__ when property is not settable (#9196)" #9474

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 1 commit into from
Sep 23, 2020

Conversation

hauntsaninja
Copy link
Collaborator

This reverts commit 3186281.

I realised that object in typeshed has __setattr__ defined. Currently it's a pretty common idiom for marking read-only attributes using properties, and since every class has a __setattr__ in its MRO, this breaks that.

E.g, this no longer produces an error:

from datetime import date
dt = date(2000, 1, 1)
dt.year = 2003

Additionally, it introduces a broken test on master, since we (unintentionally) don't run some Python2 tests in CI (filed as #9473 )

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 participant