Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Append list of wrapped
finders
in sys.meta_path
with list of `non…
…-wrapped` finders (#4467) Readthedocs hasn't been able to build on libraries that import Cirq since fd257e6#r55422405. This is because Sphinx inserts a `MockFinder` to [sys.meta_path](https://github.com/sphinx-doc/sphinx/blob/f127a2ff5d6d86918a5d3ac975e8ab8a24c407d1/sphinx/ext/autodoc/mock.py#L148) but when Sphinx tries to remove the inserted `MockFinder` from said [path](https://github.com/sphinx-doc/sphinx/blob/f127a2ff5d6d86918a5d3ac975e8ab8a24c407d1/sphinx/ext/autodoc/mock.py#L151), the specific finder that Sphinx is looking for doesn't exist because Cirq wrapped it: https://github.com/quantumlib/Cirq/blob/58cda7a4f9718ef0bebd91950af192df8d47b0d6/cirq-core/cirq/_compat.py#L624 This change fixes the issue, but I don't know what consequences it has for other stuff. I'd be glad to hear better suggestions. If this looks good, we could do the same thing for [def wrap_module_executions](https://github.com/quantumlib/Cirq/blob/58cda7a4f9718ef0bebd91950af192df8d47b0d6/cirq-core/cirq/_import.py#L138) as well.
- Loading branch information
Showing
3 changed files
with
80 additions
and
2 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
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