[Python-checkins] bpo-44530: Reverts a change to the 'code.__new__' audit event (GH-29809)

zooba webhook-mailer at python.org
Fri Nov 26 19:26:54 EST 2021


https://github.com/python/cpython/commit/db55f3fabafc046e4fca907210ced4ce16bf58d6
commit: db55f3fabafc046e4fca907210ced4ce16bf58d6
branch: main
author: Steve Dower <steve.dower at python.org>
committer: zooba <steve.dower at microsoft.com>
date: 2021-11-27T00:26:45Z
summary:

bpo-44530: Reverts a change to the 'code.__new__' audit event (GH-29809)

files:
A Misc/NEWS.d/next/Core and Builtins/2021-11-26-23-26-25.bpo-44530.EZ0gel.rst
M Objects/codeobject.c

diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-11-26-23-26-25.bpo-44530.EZ0gel.rst b/Misc/NEWS.d/next/Core and Builtins/2021-11-26-23-26-25.bpo-44530.EZ0gel.rst
new file mode 100644
index 0000000000000..f3c3a94dbf1ae
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2021-11-26-23-26-25.bpo-44530.EZ0gel.rst	
@@ -0,0 +1,2 @@
+Reverts a change to the ``code.__new__`` :ref:`audit event <audit-events>`
+from an earlier prerelease.
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 8de5c4d9c8a9d..5ab8641a17caa 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -1254,8 +1254,8 @@ code_new_impl(PyTypeObject *type, int argcount, int posonlyargcount,
     PyObject *ourfreevars = NULL;
     PyObject *ourcellvars = NULL;
 
-    if (PySys_Audit("code.__new__", "OOOOiiiiii",
-                    code, filename, name, qualname, argcount, posonlyargcount,
+    if (PySys_Audit("code.__new__", "OOOiiiiii",
+                    code, filename, name, argcount, posonlyargcount,
                     kwonlyargcount, nlocals, stacksize, flags) < 0) {
         goto cleanup;
     }
@@ -1638,8 +1638,8 @@ code_replace_impl(PyCodeObject *self, int co_argcount,
 
 #undef CHECK_INT_ARG
 
-    if (PySys_Audit("code.__new__", "OOOOiiiiii",
-                    co_code, co_filename, co_name, co_qualname, co_argcount,
+    if (PySys_Audit("code.__new__", "OOOiiiiii",
+                    co_code, co_filename, co_name, co_argcount,
                     co_posonlyargcount, co_kwonlyargcount, co_nlocals,
                     co_stacksize, co_flags) < 0) {
         return NULL;



More information about the Python-checkins mailing list