mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
gh-117535: Change unknown filename of warnings from sys
to <sys>
(#118018)
This commit is contained in:
parent
398abdd6fa
commit
a09e472992
4 changed files with 7 additions and 6 deletions
|
@ -894,8 +894,8 @@ setup_context(Py_ssize_t stack_level,
|
|||
|
||||
if (f == NULL) {
|
||||
globals = interp->sysdict;
|
||||
*filename = PyUnicode_FromString("sys");
|
||||
*lineno = 1;
|
||||
*filename = PyUnicode_FromString("<sys>");
|
||||
*lineno = 0;
|
||||
}
|
||||
else {
|
||||
globals = f->f_frame->f_globals;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue