Skip to content

gh-143201: C warnings writes the full source line instead of the truncated one - #161454

Open
cmaloney wants to merge 2 commits into
python:mainfrom
cmaloney:warnings_truncated_sourceline
Open

cmaloney wants to merge 2 commits into
python:mainfrom
cmaloney:warnings_truncated_sourceline

Conversation

@cmaloney

@cmaloney cmaloney commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

The truncated was created but never used. Use it, and check for errors when writing. Include a test.

Picks up from work by @AZero13

AZero13 and others added 2 commits November 5, 2026 13:37
…truncated one

The truncated object is meant to be written instead.
Write the two-space indent before the stripped source line, matching
_Py_DisplaySourceLine() and the Python implementation, and test the C
show_warning() fallback with a loader-provided indented source line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants