https://github.com/python/cpython/commit/3e670c3a35f74cbc3beda0cbb5dba332e562f43a commit: 3e670c3a35f74cbc3beda0cbb5dba332e562f43a branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: encukou <[email protected]> date: 2026-07-28T11:42:16+02:00 summary:
[3.15] gh-142349: Clarify lazy import filters have positional-only parameters (GH-144856) (GH-154808) (cherry picked from commit 66eb823229edb7cff23fd0d52611d809aee57532) Co-authored-by: Bartosz Sławecki <[email protected]> files: M Doc/library/sys.rst 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 _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
