GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.11] gh-113358: Fix rendering tracebacks with exceptions with a broken __getattr__ (GH-113359) by perrinjerome · Pull Request #114118 · python/cpython

Conversation

@perrinjerome

@perrinjerome perrinjerome commented Jan 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

(cherry picked from commit 04fabe2)

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

  • Issue: Exception with broken __getattr__ causes error rendering tracebacks #113358

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Jan 16, 2024
gh-113358: Fix rendering tracebacks with exceptions with a broken __getattr__ #113359
Merged
Exception with broken __getattr__ causes error rendering tracebacks #113358
Closed
@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
@perrinjerome @iritkatriel
pythongh-113358: Fix rendering tracebacks with exceptions with a brok…
8c12e96
…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

perrinjerome commented Jan 17, 2024

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@perrinjerome
perrinjerome marked this pull request as ready for review January 17, 2024 01:51
@perrinjerome
perrinjerome requested a review from iritkatriel as a code owner January 17, 2024 01:51
@bedevere-app bedevere-app Bot added the awaiting review label Jan 17, 2024
iritkatriel
iritkatriel reviewed Jan 17, 2024
View reviewed changes
Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Library/2023-12-21-14-55-06.gh-issue-113358.nRkiSL.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@perrinjerome
Address review comments
67ac054
iritkatriel
iritkatriel reviewed Jan 17, 2024
View reviewed changes

@iritkatriel iritkatriel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

perrinjerome reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel
Apply suggestions from code review
2c882e0
@iritkatriel iritkatriel added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 17, 2024
@bedevere-bot

bedevere-bot commented Jan 17, 2024

Copy link
Copy Markdown

🤖 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 17, 2024
iritkatriel
iritkatriel reviewed Jan 17, 2024
View reviewed changes
Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel

iritkatriel commented Jan 17, 2024

Copy link
Copy Markdown
Member

There's a refleak test failure.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel

iritkatriel commented Jan 17, 2024

Copy link
Copy Markdown
Member

https://buildbot.python.org/all/#/builders/18/builds/1547

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@perrinjerome
fix reference leak, after PyErr_Fetch we own the references
a4613e2
@perrinjerome

perrinjerome commented Jan 17, 2024

Copy link
Copy Markdown
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 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

bedevere-bot commented Jan 19, 2024

Copy link
Copy Markdown

🤖 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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 reviewed Jan 19, 2024
View reviewed changes
Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

perrinjerome added 2 commits January 19, 2024 13:36
@perrinjerome
move PyList_New as suggested
25d62fb
@perrinjerome
fixup! move PyList_New as suggested
618d128
iritkatriel
iritkatriel reviewed Jan 19, 2024
View reviewed changes
Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

iritkatriel
iritkatriel reviewed Jan 19, 2024
View reviewed changes
Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@perrinjerome
address review comments
d72e989
iritkatriel
iritkatriel reviewed Jan 19, 2024
View reviewed changes
Comment thread Python/pythonrun.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

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

bedevere-bot commented Jan 19, 2024

Copy link
Copy Markdown

🤖 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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 merged commit 20f7cf2 into python:3.11 Jan 19, 2024
@bedevere-app bedevere-app Bot removed the awaiting review label Jan 19, 2024
@perrinjerome perrinjerome mentioned this pull request Jan 21, 2024
[3.11] gh-113358 Fix rendering tracebacks with exceptions with a broken __getattr__ : Normalize exception #114379
Merged
@Eclips4 Eclips4 mentioned this pull request Jan 21, 2024
[3.11] gh-113358: Fix rendering tracebacks with exceptions with a broken __getattr__ (GH-113359) #114109
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iritkatriel iritkatriel iritkatriel left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@perrinjerome @bedevere-bot @iritkatriel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.