Skip to content

Revamp sys.lazy_modules #148587

Closed
Closed

Activity

  1. pablogsal commented on Apr 25, 2026

    @pablogsal
    Member
  2. pablogsal commented on Apr 25, 2026

    @pablogsal
    Member

    expose an immutable snapshot instead of the live container.

    @pablogsal, does it have to be sys.lazy_modules "module-level property" or could it be a function like sys.get_lazy_modules()? Both preserve the concept, but the function fits more here I believe (snapshots should be lazy + open/close principle i.e. we can extend the function in the future to do more useful things in debugging if needed). My instinct is that it would be good to ship it before beta freeze.

    Perhaps we are overthinking it since I think we should preserve the simmetry with sys.modules and that's a dictionary.... 🤔

    @johnslavik what do you think?

  3. johnslavik commented on Apr 26, 2026

    @johnslavik
    MemberAuthor

    @pablogsal, fair enough -- simple is better than complex. I'll make a public module attribute exposing the frozendict of frozensets from the registry.

  4. pablogsal commented on May 4, 2026

    @pablogsal
    Member

    Marking as release blocker. We need to reach consensus on this before beta freeze @Yhg1s @DinoV

  5. Yhg1s commented on May 4, 2026

    @Yhg1s
    Member

    I don't have a strong opinion on this one. @DinoV and @brittanyrey may have practical experience to help them form opinions?

  6. added a commit that references this issue on May 4, 2026
  7. johnslavik commented on May 4, 2026

    @johnslavik
    MemberAuthor
  8. added 5 commits that reference this issue on May 5, 2026
  9. brittanyrey commented on May 5, 2026

    @brittanyrey
    Contributor

    I don't have a strong opinion on this one. @DinoV and @brittanyrey may have practical experience to help them form opinions?

    I'm pretty open on how we expose it, but I do think we should expose it.
    The idea of it being immutable makes sense to me--but if it's too much of a hassle right now maybe it's okay to expose it as a dict as we do with sys.modules.

  10. hugovk commented on May 7, 2026

    @hugovk
    Member

    This does not need to block beta 1, so moving to deferred-blocker. We can still fix this during the beta, and sooner is better than later, so please try to target b2.

  11. added a commit that references this issue on May 19, 2026
  12. johnslavik commented on May 19, 2026

    @johnslavik
    MemberAuthor

    I believe we should document this too.

  13. added a commit that references this issue on May 29, 2026
  14. added a commit that references this issue on Jun 2, 2026
  15. added a commit that references this issue on Jun 2, 2026
  16. added a commit that references this issue on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions