From 1da9ec64978938ee75ef34bb0d9b5a97753b18b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20S=C5=82awecki?= Date: Tue, 28 Jul 2026 11:14:51 +0200 Subject: [PATCH] gh-142349: Clarify lazy import filters have positional-only parameters (GH-144856) (cherry picked from commit 66eb823229edb7cff23fd0d52611d809aee57532) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartosz Sławecki --- Doc/library/sys.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index a22aac914cedfe..683912b9869acf 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1790,13 +1790,13 @@ always available. Unless explicitly noted otherwise, all variables are read-only callable or ``None`` to clear the filter. The filter function is called for every potentially lazy import to - determine whether it should actually be lazy. It must have the following + determine whether it should actually be lazy. It should have the following signature:: def filter(importing_module: str, imported_module: str, fromlist: tuple[str, ...] | None) -> bool - Where: + The function is called with three positional arguments: * *importing_module* is the name of the module doing the import * *imported_module* is the resolved name of the module being imported