镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[3.13] gh-131927: Prevent emitting optimizer warnings twice in the REPL (GH-131993) - #132463

Merged
serhiy-storchaka merged 2 commits into
python:3.13from
tomasr8:backport-3d08c8a-3.13
Apr 13, 2025
Merged

serhiy-storchaka merged 2 commits into
python:3.13from
tomasr8:backport-3d08c8a-3.13

Conversation

@tomasr8

@tomasr8 tomasr8 commented Apr 13, 2025 •

Copy link
Copy Markdown
Member

…the REPL (pythonGH-131993)

(cherry picked from commit 3d08c8a)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
@picnixz picnixz changed the title [3.13] gh-131927: Prevent emitting optimizer warnings twice in the RE… [3.13] gh-131927: Prevent emitting optimizer warnings twice in the REPL Apr 13, 2025
Comment thread Python/compile.c
}
if (PyErr_WarnExplicitObject(PyExc_SyntaxWarning, msg, c->c_filename,
loc.lineno, NULL, NULL) < 0)
if (_PyErr_WarnExplicitObjectWithContext(PyExc_SyntaxWarning, msg,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just a note, 3.13 uses compiler_warn instead of _PyErr_EmitSyntaxWarning to emit warnings.

@picnixz picnixz changed the title [3.13] gh-131927: Prevent emitting optimizer warnings twice in the REPL [3.13] gh-131927: Prevent emitting optimizer warnings twice in the REPL (#131993) Apr 13, 2025
@picnixz picnixz changed the title [3.13] gh-131927: Prevent emitting optimizer warnings twice in the REPL (#131993) [3.13] gh-131927: Prevent emitting optimizer warnings twice in the REPL (GH-131993) Apr 13, 2025
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) April 13, 2025 08:21
@serhiy-storchaka
serhiy-storchaka merged commit 4ff5d88 into python:3.13 Apr 13, 2025
@tomasr8
tomasr8 deleted the backport-3d08c8a-3.13 branch April 13, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants