Skip to content

Add additional test coverage for lazy imports #150565

@brittanyrey

Description

@brittanyrey

We have a bunch of lazy imports tests in facebookincubator/cinder that we've carried for the PEP 690 implementation. I've identified a gap between the Cinder lazy imports test suite and the tests we added for PEP 810. I'd like to port some of those tests over to increase coverage.

Specific coverage areas to tackle:

  • Dict operations with lazy values (copy, |, update, values/items)
  • Attribute side effects (submodule imports don't overwrite parent attrs)
  • Module/variable name collisions (submodule vs variable ordering)
  • Deleted module reimport (sys.modules deletion and reimport)
  • Circular import resolution (lazy imports breaking circular deadlocks)
  • Custom __import__ via exec with lazy imports
  • Dict mutation during module loading

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions