From 8c84f664752947c64827ee96ddd0f4af4ee8e2bc Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sun, 6 Apr 2025 23:15:12 +0300 Subject: [PATCH 1/2] gh-132174: Fix function name in error message of `_interpreters.run_string` --- .../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 00000000000000..a1fa2150b56dec --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-04-06-23-16-08.gh-issue-132174.dN4b-X.rst @@ -0,0 +1 @@ +Fix error function name in message of ``_interpreters.run_string``. diff --git a/Modules/_interpretersmodule.c b/Modules/_interpretersmodule.c index 707e654005bc59..6cbf026469b4b2 100644 --- a/Modules/_interpretersmodule.c +++ b/Modules/_interpretersmodule.c @@ -1112,7 +1112,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; From 5f4d76b0d914ffff6258fc340908f3c599655124 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sun, 6 Apr 2025 23:33:44 +0300 Subject: [PATCH 2/2] Update Misc/NEWS.d/next/Library/2025-04-06-23-16-08.gh-issue-132174.dN4b-X.rst Co-authored-by: Brian Schubert --- .../next/Library/2025-04-06-23-16-08.gh-issue-132174.dN4b-X.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index a1fa2150b56dec..fa868c372198c7 100644 --- 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 @@ -1 +1 @@ -Fix error function name in message of ``_interpreters.run_string``. +Fix function name in error message of ``_interpreters.run_string``.