Skip to content

Commit 10ec730

Browse files
committed
gh-155273: Document PyConfig.lazy_imports
1 parent 297eb1b commit 10ec730

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎Doc/c-api/init_config.rst‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,10 @@ Configuration Options
385385
- :c:member:`isolated <PyConfig.isolated>`
386386
- ``bool``
387387
- Read-only
388+
* - ``"lazy_imports"``
389+
- :c:member:`lazy_imports <PyConfig.lazy_imports>`
390+
- ``int``
391+
- Public
388392
* - ``"legacy_windows_fs_encoding"``
389393
- :c:member:`legacy_windows_fs_encoding <PyPreConfig.legacy_windows_fs_encoding>`
390394
- ``bool``
@@ -1578,6 +1582,21 @@ PyConfig
15781582
See also the :ref:`Isolated Configuration <init-isolated-conf>` and
15791583
:c:member:`PyPreConfig.isolated`.
15801584
1585+
.. c:member:: int lazy_imports
1586+
1587+
Control :ref:`lazy imports <lazy-imports>`.
1588+
1589+
A value of ``-1`` keeps the default behaviour, where only imports marked
1590+
with the ``lazy`` keyword are lazy. A value of ``1`` makes every import
1591+
lazy. ``0`` is rejected.
1592+
1593+
Configured by the :option:`-X lazy_imports <-X>` command line option or
1594+
the :envvar:`PYTHON_LAZY_IMPORTS` environment variable.
1595+
1596+
Default: ``-1``.
1597+
1598+
.. versionadded:: 3.15
1599+
15811600
.. c:member:: int legacy_windows_stdio
15821601
15831602
If non-zero, use :class:`io.FileIO` instead of

0 commit comments

Comments
 (0)