https://github.com/python/cpython/commit/bad6b7bfca8e806a4d1082530347ff149e912f1c commit: bad6b7bfca8e806a4d1082530347ff149e912f1c branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: hauntsaninja <[email protected]> date: 2024-12-27T02:03:38Z summary:
[3.13] gh-125887: Update PyObject_HasAttr exception behavior (GH-125907) (#128283) gh-125887: Update PyObject_HasAttr exception behavior (GH-125907) Update PyObject_HasAttr exception behavior (cherry picked from commit 08a0728d6c32986d35edb26872b4512a71ae60f3) Co-authored-by: Damien <[email protected]> Co-authored-by: Shantanu <[email protected]> files: M Doc/c-api/object.rst diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index 3f0fd905da5097..ce6cb0496139f7 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -111,7 +111,8 @@ Object Protocol .. note:: Exceptions that occur when this calls :meth:`~object.__getattr__` and - :meth:`~object.__getattribute__` methods are silently ignored. + :meth:`~object.__getattribute__` methods aren't propagated, + but instead given to :func:`sys.unraisablehook`. For proper error handling, use :c:func:`PyObject_HasAttrWithError`, :c:func:`PyObject_GetOptionalAttr` or :c:func:`PyObject_GetAttr` instead. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
