-
- Downloads
bpo-46940: Don't override existing AttributeError suggestion information (GH-31710)
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.
Showing
- Lib/test/test_exceptions.py 18 additions, 0 deletionsLib/test/test_exceptions.py
- Misc/NEWS.d/next/Core and Builtins/2022-03-06-20-16-13.bpo-46940._X47Hx.rst 2 additions, 0 deletions...ore and Builtins/2022-03-06-20-16-13.bpo-46940._X47Hx.rst
- Objects/object.c 22 additions, 12 deletionsObjects/object.c
- Python/ceval.c 6 additions, 3 deletionsPython/ceval.c
Loading
Please register or sign in to comment