diff options
| author | Tian Gao <gaogaotiantian@hotmail.com> | 2024-04-19 03:50:09 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-19 03:50:09 (GMT) |
| commit | a09e47299217fe98615aec8318e13a744307d52a (patch) | |
| tree | 334ae7adde2cc710f5fc2b485977a9e85d0911b5 /Python | |
| parent | 398abdd6fa5b6b15c0570c75321cd7df9573a5b7 (diff) | |
| download | cpython-a09e47299217fe98615aec8318e13a744307d52a.zip cpython-a09e47299217fe98615aec8318e13a744307d52a.tar.gz cpython-a09e47299217fe98615aec8318e13a744307d52a.tar.bz2 | |
gh-117535: Change unknown filename of warnings from `sys` to `<sys>` (#118018)
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/_warnings.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 4c52025..2ba704d 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -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; |
