Skip to content
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

NG: make frozen classes comfortably subclassable #687

Merged
merged 4 commits into from Sep 5, 2020
Merged

Conversation

hynek
Copy link
Member

@hynek hynek commented Sep 4, 2020

This is a fix for an inconvenience that @euresti mentioned in #668 (comment).

on_setattr=validate gets into the way if you want to pass define(frozen=True) or if you subclass a frozen class using define.

The new logic should catch these problems.

@hynek hynek requested a review from euresti September 4, 2020 08:03
Copy link
Contributor

@euresti euresti left a comment

Choose a reason for hiding this comment

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

Just 2 small questions. But otherwise it looks good.

src/attr/_next_gen.py Outdated Show resolved Hide resolved
src/attr/_next_gen.py Outdated Show resolved Hide resolved
@hynek hynek merged commit 504eefe into master Sep 5, 2020
@hynek hynek deleted the ng-frozen-inherited branch September 5, 2020 09:14
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.

None yet

2 participants