Skip to content
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

[3.11] gh-113358: Fix rendering tracebacks with exceptions with a broken __getattr__ (GH-113359) #114118

Merged
merged 7 commits into from
Jan 19, 2024

Conversation

perrinjerome
Copy link
Contributor

@perrinjerome perrinjerome commented Jan 16, 2024

(cherry picked from commit 04fabe2)

Adjusted for 3.11, because exception printing also happens in C code.

@perrinjerome perrinjerome changed the title [3.11] gh-113358: Fix rendering tracebacks with exceptions with a bro… [3.11] gh-113358: Fix rendering tracebacks with exceptions with a broken getattr (GH-113359) Jan 16, 2024
@perrinjerome perrinjerome changed the title [3.11] gh-113358: Fix rendering tracebacks with exceptions with a broken getattr (GH-113359) [3.11] gh-113358: Fix rendering tracebacks with exceptions with a broken __getattr__ (GH-113359) Jan 16, 2024
@perrinjerome perrinjerome force-pushed the backport-04fabe2-3.11 branch 4 times, most recently from acf3006 to 453b2e0 Compare January 17, 2024 01:29
…en __getattr__ (pythonGH-113359)

cherry picked from commit 04fabe2

Adjusted for 3.11, because exception printing also happens in C
code.

Co-authored-by: Jérome Perrin <[email protected]>
Co-authored-by: Irit Katriel <[email protected]>
@perrinjerome perrinjerome force-pushed the backport-04fabe2-3.11 branch from 453b2e0 to 8c12e96 Compare January 17, 2024 01:31
@perrinjerome
Copy link
Contributor Author

This is not a trivial backport, cherry-picking the commit was not enough, there is also C code to format exceptions in 3.11 branch. The CI is OK, but I am not familiar with C programming and python C API so I might have made mistakes here.

@perrinjerome perrinjerome marked this pull request as ready for review January 17, 2024 01:51
Copy link
Member

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can actually do this because we know it's not NULL.

@iritkatriel iritkatriel added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 17, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 2c882e0 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 17, 2024
@iritkatriel
Copy link
Member

There's a refleak test failure.

@iritkatriel
Copy link
Member

@perrinjerome
Copy link
Contributor Author

Thank you ! I could reproduce locally and pushed a fix. The problem was with missing decref on values returned by PyErr_Fetch ( https://docs.python.org/3.11/c-api/exceptions.html#c.PyErr_Fetch "you own a reference to each object retrieved." )

@iritkatriel iritkatriel added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 19, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit a4613e2 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 19, 2024
@iritkatriel iritkatriel added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 19, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit d72e989 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

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