diff options
author | Brett Cannon <brett@python.org> | 2022-10-06 22:40:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 22:40:22 (GMT) |
commit | e1c4d56fdde28728c37de855edbb463fa0d7f95d (patch) | |
tree | b4c3a715e975f6349a8b07d856965fffb911f26d /Doc/c-api/import.rst | |
parent | f8edc6ff531bb98858185857513371f14519ed1d (diff) | |
download | cpython-e1c4d56fdde28728c37de855edbb463fa0d7f95d.zip cpython-e1c4d56fdde28728c37de855edbb463fa0d7f95d.tar.gz cpython-e1c4d56fdde28728c37de855edbb463fa0d7f95d.tar.bz2 |
gh-65961: Do not rely solely on `__cached__` (GH-97990)
Make sure `__spec__.cached` (at minimum) can be used.
Diffstat (limited to 'Doc/c-api/import.rst')
-rw-r--r-- | Doc/c-api/import.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst index 0922956..a51619d 100644 --- a/Doc/c-api/import.rst +++ b/Doc/c-api/import.rst @@ -150,6 +150,11 @@ Importing Modules See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:`PyImport_ExecCodeModuleWithPathnames`. + .. versionchanged:: 3.12 + The setting of :attr:`__cached__` and :attr:`__loader__` is + deprecated. See :class:`~importlib.machinery.ModuleSpec` for + alternatives. + .. c:function:: PyObject* PyImport_ExecCodeModuleEx(const char *name, PyObject *co, const char *pathname) @@ -167,6 +172,10 @@ Importing Modules .. versionadded:: 3.3 + .. versionchanged:: 3.12 + Setting :attr:`__cached__` is deprecated. See + :class:`~importlib.machinery.ModuleSpec` for alternatives. + .. c:function:: PyObject* PyImport_ExecCodeModuleWithPathnames(const char *name, PyObject *co, const char *pathname, const char *cpathname) |