diff options
author | Jordan Cook <jordan.cook@pioneer.com> | 2021-08-23 12:01:24 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2021-08-23 12:01:24 -0500 |
commit | c00776b53ca7556b27d64f088ee0f07bce6eabc5 (patch) | |
tree | e11e6f6907879d62a7f1198be766e39bdc2db469 /docs | |
parent | 5d0c455a686218696ea44d1bafbdd9ac8c2be5bf (diff) | |
download | requests-cache-c00776b53ca7556b27d64f088ee0f07bce6eabc5.tar.gz |
Add another monkey-patch for sphinx-automodapi instead of installing from git URL
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/conf.py b/docs/conf.py index 254196c..bcb4311 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,5 @@ # requests-cache documentation build configuration file +import logging import os import sys from os.path import abspath, dirname, join @@ -122,11 +123,15 @@ def setup(app): def patch_automodapi(app): - """Monkey-patch the automodapi extension to exclude imported members. - + """Monkey-patch the automodapi extension to exclude imported members: https://github.com/astropy/sphinx-automodapi/blob/master/sphinx_automodapi/automodsumm.py#L135 + + Also patches an unreleased fix for Sphinx 4 compatibility: + https://github.com/astropy/sphinx-automodapi/pull/129 """ from sphinx_automodapi import automodsumm + from sphinx_automodapi.automodsumm import Automodsumm from sphinx_automodapi.utils import find_mod_objs automodsumm.find_mod_objs = lambda *args: find_mod_objs(args[0], onlylocals=True) + Automodsumm.warn = lambda *args: logging.getLogger('sphinx_automodapi').warn(*args) |