Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,21 @@ always available. Unless explicitly noted otherwise, all variables are read-only
They hold the legacy representation of ``sys.last_exc``, as returned
from :func:`exc_info` above.


.. data:: lazy_modules

A :class:`set` of fully qualified module name strings that have been lazily
imported in the current interpreter but not yet loaded. When a
lazily imported module is accessed for the first time, its name is removed
from this set.

This attribute is intended for debugging and introspection.

See also :func:`set_lazy_imports` and :pep:`810`.

.. versionadded:: 3.15


.. data:: maxsize

An integer giving the maximum value a variable of type :c:type:`Py_ssize_t` can
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.15.0a8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ Fix :func:`repr` for lists and tuples containing ``NULL``\ s.
.. nonce: aB3xKm
.. section: Core and Builtins

Fixed ``sys.lazy_modules`` to include lazy modules without submodules. Patch
Fixed :py:attr:`sys.lazy_modules` to include lazy modules without submodules. Patch
by Bartosz Sławecki.

..
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.15.0b2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function call.
.. nonce: -RD3z5
.. section: Core and Builtins

``sys.lazy_modules`` is now a set instead of a dict as initially spelled out
:py:attr:`sys.lazy_modules` is now a set instead of a dict as initially spelled out
in PEP 810.

..
Expand Down
Loading