8000 [3.10] bpo-46940: Don't override existing AttributeError suggestion information (GH-31710) by pablogsal · Pull Request #31724 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2022

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 Pablogsal@gmail.com

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 <Pablogsal@gmail.com>
@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
0