From ed28f2f42ace9fd98032b881bb3a663788d690e7 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:46:13 +0200 Subject: [PATCH] [3.13] gh-132174: Fix function name in error message of `_interpreters.run_string` (GH-132175) (#132209) gh-132174: Fix function name in error message of `_interpreters.run_string` (GH-132175) (cherry picked from commit f2daa96c81a45b26bdcf3d5c3887cec02137974e) Co-authored-by: sobolevn Co-authored-by: Brian Schubert --- .../next/Library/2025-04-06-23-16-08.gh-issue-132174.dN4b-X.rst | 1 + Modules/_interpretersmodule.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2025-04-06-23-16-08.gh-issue-132174.dN4b-X.rst diff --git a/Misc/NEWS.d/next/Library/2025-04-06-23-16-08.gh-issue-132174.dN4b-X.rst b/Misc/NEWS.d/next/Library/2025-04-06-23-16-08.gh-issue-132174.dN4b-X.rst new file mode 100644 index 000000000000..fa868c372198 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-04-06-23-16-08.gh-issue-132174.dN4b-X.rst @@ -0,0 +1 @@ +Fix function name in error message of ``_interpreters.run_string``. diff --git a/Modules/_interpretersmodule.c b/Modules/_interpretersmodule.c index 8f912d803ba5..8f7106b6f1ac 100644 --- a/Modules/_interpretersmodule.c +++ b/Modules/_interpretersmodule.c @@ -1113,7 +1113,7 @@ interp_run_string(PyObject *self, PyObject *args, PyObject *kwds) return NULL; } - script = (PyObject *)convert_script_arg(script, MODULE_NAME_STR ".exec", + script = (PyObject *)convert_script_arg(script, MODULE_NAME_STR ".run_string", "argument 2", "a string"); if (script == NULL) { return NULL; -- 2.47.3