gh-131885: Clarify lazy import filters have positional-only parameters#144856
gh-131885: Clarify lazy import filters have positional-only parameters#144856johnslavik wants to merge 4 commits into
Conversation
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @AA-Turner: please review the changes made to this pull request. |
|
@AA-Turner :-) |
|
@AA-Turner (If you can't look into this I'll appreciate if you just tell! Thanks!) |
|
This PR is stale because it has been open for 30 days with no activity. |
|
@AA-Turner :-) |
|
I'm requesting a review from @encukou as Adam is unavailable. |
Documentation build overview
440 files changed ·
|
encukou
left a comment
There was a problem hiding this comment.
Asking for review is asking for nitpicks, right?
Please click "update branch" or do git merge main (depending on your workflow) to get the tools the current CI needs.
|
|
||
| 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 has the following |
There was a problem hiding this comment.
It must accept 3 positional arguments. The exact signature is not a hard requirement.
| determine whether it should actually be lazy. It has the following | |
| determine whether it should actually be lazy. It should have the following |
| def filter(importing_module: str, imported_module: str, | ||
| fromlist: tuple[str, ...] | None) -> bool | ||
|
|
||
| Where: |
There was a problem hiding this comment.
You can put the info here, rather than in an extra paragraph:
| The function is called with three positional arguments: |
Failing example:
*and/as needed #131885📚 Documentation preview 📚: https://cpython-previews--144856.org.readthedocs.build/