From d5b3753411d5e3d5a7d27ba3e4f6b533acfac0dc Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sun, 19 Oct 2025 00:40:19 +0200 Subject: [PATCH] PEP 810: Clatify that no C-API will be added in this PEP --- peps/pep-0810.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/peps/pep-0810.rst b/peps/pep-0810.rst index 56d6eacdd98..ed52fac249f 100644 --- a/peps/pep-0810.rst +++ b/peps/pep-0810.rst @@ -1581,6 +1581,16 @@ could be used by the filter mechanism or by static analysis tools. The current filter API is designed to accommodate such future additions without requiring changes to the core language specification. +C API for lazy imports +----------------------- + +No dedicated C API is planned for creating or resolving lazy imports. This +feature is designed as a purely Python-facing mechanism, as C extensions +typically need immediate access to modules and cannot benefit from deferred +loading. Existing C API functions like ``PyImport_ImportModule()`` remain +unchanged and continue to perform eager imports. If compelling use cases emerge, +this could be revisited in future versions. + Alternate Implementation Ideas ==============================