https://github.com/python/cpython/commit/f2daa96c81a45b26bdcf3d5c3887cec02137974e
commit: f2daa96c81a45b26bdcf3d5c3887cec02137974e
branch: main
author: sobolevn <m...@sobolevn.me>
committer: sobolevn <m...@sobolevn.me>
date: 2025-04-07T11:23:52+03:00
summary:

gh-132174: Fix function name in error message of `_interpreters.run_string` 
(#132175)

Co-authored-by: Brian Schubert <brianm.schub...@gmail.com>

files:
A Misc/NEWS.d/next/Library/2025-04-06-23-16-08.gh-issue-132174.dN4b-X.rst
M Modules/_interpretersmodule.c

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..fa868c372198c7
--- /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 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;

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to