From c00776b53ca7556b27d64f088ee0f07bce6eabc5 Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Mon, 23 Aug 2021 12:01:24 -0500 Subject: Add another monkey-patch for sphinx-automodapi instead of installing from git URL --- docs/conf.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'docs/conf.py') 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) -- cgit v1.2.1