diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 48424381ac5003..730dba263af10b 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -954,7 +954,7 @@ always available. Unless explicitly noted otherwise, all variables are read-only :attr:`module.__lazy_modules__`. This is the default mode. * ``"all"``: Make all eligible module-scope imports potentially lazy. - See also :func:`set_lazy_imports` and :pep:`810`. + See also :func:`set_lazy_imports` and :ref:`lazy-imports`. .. versionadded:: 3.15 @@ -1538,7 +1538,7 @@ always available. Unless explicitly noted otherwise, all variables are read-only In future versions of Python, these may be removed, and/or additional extras may be added. - See also :func:`set_lazy_imports` and :pep:`810`. + See also :func:`set_lazy_imports` and :ref:`lazy-imports`. .. versionadded:: 3.15 @@ -1848,7 +1848,7 @@ always available. Unless explicitly noted otherwise, all variables are read-only In addition to the mode, lazy imports can be controlled via the filter provided by :func:`set_lazy_imports_filter`. - See also :func:`get_lazy_imports` and :pep:`810`. + See also :func:`get_lazy_imports` and :ref:`lazy-imports`. .. versionadded:: 3.15 @@ -1885,7 +1885,7 @@ always available. Unless explicitly noted otherwise, all variables are read-only This is an advanced feature intended for specialized users who need fine-grained control over lazy import behavior. - See also :func:`get_lazy_imports_filter` and :pep:`810`. + See also :func:`get_lazy_imports_filter` and :ref:`lazy-imports`. .. versionadded:: 3.15 diff --git a/Doc/library/types.rst b/Doc/library/types.rst index cd7c2605fc6b61..7e0714a5e0fdcc 100644 --- a/Doc/library/types.rst +++ b/Doc/library/types.rst @@ -362,7 +362,7 @@ Standard names are defined for the following types: .. versionadded:: 3.15 - .. seealso:: :pep:`810` + .. seealso:: :ref:`lazy-imports` .. method:: resolve() @@ -373,6 +373,10 @@ Standard names are defined for the following types: lazy import json json = globals()["json"].resolve() + Each call to :func:`!resolve` call does a fresh import. + The proxy itself does not store :func:`!resolve`'s result, + relying on the import mechanism to use :attr:`sys.modules` + to reuse modules that have already been imported. .. class:: GetSetDescriptorType diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index d0a6df28cae413..42566e620210e3 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -921,7 +921,9 @@ If an error occurs during module loading (such as :exc:`ImportError` or used, not at the import statement itself. The sections below describe name resolution and runtime controls. -See :pep:`810` for the full specification of lazy imports. + +.. seealso:: :pep:`810` provides the rationale and initial specification + for lazy imports. .. versionadded:: 3.15