Reloading a lazy module that has not yet been materailized should be no-op
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
Reloading a not-yet materialized lazy module is not supported well. It makes sense for the reloading in this case to be no-op since when the actual loading happens e.g. by accessing an attribute, the new code will be loaded anyway. Currently, the reload tries to reload the module while its loaded is lazy in the first place.
CPython versions tested on:
3.13, 3.12, 3.14, CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-139857
- gh-142649
- gh-143584
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked PRs gh-139857, gh-142649, and gh-143584 first, since they show the work already proposed for this behavior. Trace the reload path for a lazy module and verify that reloading before materialization is a no-op while later attribute access still loads the updated code; completion should include regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100