[3.13] gh-126018: Avoid aborting due to unnecessary assert in sys.audit (GH-126020) (#126042)

(cherry picked from commit 80eec52fc8)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-10-27 16:07:33 +01:00 committed by GitHub
parent 9e37bfae5a
commit e4157f0fd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 1 deletions

View file

@ -518,7 +518,6 @@ sys_audit(PyObject *self, PyObject *const *args, Py_ssize_t argc)
}
assert(args[0] != NULL);
assert(PyUnicode_Check(args[0]));
if (!should_audit(tstate->interp)) {
Py_RETURN_NONE;