Skip to content

Fix #15011, Exception.text may be None#15012

Merged
Carreau merged 1 commit into
ipython:mainfrom
Carreau:15011
Oct 6, 2025
Merged

Fix #15011, Exception.text may be None#15012
Carreau merged 1 commit into
ipython:mainfrom
Carreau:15011

Conversation

@Carreau

@Carreau Carreau commented Oct 5, 2025

Copy link
Copy Markdown
Member

And add a test for it.

@Carreau Carreau added this to the 9.7 milestone Oct 6, 2025
@Carreau Carreau merged commit 0a64e76 into ipython:main Oct 6, 2025
19 checks passed
Carreau pushed a commit that referenced this pull request Jun 12, 2026
xml.etree.ElementTree.ParseError is a SyntaxError subclass that
leaves .text set to None; IPython 9.6.0 raised an AssertionError in
ListTB._format_exception_only when rendering it. The guard was added
as part of #15012, but without a test; this locks the behavior in.

The test fails if the None check in _format_exception_only is
removed.

Closes #15024

https://claude.ai/code/session_01AtmUVnQwZfjDBuUzF7TdGh
Carreau pushed a commit that referenced this pull request Jun 13, 2026
xml.etree.ElementTree.ParseError is a SyntaxError subclass that
leaves .text set to None; IPython 9.6.0 raised an AssertionError in
ListTB._format_exception_only when rendering it. The guard was added
as part of #15012, but without a test; this locks the behavior in.

The test fails if the None check in _format_exception_only is
removed.

Closes #15024

https://claude.ai/code/session_01AtmUVnQwZfjDBuUzF7TdGh
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.

1 participant