René's URL Explorer Experiment


Title: PEP 810 – Explicit lazy imports | peps.python.org

Open Graph Title: PEP 810 – Explicit lazy imports | peps.python.org

Description: This PEP introduces syntax for lazy imports as an explicit language feature:

Open Graph Description: This PEP introduces syntax for lazy imports as an explicit language feature:

Opengraph URL: https://peps.python.org/pep-0810/

direct link

Domain: peps.python.org

color-schemelight dark
og:typewebsite
og:site_namePython Enhancement Proposals (PEPs)
og:imagehttps://peps.python.org/_static/og-image.png
og:image:altPython PEPs
og:image:width200
og:image:height200
theme-color#3776ab

Links:

Pythonhttps://www.python.org/
PEP Indexhttps://peps.python.org/
Discourse threadhttps://discuss.python.org/t/104131
03-Oct-2025https://discuss.python.org/t/104131
03-Nov-2025https://discuss.python.org/t/pep-810-explicit-lazy-imports/104131/466
Abstracthttps://peps.python.org/810#abstract
Motivationhttps://peps.python.org/810#motivation
Rationalehttps://peps.python.org/810#rationale
Other design decisionshttps://peps.python.org/810#other-design-decisions
Specificationhttps://peps.python.org/810#specification
Grammarhttps://peps.python.org/810#grammar
Syntax restrictionshttps://peps.python.org/810#syntax-restrictions
Semanticshttps://peps.python.org/810#semantics
Note on .pth fileshttps://peps.python.org/810#note-on-pth-files
Lazy objectshttps://peps.python.org/810#lazy-objects
Lazy import mechanismhttps://peps.python.org/810#lazy-import-mechanism
Reificationhttps://peps.python.org/810#reification
Reference Implementationhttps://peps.python.org/810#reference-implementation
Bytecode and adaptive specializationhttps://peps.python.org/810#bytecode-and-adaptive-specialization
Lazy imports filterhttps://peps.python.org/810#lazy-imports-filter
Global lazy imports controlhttps://peps.python.org/810#global-lazy-imports-control
Backwards Compatibilityhttps://peps.python.org/810#backwards-compatibility
Unchanged semanticshttps://peps.python.org/810#unchanged-semantics
Observable behavioral shifts (opt-in only)https://peps.python.org/810#observable-behavioral-shifts-opt-in-only
Thread-safety and reificationhttps://peps.python.org/810#thread-safety-and-reification
Performancehttps://peps.python.org/810#performance
Runtime performancehttps://peps.python.org/810#runtime-performance
Filter function performancehttps://peps.python.org/810#filter-function-performance
Startup time improvementshttps://peps.python.org/810#startup-time-improvements
Typing and toolshttps://peps.python.org/810#typing-and-tools
Security Implicationshttps://peps.python.org/810#security-implications
How to Teach Thishttps://peps.python.org/810#how-to-teach-this
FAQhttps://peps.python.org/810#faq
How does this differ from the rejected PEP 690?https://peps.python.org/810#how-does-this-differ-from-the-rejected-pep-690
What changes at reification time? What stays the same?https://peps.python.org/810#what-changes-at-reification-time-what-stays-the-same
What happens when lazy imports encounter errors?https://peps.python.org/810#what-happens-when-lazy-imports-encounter-errors
How do lazy imports affect modules with import-time side effects?https://peps.python.org/810#how-do-lazy-imports-affect-modules-with-import-time-side-effects
Can I use lazy imports with from ... import ... statements?https://peps.python.org/810#can-i-use-lazy-imports-with-from-import-statements
Does lazy from module import Class load the entire module or just the class?https://peps.python.org/810#does-lazy-from-module-import-class-load-the-entire-module-or-just-the-class
What about type annotations and TYPE_CHECKING imports?https://peps.python.org/810#what-about-type-annotations-and-type-checking-imports
What’s the performance overhead of lazy imports?https://peps.python.org/810#what-s-the-performance-overhead-of-lazy-imports
Can I mix lazy and eager imports of the same module?https://peps.python.org/810#can-i-mix-lazy-and-eager-imports-of-the-same-module
How do I migrate existing code to use lazy imports?https://peps.python.org/810#how-do-i-migrate-existing-code-to-use-lazy-imports
What about star imports (from module import *)?https://peps.python.org/810#what-about-star-imports-from-module-import
How do lazy imports interact with import hooks and custom loaders?https://peps.python.org/810#how-do-lazy-imports-interact-with-import-hooks-and-custom-loaders
What happens in multi-threaded environments?https://peps.python.org/810#what-happens-in-multi-threaded-environments
Can I force reification of a lazy import without using it?https://peps.python.org/810#can-i-force-reification-of-a-lazy-import-without-using-it
Why not use importlib.util.LazyLoader instead?https://peps.python.org/810#why-not-use-importlib-util-lazyloader-instead
Will this break tools like isort or black?https://peps.python.org/810#will-this-break-tools-like-isort-or-black
How do I know if a library is compatible with lazy imports?https://peps.python.org/810#how-do-i-know-if-a-library-is-compatible-with-lazy-imports
What happens if I globally enable lazy imports mode and a library doesn’t work correctly?https://peps.python.org/810#what-happens-if-i-globally-enable-lazy-imports-mode-and-a-library-doesn-t-work-correctly
Can I use lazy imports inside functions?https://peps.python.org/810#can-i-use-lazy-imports-inside-functions
What about forwards compatibility with older Python versions?https://peps.python.org/810#what-about-forwards-compatibility-with-older-python-versions
How do explicit lazy imports interact with PEP 649 and PEP 749?https://peps.python.org/810#how-do-explicit-lazy-imports-interact-with-pep-649-and-pep-749
How do lazy imports interact with dir(), getattr(), and module introspection?https://peps.python.org/810#how-do-lazy-imports-interact-with-dir-getattr-and-module-introspection
Do lazy imports work with circular imports?https://peps.python.org/810#do-lazy-imports-work-with-circular-imports
Will lazy imports affect the performance of my hot paths?https://peps.python.org/810#will-lazy-imports-affect-the-performance-of-my-hot-paths
What about sys.modules? When does a lazy import appear there?https://peps.python.org/810#what-about-sys-modules-when-does-a-lazy-import-appear-there
Does lazy from __future__ import feature work?https://peps.python.org/810#does-lazy-from-future-import-feature-work
Why did you choose lazy as the keyword name?https://peps.python.org/810#why-did-you-choose-lazy-as-the-keyword-name
Deferred Ideashttps://peps.python.org/810#deferred-ideas
Alternative syntax and ergonomic improvementshttps://peps.python.org/810#alternative-syntax-and-ergonomic-improvements
Automatic lazy imports for if TYPE_CHECKING blockshttps://peps.python.org/810#automatic-lazy-imports-for-if-type-checking-blocks
Module-level lazy import modehttps://peps.python.org/810#module-level-lazy-import-mode
Package metadata for lazy-safe declarationshttps://peps.python.org/810#package-metadata-for-lazy-safe-declarations
C API for lazy importshttps://peps.python.org/810#c-api-for-lazy-imports
Alternate Implementation Ideashttps://peps.python.org/810#alternate-implementation-ideas
Leveraging a subclass of dicthttps://peps.python.org/810#leveraging-a-subclass-of-dict
Alternate keyword nameshttps://peps.python.org/810#alternate-keyword-names
Rejected Ideashttps://peps.python.org/810#rejected-ideas
Making the new behavior the defaulthttps://peps.python.org/810#making-the-new-behavior-the-default
Supporting __lazy_modules__ = ["*"] as built-in syntaxhttps://peps.python.org/810#supporting-lazy-modules-as-built-in-syntax
Disallowing lazy imports inside with blockshttps://peps.python.org/810#disallowing-lazy-imports-inside-with-blocks
Forcing eager imports in with blocks under the global flaghttps://peps.python.org/810#forcing-eager-imports-in-with-blocks-under-the-global-flag
Modification of the dict objecthttps://peps.python.org/810#modification-of-the-dict-object
Transforming lazy objects via __class__ mutationhttps://peps.python.org/810#transforming-lazy-objects-via-class-mutation
Making lazy imports find the module without loading ithttps://peps.python.org/810#making-lazy-imports-find-the-module-without-loading-it
Placing the lazy keyword in the middle of from importshttps://peps.python.org/810#placing-the-lazy-keyword-in-the-middle-of-from-imports
Placing the lazy keyword at the end of import statementshttps://peps.python.org/810#placing-the-lazy-keyword-at-the-end-of-import-statements
Adding an explicit eager keywordhttps://peps.python.org/810#adding-an-explicit-eager-keyword
Allowing the filter to force lazy imports even when globally disabledhttps://peps.python.org/810#allowing-the-filter-to-force-lazy-imports-even-when-globally-disabled
Using underscore-prefixed names for advanced featureshttps://peps.python.org/810#using-underscore-prefixed-names-for-advanced-features
Using a decorator syntax for lazy importshttps://peps.python.org/810#using-a-decorator-syntax-for-lazy-imports
Using a context manager instead of a new soft keywordhttps://peps.python.org/810#using-a-context-manager-instead-of-a-new-soft-keyword
Returning a proxy dict from globals()https://peps.python.org/810#returning-a-proxy-dict-from-globals
Automatically reifying on __dict__ or globals() accesshttps://peps.python.org/810#automatically-reifying-on-dict-or-globals-access
Acknowledgementshttps://peps.python.org/810#acknowledgements
Footnoteshttps://peps.python.org/810#footnotes
Copyrighthttps://peps.python.org/810#copyright
Lazy importshttps://docs.python.org/3.15/reference/simple_stmts.html#lazy-imports
PEP 1https://peps.python.org/pep-0001/
Abstracthttps://peps.python.org/810#abstract
Motivationhttps://peps.python.org/810#motivation
LazyLoaderhttps://docs.python.org/3/library/importlib.html#importlib.util.LazyLoader
SPEC 1https://scientific-python.org/specs/spec-0001/
lazy_loaderhttps://pypi.org/project/lazy_loader/
[1]https://peps.python.org/810#f1
Rationalehttps://peps.python.org/810#rationale
Other design decisionshttps://peps.python.org/810#other-design-decisions
Specificationhttps://peps.python.org/810#specification
Grammarhttps://peps.python.org/810#grammar
Syntax restrictionshttps://peps.python.org/810#syntax-restrictions
Semanticshttps://peps.python.org/810#semantics
Lazy imports filterhttps://peps.python.org/810#lazy-imports-filter
Lazy imports filterhttps://peps.python.org/810#lazy-imports-filter
Note on .pth fileshttps://peps.python.org/810#note-on-pth-files
Lazy objectshttps://peps.python.org/810#lazy-objects
Lazy import mechanismhttps://peps.python.org/810#lazy-import-mechanism
Reificationhttps://peps.python.org/810#reification
Reference Implementationhttps://peps.python.org/810#reference-implementation
https://github.com/LazyImportsCabal/cpython/tree/lazyhttps://github.com/LazyImportsCabal/cpython/tree/lazy
https://lazy-import-demo.pages.dev/https://lazy-import-demo.pages.dev/
Bytecode and adaptive specializationhttps://peps.python.org/810#bytecode-and-adaptive-specialization
Lazy imports filterhttps://peps.python.org/810#lazy-imports-filter
sys.setrecursionlimit()https://docs.python.org/3/library/sys.html#sys.setrecursionlimit
sys.setswitchinterval()https://docs.python.org/3/library/sys.html#sys.setswitchinterval
gc.set_threshold()https://docs.python.org/3/library/gc.html#gc.set_threshold
Global lazy imports controlhttps://peps.python.org/810#global-lazy-imports-control
Backwards Compatibilityhttps://peps.python.org/810#backwards-compatibility
Unchanged semanticshttps://peps.python.org/810#unchanged-semantics
Observable behavioral shifts (opt-in only)https://peps.python.org/810#observable-behavioral-shifts-opt-in-only
Thread-safety and reificationhttps://peps.python.org/810#thread-safety-and-reification
Performancehttps://peps.python.org/810#performance
Runtime performancehttps://peps.python.org/810#runtime-performance
pyperformance suitehttps://github.com/facebookexperimental/free-threading-benchmarking/blob/main/results/bm-20250922-3.15.0a0-27836e5/bm-20250922-vultr-x86_64-DinoV-lazy_imports-3.15.0a0-27836e5-vs-base.svg
Filter function performancehttps://peps.python.org/810#filter-function-performance
hyperfinehttps://github.com/sharkdp/hyperfine
Startup time improvementshttps://peps.python.org/810#startup-time-improvements
Python Lazy Imports With Cinderhttps://developers.facebook.com/blog/post/2022/06/15/python-lazy-imports-with-cinder/
Lazy is the new fast: How Lazy Imports and Cinder accelerate machine learning at Metahttps://engineering.fb.com/2024/01/18/developer-tools/lazy-imports-cinder-machine-learning-meta/
Inside HRT’s Python Forkhttps://www.hudsonrivertrading.com/hrtbeat/inside-hrts-python-fork/
Create an On-Demand Initializer for PySidehttps://bugreports.qt.io/browse/PYSIDE-2404
PEP 690https://peps.python.org/pep-0690/
Typing and toolshttps://peps.python.org/810#typing-and-tools
Security Implicationshttps://peps.python.org/810#security-implications
How to Teach Thishttps://peps.python.org/810#how-to-teach-this
FAQhttps://peps.python.org/810#faq
How does this differ from the rejected PEP 690?https://peps.python.org/810#how-does-this-differ-from-the-rejected-pep-690
PEP 690https://peps.python.org/pep-0690/
What changes at reification time? What stays the same?https://peps.python.org/810#what-changes-at-reification-time-what-stays-the-same
What happens when lazy imports encounter errors?https://peps.python.org/810#what-happens-when-lazy-imports-encounter-errors
How do lazy imports affect modules with import-time side effects?https://peps.python.org/810#how-do-lazy-imports-affect-modules-with-import-time-side-effects
Can I use lazy imports with from ... import ... statements?https://peps.python.org/810#can-i-use-lazy-imports-with-from-import-statements
Does lazy from module import Class load the entire module or just the class?https://peps.python.org/810#does-lazy-from-module-import-class-load-the-entire-module-or-just-the-class
What about type annotations and TYPE_CHECKING imports?https://peps.python.org/810#what-about-type-annotations-and-type-checking-imports
What’s the performance overhead of lazy imports?https://peps.python.org/810#what-s-the-performance-overhead-of-lazy-imports
pyperformance suitehttps://github.com/facebookexperimental/free-threading-benchmarking/blob/main/results/bm-20250922-3.15.0a0-27836e5/bm-20250922-vultr-x86_64-DinoV-lazy_imports-3.15.0a0-27836e5-vs-base.svg
Can I mix lazy and eager imports of the same module?https://peps.python.org/810#can-i-mix-lazy-and-eager-imports-of-the-same-module
How do I migrate existing code to use lazy imports?https://peps.python.org/810#how-do-i-migrate-existing-code-to-use-lazy-imports
What about star imports (from module import *)?https://peps.python.org/810#what-about-star-imports-from-module-import
How do lazy imports interact with import hooks and custom loaders?https://peps.python.org/810#how-do-lazy-imports-interact-with-import-hooks-and-custom-loaders
What happens in multi-threaded environments?https://peps.python.org/810#what-happens-in-multi-threaded-environments
Can I force reification of a lazy import without using it?https://peps.python.org/810#can-i-force-reification-of-a-lazy-import-without-using-it
Why not use importlib.util.LazyLoader instead?https://peps.python.org/810#why-not-use-importlib-util-lazyloader-instead
LazyLoaderhttps://docs.python.org/3/library/importlib.html#importlib.util.LazyLoader
Will this break tools like isort or black?https://peps.python.org/810#will-this-break-tools-like-isort-or-black
How do I know if a library is compatible with lazy imports?https://peps.python.org/810#how-do-i-know-if-a-library-is-compatible-with-lazy-imports
What happens if I globally enable lazy imports mode and a library doesn’t work correctly?https://peps.python.org/810#what-happens-if-i-globally-enable-lazy-imports-mode-and-a-library-doesn-t-work-correctly
Can I use lazy imports inside functions?https://peps.python.org/810#can-i-use-lazy-imports-inside-functions
What about forwards compatibility with older Python versions?https://peps.python.org/810#what-about-forwards-compatibility-with-older-python-versions
How do explicit lazy imports interact with PEP 649 and PEP 749?https://peps.python.org/810#how-do-explicit-lazy-imports-interact-with-pep-649-and-pep-749
PEP 649https://peps.python.org/pep-0649/
PEP 749https://peps.python.org/pep-0749/
How do lazy imports interact with dir(), getattr(), and module introspection?https://peps.python.org/810#how-do-lazy-imports-interact-with-dir-getattr-and-module-introspection
Do lazy imports work with circular imports?https://peps.python.org/810#do-lazy-imports-work-with-circular-imports
Will lazy imports affect the performance of my hot paths?https://peps.python.org/810#will-lazy-imports-affect-the-performance-of-my-hot-paths
What about sys.modules? When does a lazy import appear there?https://peps.python.org/810#what-about-sys-modules-when-does-a-lazy-import-appear-there
Does lazy from __future__ import feature work?https://peps.python.org/810#does-lazy-from-future-import-feature-work
Why did you choose lazy as the keyword name?https://peps.python.org/810#why-did-you-choose-lazy-as-the-keyword-name
Deferred Ideashttps://peps.python.org/810#deferred-ideas
Alternative syntax and ergonomic improvementshttps://peps.python.org/810#alternative-syntax-and-ergonomic-improvements
Automatic lazy imports for if TYPE_CHECKING blockshttps://peps.python.org/810#automatic-lazy-imports-for-if-type-checking-blocks
Module-level lazy import modehttps://peps.python.org/810#module-level-lazy-import-mode
Package metadata for lazy-safe declarationshttps://peps.python.org/810#package-metadata-for-lazy-safe-declarations
C API for lazy importshttps://peps.python.org/810#c-api-for-lazy-imports
Alternate Implementation Ideashttps://peps.python.org/810#alternate-implementation-ideas
Leveraging a subclass of dicthttps://peps.python.org/810#leveraging-a-subclass-of-dict
Alternate keyword nameshttps://peps.python.org/810#alternate-keyword-names
Rejected Ideashttps://peps.python.org/810#rejected-ideas
Making the new behavior the defaulthttps://peps.python.org/810#making-the-new-behavior-the-default
PEP 690https://peps.python.org/pep-0690/
Supporting __lazy_modules__ = ["*"] as built-in syntaxhttps://peps.python.org/810#supporting-lazy-modules-as-built-in-syntax
Disallowing lazy imports inside with blockshttps://peps.python.org/810#disallowing-lazy-imports-inside-with-blocks
Forcing eager imports in with blocks under the global flaghttps://peps.python.org/810#forcing-eager-imports-in-with-blocks-under-the-global-flag
Modification of the dict objecthttps://peps.python.org/810#modification-of-the-dict-object
Transforming lazy objects via __class__ mutationhttps://peps.python.org/810#transforming-lazy-objects-via-class-mutation
Making lazy imports find the module without loading ithttps://peps.python.org/810#making-lazy-imports-find-the-module-without-loading-it
Placing the lazy keyword in the middle of from importshttps://peps.python.org/810#placing-the-lazy-keyword-in-the-middle-of-from-imports
Placing the lazy keyword at the end of import statementshttps://peps.python.org/810#placing-the-lazy-keyword-at-the-end-of-import-statements
Adding an explicit eager keywordhttps://peps.python.org/810#adding-an-explicit-eager-keyword
Allowing the filter to force lazy imports even when globally disabledhttps://peps.python.org/810#allowing-the-filter-to-force-lazy-imports-even-when-globally-disabled
Using underscore-prefixed names for advanced featureshttps://peps.python.org/810#using-underscore-prefixed-names-for-advanced-features
Using a decorator syntax for lazy importshttps://peps.python.org/810#using-a-decorator-syntax-for-lazy-imports
Using a context manager instead of a new soft keywordhttps://peps.python.org/810#using-a-context-manager-instead-of-a-new-soft-keyword
Returning a proxy dict from globals()https://peps.python.org/810#returning-a-proxy-dict-from-globals
Automatically reifying on __dict__ or globals() accesshttps://peps.python.org/810#automatically-reifying-on-dict-or-globals-access
Acknowledgementshttps://peps.python.org/810#acknowledgements
PEP 690https://peps.python.org/pep-0690/
Footnoteshttps://peps.python.org/810#footnotes
1https://peps.python.org/810#id1
flake8-type-checkinghttps://pypi.org/project/flake8-type-checking/
Copyrighthttps://peps.python.org/810#copyright
Abstracthttps://peps.python.org/810#abstract
Motivationhttps://peps.python.org/810#motivation
Rationalehttps://peps.python.org/810#rationale
Other design decisionshttps://peps.python.org/810#other-design-decisions
Specificationhttps://peps.python.org/810#specification
Grammarhttps://peps.python.org/810#grammar
Syntax restrictionshttps://peps.python.org/810#syntax-restrictions
Semanticshttps://peps.python.org/810#semantics
Note on .pth fileshttps://peps.python.org/810#note-on-pth-files
Lazy objectshttps://peps.python.org/810#lazy-objects
Lazy import mechanismhttps://peps.python.org/810#lazy-import-mechanism
Reificationhttps://peps.python.org/810#reification
Reference Implementationhttps://peps.python.org/810#reference-implementation
Bytecode and adaptive specializationhttps://peps.python.org/810#bytecode-and-adaptive-specialization
Lazy imports filterhttps://peps.python.org/810#lazy-imports-filter
Global lazy imports controlhttps://peps.python.org/810#global-lazy-imports-control
Backwards Compatibilityhttps://peps.python.org/810#backwards-compatibility
Unchanged semanticshttps://peps.python.org/810#unchanged-semantics
Observable behavioral shifts (opt-in only)https://peps.python.org/810#observable-behavioral-shifts-opt-in-only
Thread-safety and reificationhttps://peps.python.org/810#thread-safety-and-reification
Performancehttps://peps.python.org/810#performance
Runtime performancehttps://peps.python.org/810#runtime-performance
Filter function performancehttps://peps.python.org/810#filter-function-performance
Startup time improvementshttps://peps.python.org/810#startup-time-improvements
Typing and toolshttps://peps.python.org/810#typing-and-tools
Security Implicationshttps://peps.python.org/810#security-implications
How to Teach Thishttps://peps.python.org/810#how-to-teach-this
FAQhttps://peps.python.org/810#faq
How does this differ from the rejected PEP 690?https://peps.python.org/810#how-does-this-differ-from-the-rejected-pep-690
What changes at reification time? What stays the same?https://peps.python.org/810#what-changes-at-reification-time-what-stays-the-same
What happens when lazy imports encounter errors?https://peps.python.org/810#what-happens-when-lazy-imports-encounter-errors
How do lazy imports affect modules with import-time side effects?https://peps.python.org/810#how-do-lazy-imports-affect-modules-with-import-time-side-effects
Can I use lazy imports with from ... import ... statements?https://peps.python.org/810#can-i-use-lazy-imports-with-from-import-statements
Does lazy from module import Class load the entire module or just the class?https://peps.python.org/810#does-lazy-from-module-import-class-load-the-entire-module-or-just-the-class
What about type annotations and TYPE_CHECKING imports?https://peps.python.org/810#what-about-type-annotations-and-type-checking-imports
What’s the performance overhead of lazy imports?https://peps.python.org/810#what-s-the-performance-overhead-of-lazy-imports
Can I mix lazy and eager imports of the same module?https://peps.python.org/810#can-i-mix-lazy-and-eager-imports-of-the-same-module
How do I migrate existing code to use lazy imports?https://peps.python.org/810#how-do-i-migrate-existing-code-to-use-lazy-imports
What about star imports (from module import *)?https://peps.python.org/810#what-about-star-imports-from-module-import
How do lazy imports interact with import hooks and custom loaders?https://peps.python.org/810#how-do-lazy-imports-interact-with-import-hooks-and-custom-loaders
What happens in multi-threaded environments?https://peps.python.org/810#what-happens-in-multi-threaded-environments
Can I force reification of a lazy import without using it?https://peps.python.org/810#can-i-force-reification-of-a-lazy-import-without-using-it
Why not use importlib.util.LazyLoader instead?https://peps.python.org/810#why-not-use-importlib-util-lazyloader-instead
Will this break tools like isort or black?https://peps.python.org/810#will-this-break-tools-like-isort-or-black
How do I know if a library is compatible with lazy imports?https://peps.python.org/810#how-do-i-know-if-a-library-is-compatible-with-lazy-imports
What happens if I globally enable lazy imports mode and a library doesn’t work correctly?https://peps.python.org/810#what-happens-if-i-globally-enable-lazy-imports-mode-and-a-library-doesn-t-work-correctly
Can I use lazy imports inside functions?https://peps.python.org/810#can-i-use-lazy-imports-inside-functions
What about forwards compatibility with older Python versions?https://peps.python.org/810#what-about-forwards-compatibility-with-older-python-versions
How do explicit lazy imports interact with PEP 649 and PEP 749?https://peps.python.org/810#how-do-explicit-lazy-imports-interact-with-pep-649-and-pep-749
How do lazy imports interact with dir(), getattr(), and module introspection?https://peps.python.org/810#how-do-lazy-imports-interact-with-dir-getattr-and-module-introspection
Do lazy imports work with circular imports?https://peps.python.org/810#do-lazy-imports-work-with-circular-imports
Will lazy imports affect the performance of my hot paths?https://peps.python.org/810#will-lazy-imports-affect-the-performance-of-my-hot-paths
What about sys.modules? When does a lazy import appear there?https://peps.python.org/810#what-about-sys-modules-when-does-a-lazy-import-appear-there
Does lazy from __future__ import feature work?https://peps.python.org/810#does-lazy-from-future-import-feature-work
Why did you choose lazy as the keyword name?https://peps.python.org/810#why-did-you-choose-lazy-as-the-keyword-name
Deferred Ideashttps://peps.python.org/810#deferred-ideas
Alternative syntax and ergonomic improvementshttps://peps.python.org/810#alternative-syntax-and-ergonomic-improvements
Automatic lazy imports for if TYPE_CHECKING blockshttps://peps.python.org/810#automatic-lazy-imports-for-if-type-checking-blocks
Module-level lazy import modehttps://peps.python.org/810#module-level-lazy-import-mode
Package metadata for lazy-safe declarationshttps://peps.python.org/810#package-metadata-for-lazy-safe-declarations
C API for lazy importshttps://peps.python.org/810#c-api-for-lazy-imports
Alternate Implementation Ideashttps://peps.python.org/810#alternate-implementation-ideas
Leveraging a subclass of dicthttps://peps.python.org/810#leveraging-a-subclass-of-dict
Alternate keyword nameshttps://peps.python.org/810#alternate-keyword-names
Rejected Ideashttps://peps.python.org/810#rejected-ideas
Making the new behavior the defaulthttps://peps.python.org/810#making-the-new-behavior-the-default
Supporting __lazy_modules__ = ["*"] as built-in syntaxhttps://peps.python.org/810#supporting-lazy-modules-as-built-in-syntax
Disallowing lazy imports inside with blockshttps://peps.python.org/810#disallowing-lazy-imports-inside-with-blocks
Forcing eager imports in with blocks under the global flaghttps://peps.python.org/810#forcing-eager-imports-in-with-blocks-under-the-global-flag
Modification of the dict objecthttps://peps.python.org/810#modification-of-the-dict-object
Transforming lazy objects via __class__ mutationhttps://peps.python.org/810#transforming-lazy-objects-via-class-mutation
Making lazy imports find the module without loading ithttps://peps.python.org/810#making-lazy-imports-find-the-module-without-loading-it
Placing the lazy keyword in the middle of from importshttps://peps.python.org/810#placing-the-lazy-keyword-in-the-middle-of-from-imports
Placing the lazy keyword at the end of import statementshttps://peps.python.org/810#placing-the-lazy-keyword-at-the-end-of-import-statements
Adding an explicit eager keywordhttps://peps.python.org/810#adding-an-explicit-eager-keyword
Allowing the filter to force lazy imports even when globally disabledhttps://peps.python.org/810#allowing-the-filter-to-force-lazy-imports-even-when-globally-disabled
Using underscore-prefixed names for advanced featureshttps://peps.python.org/810#using-underscore-prefixed-names-for-advanced-features
Using a decorator syntax for lazy importshttps://peps.python.org/810#using-a-decorator-syntax-for-lazy-imports
Using a context manager instead of a new soft keywordhttps://peps.python.org/810#using-a-context-manager-instead-of-a-new-soft-keyword
Returning a proxy dict from globals()https://peps.python.org/810#returning-a-proxy-dict-from-globals
Automatically reifying on __dict__ or globals() accesshttps://peps.python.org/810#automatically-reifying-on-dict-or-globals-access
Acknowledgementshttps://peps.python.org/810#acknowledgements
Footnoteshttps://peps.python.org/810#footnotes
Copyrighthttps://peps.python.org/810#copyright
Page Source (GitHub)https://github.com/python/peps/blob/main/peps/pep-0810.rst?plain=1
https://github.com/python/peps/blob/main/peps/pep-0810.rsthttps://github.com/python/peps/blob/main/peps/pep-0810.rst
2026-06-27 10:06:25 UTChttps://github.com/python/peps/commits/main/peps/pep-0810.rst

Viewport: width=device-width, initial-scale=1.0


URLs of crawlers that visited me.