Commit Graph

4 Commits

Author SHA1 Message Date
Takeshi KOMIYA
eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Takeshi KOMIYA
59336da8bd Fix #6709: autodoc: mock object does not work as a class decorator 2019-10-06 23:31:07 +09:00
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