Commit Graph

1 Commits

Author SHA1 Message Date
Denis Laxalde 88e2896ca9
Preserve AttributeError in slotted classes with cached_property (#1253)
* Preserve AttributeError in slotted classes with cached_property

In slotted classes' generated __getattr__(), we try __getattribute__()
before __getattr__(), if available, and eventually let AttributeError
propagate. This matches better with the behaviour described in Python's
documentation "Customizing attribute access":

  https://docs.python.org/3/reference/datamodel.html#customizing-attribute-access

Fix https://github.com/python-attrs/attrs/issues/1230

* Update changelog.d/1253.change.md

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2024-04-02 04:57:25 +00:00