doc: require sphinx 5

Fix #9836.
This commit is contained in:
Ran Benita 2022-08-13 12:35:07 +03:00
parent c72d202317
commit cb7f5ed3b1
5 changed files with 9 additions and 13 deletions

View File

@ -162,11 +162,11 @@ linkcheck_workers = 5
_repo = "https://github.com/pytest-dev/pytest" _repo = "https://github.com/pytest-dev/pytest"
extlinks = { extlinks = {
"bpo": ("https://bugs.python.org/issue%s", "bpo-"), "bpo": ("https://bugs.python.org/issue%s", "bpo-%s"),
"pypi": ("https://pypi.org/project/%s/", ""), "pypi": ("https://pypi.org/project/%s/", "%s"),
"issue": (f"{_repo}/issues/%s", "issue #"), "issue": (f"{_repo}/issues/%s", "issue #%s"),
"pull": (f"{_repo}/pull/%s", "pull request #"), "pull": (f"{_repo}/pull/%s", "pull request #%s"),
"user": ("https://github.com/%s", "@"), "user": ("https://github.com/%s", "@%s"),
} }
@ -419,8 +419,6 @@ def configure_logging(app: "sphinx.application.Sphinx") -> None:
def setup(app: "sphinx.application.Sphinx") -> None: def setup(app: "sphinx.application.Sphinx") -> None:
# from sphinx.ext.autodoc import cut_lines
# app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))
app.add_crossref_type( app.add_crossref_type(
"fixture", "fixture",
"fixture", "fixture",

View File

@ -90,7 +90,7 @@ and can also be used to hold pytest configuration if they have a ``[pytest]`` se
setup.cfg setup.cfg
~~~~~~~~~ ~~~~~~~~~
``setup.cfg`` files are general purpose configuration files, used originally by :doc:`distutils <distutils/configfile>`, and can also be used to hold pytest configuration ``setup.cfg`` files are general purpose configuration files, used originally by :doc:`distutils <python:distutils/configfile>`, and can also be used to hold pytest configuration
if they have a ``[tool:pytest]`` section. if they have a ``[tool:pytest]`` section.
.. code-block:: ini .. code-block:: ini

View File

@ -529,6 +529,7 @@ New code should avoid using :fixture:`testdir` in favor of :fixture:`pytester`.
.. autoclass:: pytest.Testdir() .. autoclass:: pytest.Testdir()
:members: :members:
:noindex: TimeoutExpired
.. fixture:: recwarn .. fixture:: recwarn

View File

@ -2,9 +2,6 @@ pallets-sphinx-themes
pluggy>=1.0 pluggy>=1.0
pygments-pytest>=2.2.0 pygments-pytest>=2.2.0
sphinx-removed-in>=0.2.0 sphinx-removed-in>=0.2.0
sphinx>=3.1,<4 sphinx>=5,<6
sphinxcontrib-trio sphinxcontrib-trio
sphinxcontrib-svg2pdfconverter sphinxcontrib-svg2pdfconverter
# XXX: sphinx<4 is broken with latest jinja2
jinja2<3.1

View File

@ -521,7 +521,7 @@ def approx(expected, rel=None, abs=None, nan_ok: bool = False) -> ApproxBase:
"""Assert that two numbers (or two ordered sequences of numbers) are equal to each other """Assert that two numbers (or two ordered sequences of numbers) are equal to each other
within some tolerance. within some tolerance.
Due to the :std:doc:`tutorial/floatingpoint`, numbers that we Due to the :doc:`python:tutorial/floatingpoint`, numbers that we
would intuitively expect to be equal are not always so:: would intuitively expect to be equal are not always so::
>>> 0.1 + 0.2 == 0.3 >>> 0.1 + 0.2 == 0.3