Skip to content

Invalidate stale submodules when switching local registry roots - #154

Open
AryanRG wants to merge 1 commit into
optuna:mainfrom
AryanRG:fix/local-registry-module-cache
Open

AryanRG wants to merge 1 commit into
optuna:mainfrom
AryanRG:fix/local-registry-module-cache

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 23, 2026

Copy link
Copy Markdown

Motivation

Loading the same package from a different local registry root can return values from the first root, even though the new module's __file__ points to the second.

Description of the changes

Clear the package's cached descendant modules when its source path changes. Keep same-root caching unchanged. Add regression tests for flat and nested package paths.

Validation: the default local test command, lint, configured typing, documentation build and package checks pass. The API-token test remains excluded by the repository default; external link checking was interrupted by GitHub rate limiting.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant