mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
gh-65961: Do not rely solely on __cached__
(GH-97990)
Make sure `__spec__.cached` (at minimum) can be used.
This commit is contained in:
parent
f8edc6ff53
commit
e1c4d56fdd
11 changed files with 130 additions and 35 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue