summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2025-12-11 19:44:46 (GMT)
committerGitHub <noreply@github.com>2025-12-11 19:44:46 (GMT)
commitaf185727b2a4aeb39ba0c323588be495d8cc2e19 (patch)
tree271d1ca940a74b359e4ce25ac42e93a183a86f86 /Python/pythonrun.c
parenta26c831bc486b6e607cee6a5923bad52b97c2341 (diff)
downloadcpython-af185727b2a4aeb39ba0c323588be495d8cc2e19.zip
cpython-af185727b2a4aeb39ba0c323588be495d8cc2e19.tar.gz
cpython-af185727b2a4aeb39ba0c323588be495d8cc2e19.tar.bz2
GH-65961: Stop setting `__cached__` on modules (GH-142165)
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 272be50..f2c402e 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -478,9 +478,6 @@ _PyRun_SimpleFileObject(FILE *fp, PyObject *filename, int closeit,
if (PyDict_SetItemString(dict, "__file__", filename) < 0) {
goto done;
}
- if (PyDict_SetItemString(dict, "__cached__", Py_None) < 0) {
- goto done;
- }
set_file_name = 1;
}
@@ -535,9 +532,6 @@ _PyRun_SimpleFileObject(FILE *fp, PyObject *filename, int closeit,
if (PyDict_PopString(dict, "__file__", NULL) < 0) {
PyErr_Print();
}
- if (PyDict_PopString(dict, "__cached__", NULL) < 0) {
- PyErr_Print();
- }
}
Py_XDECREF(main_module);
return ret;