]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-142666: Remove unused variable package in import logic (GH-142667)
authorYongtao Huang <yongtaoh2022@gmail.com>
Sun, 14 Dec 2025 09:39:45 +0000 (17:39 +0800)
committerGitHub <noreply@github.com>
Sun, 14 Dec 2025 09:39:45 +0000 (11:39 +0200)
The variable was previously used, but became unused after 133138a284b.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
Python/import.c

index 2860ae032dfe299303ed7e1eb7db38acfa794f5f..f4decf6e5cd2472be168c2452cc0b8406cf12056 100644 (file)
@@ -3827,7 +3827,6 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
     PyObject *abs_name = NULL;
     PyObject *final_mod = NULL;
     PyObject *mod = NULL;
-    PyObject *package = NULL;
     PyInterpreterState *interp = tstate->interp;
     int has_from;
 
@@ -3956,7 +3955,6 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
   error:
     Py_XDECREF(abs_name);
     Py_XDECREF(mod);
-    Py_XDECREF(package);
     if (final_mod == NULL) {
         remove_importlib_frames(tstate);
     }