Repository navigation
Conversation
Clear the cache of unmatched libraries, and the controller returned by get_cached_controller(), when a new controller is registered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Opened upstream as joblib#287. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since joblib#249,
_CDLLCacheremembers, for the lifetime of the process, every listed library that no controller matched.register()didn't clear that cache, so a library listed before the call was never matched by the new controller. On Linux every loaded.sois listed, so anyThreadpoolController()orthreadpool_info()call made beforeregister(), by any package, was enough to hide the library. The controller returned byget_cached_controller()(joblib#257) wasn't refreshed either.This PR clears both in
register(). Clearing only the unmatched entries would be enough, butregister()is rare, so clearing everything costs one extra scan.test_custom_controllerdidn't catch this becausetests/_pyMylibloads its library and registers the controller in the same import. The new test runs in a subprocess, so the registered controller doesn't leak into other tests. It is Linux-only because it matches glibc. It fails if either of the two lines is removed.This regression was never released, so there is no changelog entry.
🤖 Generated with Claude Code