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 | |
parent | 5d0c455a686218696ea44d1bafbdd9ac8c2be5bf (diff) | |
download | requests-cache-c00776b53ca7556b27d64f088ee0f07bce6eabc5.tar.gz |
Add another monkey-patch for sphinx-automodapi instead of installing from git URL
-rw-r--r-- | docs/conf.py | 9 | ||||
-rw-r--r-- | poetry.lock | 27 | ||||
-rw-r--r-- | pyproject.toml | 2 | ||||
-rw-r--r-- | requests_cache/backends/mongodb.py | 2 |
4 files changed, 22 insertions, 18 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) diff --git a/poetry.lock b/poetry.lock index 571f3b1..694bf44 100644 --- a/poetry.lock +++ b/poetry.lock @@ -183,15 +183,18 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "colorlog" -version = "5.0.1" +version = "6.4.1" description = "Add colours to the output of Python's logging module." category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} +[package.extras] +development = ["black", "flake8", "mypy", "pytest", "types-colorama"] + [[package]] name = "commonmark" version = "0.9.1" @@ -928,12 +931,11 @@ type_comments = ["typed-ast (>=1.4.0)"] [[package]] name = "sphinx-automodapi" -version = "0.14.dev0" +version = "0.13" description = "Sphinx extension for auto-generating API documentation for entire modules" category = "main" optional = true python-versions = ">=3.6" -develop = false [package.dependencies] sphinx = ">=1.7" @@ -941,12 +943,6 @@ sphinx = ">=1.7" [package.extras] test = ["pytest", "pytest-cov", "cython", "codecov", "coverage (<5.0)"] -[package.source] -type = "git" -url = "https://github.com/astropy/sphinx-automodapi.git" -reference = "main" -resolved_reference = "39609d0d712447c91ffd1809150ed71ff4ed0099" - [[package]] name = "sphinx-copybutton" version = "0.4.0" @@ -1197,7 +1193,7 @@ yaml = [] [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "cbefc1a12aa9008ac7b344c9cd9d111fc6a9118befa10b2ddb53c4e288eeb60b" +content-hash = "46bca0a2cb8250f54d5e88e28858af7a53849755e332b6356be3f59586ab2127" [metadata.files] alabaster = [ @@ -1265,8 +1261,8 @@ colorama = [ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] colorlog = [ - {file = "colorlog-5.0.1-py2.py3-none-any.whl", hash = "sha256:4e6be13d9169254e2ded6526a6a4a1abb8ac564f2fa65b310a98e4ca5bea2c04"}, - {file = "colorlog-5.0.1.tar.gz", hash = "sha256:f17c013a06962b02f4449ee07cfdbe6b287df29efc2c9a1515b4a376f4e588ea"}, + {file = "colorlog-6.4.1-py2.py3-none-any.whl", hash = "sha256:b13da382156711f7973bf7cbd1f40ea544aff51fde5dc3fb8f3fa602c321d645"}, + {file = "colorlog-6.4.1.tar.gz", hash = "sha256:af99440154a01f27c09256760ea3477982bf782721feaa345904e806879df4d8"}, ] commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, @@ -1750,7 +1746,10 @@ sphinx-autodoc-typehints = [ {file = "sphinx-autodoc-typehints-1.12.0.tar.gz", hash = "sha256:193617d9dbe0847281b1399d369e74e34cd959c82e02c7efde077fca908a9f52"}, {file = "sphinx_autodoc_typehints-1.12.0-py3-none-any.whl", hash = "sha256:5e81776ec422dd168d688ab60f034fccfafbcd94329e9537712c93003bddc04a"}, ] -sphinx-automodapi = [] +sphinx-automodapi = [ + {file = "sphinx-automodapi-0.13.tar.gz", hash = "sha256:e1019336df7f7f0bcbf848eff7b84e7bef71691a57d8b5bda9107a2a046a226a"}, + {file = "sphinx_automodapi-0.13-py3-none-any.whl", hash = "sha256:f9ebc9c10597f3aab1d93e5a8b1829903eee7c64f5bafb0cf71fd40e5c7d95f0"}, +] sphinx-copybutton = [ {file = "sphinx-copybutton-0.4.0.tar.gz", hash = "sha256:8daed13a87afd5013c3a9af3575cc4d5bec052075ccd3db243f895c07a689386"}, {file = "sphinx_copybutton-0.4.0-py3-none-any.whl", hash = "sha256:4340d33c169dac6dd82dce2c83333412aa786a42dd01a81a8decac3b130dc8b0"}, diff --git a/pyproject.toml b/pyproject.toml index c756e05..713a837 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ linkify-it-py = {optional=true, version="^1.0.1"} myst-parser = {optional=true, version="^0.15.1"} sphinx = {optional=true, version="4.1.2"} sphinx-autodoc-typehints = {optional=true, version="^1.11"} -sphinx-automodapi = {optional=true, branch="main", git="https://github.com/astropy/sphinx-automodapi.git"} # Unreleased bugfixes +sphinx-automodapi = {optional=true, version="^0.13"} sphinx-copybutton = {optional=true, version=">=0.3,<0.5"} sphinx-inline-tabs = {optional=true, version="^2021.4.11-beta.9", python=">=3.8"} sphinxcontrib-apidoc = {optional=true, version="^0.3"} diff --git a/requests_cache/backends/mongodb.py b/requests_cache/backends/mongodb.py index 0edf754..2924f52 100644 --- a/requests_cache/backends/mongodb.py +++ b/requests_cache/backends/mongodb.py @@ -19,7 +19,7 @@ Or via :py:class:`.MongoCache`: API Reference ^^^^^^^^^^^^^ -.. automodsumm:: requests_cache.backends.mongo +.. automodsumm:: requests_cache.backends.mongodb :classes-only: :nosignatures: """ |