Skip to content

Conversation

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Mar 7, 2022

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 3b3be05)

Co-authored-by: Pablo Galindo Salgado [email protected]

https://bugs.python.org/issue46940

…nformation (pythonGH-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..
(cherry picked from commit 3b3be05)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
@pablogsal pablogsal force-pushed the backport-3b3be05-3.10 branch from 487ad7f to d397cb4 Compare March 7, 2022 12:51
@pablogsal pablogsal merged commit 3594ebc into python:3.10 Mar 7, 2022
@pablogsal pablogsal deleted the backport-3b3be05-3.10 branch March 7, 2022 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants