forked from quantumlib/Cirq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deprecated_submodule conflict with importlib_metadata (quantumlib…
…#4772) Stop replacing the entire `sys.meta_path` on every use of `deprecated_submodule` as this may result in multiple-wrap of standard module finders and finders defined by others. Add a new finder for our renamed module instead, and use a standard import mechanism to find it under the new module name. Remove `find_distributions()` and `invalidate_caches()` methods from DeprecatedModuleFinder, it should be sufficient to only handle these with standard finders and the new module name. Add test for the conflict with importlib_metadata.distributions() reported in quantumlib#4729. This fixes quantumlib#4729.
- Loading branch information
1 parent
e75bcb5
commit 5e1feef
Showing
2 changed files
with
28 additions
and
143 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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