Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Print out the truncated line, not the raw sourceline.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs some more context; please add something about this being related to warnings.

2 changes: 1 addition & 1 deletion Python/_warnings.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ show_warning(PyThreadState *tstate, PyObject *filename, int lineno,
if (truncated == NULL)
goto error;

PyFile_WriteObject(sourceline, f_stderr, Py_PRINT_RAW);
PyFile_WriteObject(truncated, f_stderr, Py_PRINT_RAW);
Py_DECREF(truncated);
PyFile_WriteString("\n", f_stderr);
}
Expand Down
Loading