https://github.com/python/cpython/commit/be581b5dc52b277e00a0e9dff3e442436eb69ce8
commit: be581b5dc52b277e00a0e9dff3e442436eb69ce8
branch: main
author: Vyron Vasileiadis <[email protected]>
committer: ZeroIntensity <[email protected]>
date: 2026-11-03T21:38:43-05:00
summary:

gh-155273: Document `PyConfig.lazy_imports` (GH-155281)

files:
M Doc/c-api/init_config.rst

diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst
index af74e2d0a8369b..f9190cbafc6a24 100644
--- a/Doc/c-api/init_config.rst
+++ b/Doc/c-api/init_config.rst
@@ -390,6 +390,10 @@ Configuration Options
      - :c:member:`isolated <PyConfig.isolated>`
      - ``bool``
      - Read-only
+   * - ``"lazy_imports"``
+     - :c:member:`lazy_imports <PyConfig.lazy_imports>`
+     - ``int``
+     - Public
    * - ``"legacy_windows_fs_encoding"``
      - :c:member:`legacy_windows_fs_encoding 
<PyPreConfig.legacy_windows_fs_encoding>`
      - ``bool``
@@ -1599,6 +1603,21 @@ PyConfig
       See also the :ref:`Isolated Configuration <init-isolated-conf>` and
       :c:member:`PyPreConfig.isolated`.
 
+   .. c:member:: int lazy_imports
+
+      Control :ref:`lazy imports <lazy-imports>`.
+
+      A value of ``-1`` keeps the default behaviour, where only imports marked
+      with the ``lazy`` keyword are lazy. A value of ``1`` makes every import
+      lazy. ``0`` is rejected.
+
+      Configured by the :option:`-X lazy_imports <-X>` command line option or
+      the :envvar:`PYTHON_LAZY_IMPORTS` environment variable.
+
+      Default: ``-1``.
+
+      .. versionadded:: 3.15
+
    .. c:member:: int legacy_windows_stdio
 
       If non-zero, use :class:`io.FileIO` instead of

_______________________________________________
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