Skip to content
Merged
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
12 changes: 0 additions & 12 deletions Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -940,18 +940,6 @@ always available. Unless explicitly noted otherwise, all variables are read-only
.. versionadded:: next


.. function:: get_lazy_modules()

Returns a set of fully-qualified module names that have been
lazily imported. This is primarily useful for diagnostics and
introspection.

Note that modules are removed from this set when they are reified
(actually loaded on first use).

.. versionadded:: next


.. function:: getrefcount(object)

Return the reference count of the *object*. The count returned is generally one
Expand Down
7 changes: 2 additions & 5 deletions Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,8 @@ eager:
import myapp.slow_module # lazy (matches filter)
import json # eager (does not match filter)

For debugging and introspection, :func:`sys.get_lazy_modules` returns a set
containing the names of all modules that have been lazily imported but not
yet loaded. The proxy type itself is available as
:data:`types.LazyImportType` for code that needs to detect lazy imports
programmatically.
The proxy type itself is available as :data:`types.LazyImportType` for code
that needs to detect lazy imports programmatically.

There are some restrictions on where the ``lazy`` keyword can be used. Lazy
imports are only permitted at module scope; using ``lazy`` inside a
Expand Down