From 0960124b09eec8e4cd4468d6a779c8258af448c3 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Wed, 2 Sep 2020 08:20:55 +0200 Subject: [PATCH] Clarify what need to be reset and when Signed-off-by: Hynek Schlawack --- src/attr/_make.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/attr/_make.py b/src/attr/_make.py index c52bea102..1d28a9eaf 100644 --- a/src/attr/_make.py +++ b/src/attr/_make.py @@ -669,8 +669,9 @@ def _create_slots_class(self): if k not in tuple(self._attr_names) + ("__dict__", "__weakref__") } - # Check the bases if one of them has an attrs-made __setattr__ that - # needs to be reset. + # If our class doesn't have an own __setattr__ (either from the user or + # by us), check the bases, if one of them has an attrs-made + # __setattr__, that needs to be reset. # XXX: This can be confused by subclassing a slotted attrs class with # XXX: a non-attrs class and subclass the resulting class with an attrs # XXX: class. See `test_slotted_confused for details. For now that's