SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 1 Python

[3.10] bpo-46940: Don't override existing AttributeError suggestion information (GH-31710) (GH-31724)

When an exception is created in a nested call to PyObject_GetAttr, any
external calls will override the context information of the
AttributeError that we have already placed in the most internal call.
This will cause the suggestions we create to nor work properly as the
attribute name and object that we will be using are the incorrect ones.

To avoid this, we need to check first if these attributes are already
set and bail out if that's the case..
(cherry picked from commit 3b3be05a164da43f201e35b6dafbc840993a4d18)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
P
Pablo Galindo Salgado committed
3594ebca2cacf5d9b5212d2c487fd017cd00e283
Parent: 8acbb93
Committed by GitHub <noreply@github.com> on 3/7/2022, 1:18:36 PM