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
Using slots class overrides custom __setattr__
in 20.1.0
#680
Labels
Comments
hynek
added a commit
that referenced
this issue
Sep 1, 2020
Fixes #680 Signed-off-by: Hynek Schlawack <hs@ox.cx>
Now this is very embarrassing. Does #681 look good to you? |
hynek
added a commit
that referenced
this issue
Sep 1, 2020
Fixes #680 Signed-off-by: Hynek Schlawack <hs@ox.cx>
hynek
added a commit
that referenced
this issue
Sep 1, 2020
Fixes #680 Signed-off-by: Hynek Schlawack <hs@ox.cx>
hynek
added a commit
that referenced
this issue
Sep 2, 2020
Fixes #680 Signed-off-by: Hynek Schlawack <hs@ox.cx>
hynek
added a commit
that referenced
this issue
Sep 3, 2020
Fixes #680 Signed-off-by: Hynek Schlawack <hs@ox.cx>
hynek
added a commit
that referenced
this issue
Sep 5, 2020
* Don't reset custom __setattr__ in slotted classes Fixes #680 Signed-off-by: Hynek Schlawack <hs@ox.cx> * Simplify Signed-off-by: Hynek Schlawack <hs@ox.cx> * Be defensive about __bases__ Signed-off-by: Hynek Schlawack <hs@ox.cx> * _Classes_ always have a __dict__ * Tighten xfail * Clarify what need to be reset and when Signed-off-by: Hynek Schlawack <hs@ox.cx> * Reset __attrs_own_setattr__ along with __setattr__ Signed-off-by: Hynek Schlawack <hs@ox.cx> * Update src/attr/_make.py Co-authored-by: Paul Ganssle <paul@ganssle.io> * Differentiate between own (= attrs) and custom (= user) __setattrs__ Signed-off-by: Hynek Schlawack <hs@ox.cx> * We've always used __bases__ in our call to type() So no reason for being defensive. * Update tests/test_setattr.py Co-authored-by: Paul Ganssle <paul@ganssle.io> Co-authored-by: Paul Ganssle <paul@ganssle.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In 19.3.0, it was possible to have a custom
__setattr__
on yourslots
class, but in 20.1.0 the custom__setattr__
is replaced with the default one:In 19.3.0:
In 20.1.0:
When
slots=False
, the same thing does not occur.The text was updated successfully, but these errors were encountered: