https://github.com/python/cpython/commit/47ec30819883578ba9f0904cea674007789c8739
commit: 47ec30819883578ba9f0904cea674007789c8739
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: hugovk <[email protected]>
date: 2026-10-25T16:07:45+02:00
summary:

[3.15] gh-142349: Update lazy imports C API and sys.flags documentation 
(GH-158966) (#160110)

Co-authored-by: Brittany Reynoso <[email protected]>

files:
M Doc/c-api/import.rst
M Doc/library/sys.rst

diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst
index 2eb8a45d299bc6..11e795a8016a3c 100644
--- a/Doc/c-api/import.rst
+++ b/Doc/c-api/import.rst
@@ -363,8 +363,7 @@ Importing Modules
 
 .. c:function:: int PyImport_SetLazyImportsMode(PyImport_LazyImportsMode mode)
 
-   Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded
-   strings instead of Python :class:`str` objects.
+   Sets the current lazy imports mode.
 
    This function always returns ``0``.
 
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 8a86d0f6f6c039..2307968c0c511c 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -652,6 +652,11 @@ always available. Unless explicitly noted otherwise, all 
variables are read-only
         - :option:`-X context_aware_warnings <-X>` and
           :envvar:`PYTHON_CONTEXT_AWARE_WARNINGS`
 
+      * - .. attribute:: flags.lazy_imports
+        - :option:`-X lazy_imports <-X>` and :envvar:`PYTHON_LAZY_IMPORTS`
+          (``1`` for ``all``, ``-1`` otherwise; not changed by
+          :func:`set_lazy_imports`)
+
 
    .. versionchanged:: 3.2
       Added ``quiet`` attribute for the new :option:`-q` flag.
@@ -688,6 +693,9 @@ always available. Unless explicitly noted otherwise, all 
variables are read-only
    .. versionchanged:: 3.14
       Added the ``context_aware_warnings`` attribute.
 
+   .. versionchanged:: 3.15
+      Added the ``lazy_imports`` attribute.
+
 
 .. data:: float_info
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to