Skip to content

Conversation

@iritkatriel
Copy link
Member

@iritkatrieliritkatriel commented Sep 9, 2023

Since the syntax errors get replaced by the message in print_exception_file_and_line, the notes get lost.
This fixes the bug by extracting the notes before the call to print_exception_file_and_line.

Fixes#109179.

@iritkatrieliritkatriel added type-bug An unexpected behavior, bug, or error needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Sep 9, 2023
@iritkatrieliritkatriel requested review from pablogsal and removed request for pablogsalSeptember 9, 2023 20:43
@iritkatrieliritkatriel marked this pull request as ready for review September 9, 2023 20:43
@iritkatrieliritkatriel added 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section and removed awaiting core review labels Sep 9, 2023
@bedevere-bot
Copy link

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

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

@bedevere-botbedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Sep 9, 2023
@iritkatrieliritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Sep 9, 2023
@AlexWaygood
Copy link
Member

The refleak buildbots appear to have been broken by #109177

iritkatrieland others added 3 commits September 9, 2023 22:03
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@AlexWaygoodAlexWaygood added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Sep 9, 2023
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @AlexWaygood for commit c00b658 🤖

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

@bedevere-botbedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Sep 9, 2023
@miss-islington
Copy link
Contributor

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @iritkatriel, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker ecd21a629a2a30bcae89902f7cad5670e9441e2c 3.12

@miss-islington
Copy link
Contributor

Sorry, @iritkatriel, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker ecd21a629a2a30bcae89902f7cad5670e9441e2c 3.11

@bedevere-app
Copy link

GH-109280 is a backport of this pull request to the 3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12 only security fixes label Sep 11, 2023
iritkatriel added a commit to iritkatriel/cpython that referenced this pull request Sep 11, 2023
iritkatriel added a commit to iritkatriel/cpython that referenced this pull request Sep 11, 2023
iritkatriel added a commit to iritkatriel/cpython that referenced this pull request Sep 11, 2023
@bedevere-app
Copy link

GH-109283 is a backport of this pull request to the 3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11 only security fixes label Sep 11, 2023
kumaraditya303 pushed a commit that referenced this pull request Sep 12, 2023
…109197) (#109283) gh-109179: Fix traceback display for SyntaxErrors with notes (#109197) (cherry picked from commit ecd21a6)
Yhg1s pushed a commit that referenced this pull request Oct 2, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notes added to "SyntaxError" (and subclasses) are not displayed

5 participants

@iritkatriel@bedevere-bot@AlexWaygood@miss-islington@kumaraditya303