FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

lazy imports allow `lazy import math.pi` · Issue #155194 · python/cpython · GitHub

Repository navigation

lazy imports allow lazy import math.pi #155194

Description

Bug report

Bug description:

lazy import math.pi
print(math.pi)

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

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Aug 4, 2026
  2. self-assigned this
    on Aug 4, 2026
  3. encukou commented on Aug 11, 2026

    Member

    Hugo said:

    Yes, let's fix this for rc2, and do it in main first.

    I'll mark this as a release blocker for visibility.

  4. added a commit that references this issue on Aug 14, 2026
  5. added a commit that references this issue on Aug 19, 2026
  6. encukou commented on Aug 21, 2026

    Member

    Thank you for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.15bugs and security fixes3.16new features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)release-blockertopic-lazy-importstype-bugAn unexpected behavior, bug, or error

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


Back | FazBrowse Home | New Git URL