Skip to content
Merged
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
18 changes: 12 additions & 6 deletions peps/pep-0810.rst
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,12 @@ After several calls, ``LOAD_GLOBAL`` specializes to ``LOAD_GLOBAL_MODULE``:
Lazy imports filter
-------------------

*Note: This is an advanced feature. Library developers should NOT call these
functions. These are intended for specialized/advanced users who need
fine-grained control over lazy import behavior when using the global flags.*
*Note: This is an advanced feature. These are intended for specialized/advanced
users who need fine-grained control over lazy import behavior when using the
global flags. Library developers are discouraged from using these functions as
they can affect the runtime execution of applications (similar to
``sys.setrecursionlimit()``, ``sys.setswitchinterval()``, or
``gc.set_threshold()``).*

This PEP adds the following new functions to the ``sys`` module to manage the
lazy imports filter:
Expand Down Expand Up @@ -672,9 +675,12 @@ Example:
Global lazy imports control
----------------------------

*Note: This is an advanced feature. Library developers should NOT use the global
activation mechanism. This is intended for application developers and framework
authors who need to control lazy imports across their entire application.*
*Note: This is an advanced feature. This is intended for application developers
and framework authors who need to control lazy imports across their entire
application. Library developers are discouraged from using the global activation
mechanism as it can affect the runtime execution of applications (similar to
``sys.setrecursionlimit()``, ``sys.setswitchinterval()``, or
``gc.set_threshold()``).*

The global lazy imports flag can be controlled through:

Expand Down