Commit Graph

2 Commits

Author SHA1 Message Date
Jon Dufresne
ecb1e763ad Switch uses of __import__ to importlib.get_module()
The Python docs for __import__ recommend using importlib.get_module().

https://docs.python.org/3/library/functions.html#__import__

> Note: This is an advanced function that is not needed in everyday
> Python programming, unlike importlib.import_module().

As importlib.get_module() uses the Python module cache and returns the
module, this also allows simplifying many module cache checks of use of
sys.modules.

importlib.get_module() has been available since Python 3.3.
2019-08-17 11:45:39 -07:00
Takeshi KOMIYA
af51e9825a refactor: Move implementation of mock to sphinx.ext.autodoc.mock 2019-02-27 21:42:23 +09:00