python / python/cpython

Frozen `NamespaceLoader` is leaking into the source `_bootstrap_external` in the tests

Open
#92,265 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-importlib type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

Bug report

While implementing #92205 I ran into the issue of the source version of test_importlib.test_api.ReloadTests holding on to the frozen version of _bootstrap_external.

Your environment

  • CPython versions tested on: main
  • Operating system and architecture:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting test_importlib.test_api.ReloadTests and how it references the source _bootstrap_external and frozen NamespaceLoader. Trace the test setup to identify where the frozen module is retained; done means the source test implementation no longer holds that frozen version, with the relevant importlib tests passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.