Repository navigation
lazy imports allow lazy import math.pi #155194
Copy link
Copy link
Closed
Labels
3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)release-blockertopic-lazy-importstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Aug 4, 2026 - addedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixes
on Aug 5, 2026 Hugo said:
Yes, let's fix this for rc2, and do it in
mainfirst.I'll mark this as a release blocker for visibility.
Reacted by Dino Viehland and Terry Jan Reedy- added a commit that references this issue
on Aug 14, 2026 Thank you for the fix!
- moved this from Todo to Done in Release and Deferred blockers 🚫
on Aug 21, 2026 - added 2 commits that reference this issue
on Sep 18, 2026 - marked
test_concurrent_lazy_import_reificationis flaky #154561 as a duplicate of this issueon Sep 18, 2026
Metadata
Metadata
Assignees
Labels
3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)release-blockertopic-lazy-importstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
Bug report
Bug description:
as reported: https://discuss.python.org/t/sys-lazy-modules-clarification/108385
This is a big difference in that we allow these in lazy imports but not normal imports. It's also due to just a bunch of extra unnecessary logic. Fixing this now seems like it'd be better than letting people start doing this.
CPython versions tested on:
3.15
Operating systems tested on:
Linux
Linked PRs