-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Notes added to "SyntaxError" (and subclasses) are not displayed #109179
Labels
3.11
only security fixes
3.12
bugs and security fixes
3.13
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-bug
An unexpected behavior, bug, or error
Comments
terryjreedy
added
the
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
label
Sep 9, 2023
Test code above works with IndexError, for instance. The |
iritkatriel
added
3.11
only security fixes
3.12
bugs and security fixes
3.13
bugs and security fixes
labels
Sep 9, 2023
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Sep 9, 2023
Thanks, this is a bug. SyntaxError is handled differently and it drops the notes. Fixed in #109197. |
iritkatriel
added a commit
that referenced
this issue
Sep 11, 2023
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Sep 11, 2023
…ython#109197) (cherry picked from commit ecd21a6)
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Sep 11, 2023
…ython#109197) (cherry picked from commit ecd21a6)
iritkatriel
added a commit
to iritkatriel/cpython
that referenced
this issue
Sep 11, 2023
…ython#109197) (cherry picked from commit ecd21a6)
kumaraditya303
pushed a commit
that referenced
this issue
Sep 12, 2023
Yhg1s
pushed a commit
that referenced
this issue
Oct 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.11
only security fixes
3.12
bugs and security fixes
3.13
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
Hi.
I noticed that using
add_note()
with an error of typeSyntaxError
(or its derived such asIndentationError
andTabError
) produces a traceback without the expected notes.Here is a minimal reproducible example:
Or alternatively:
The output of these examples is:
The expected
"Note"
is missing.Since neither PEP 678 nor the documentation mention that
SyntaxError
is not fully compatible with notes, I assume that this is probably a bug.CPython versions tested on:
3.11, 3.12
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: