diff --git a/tests/test_directive_/test_output_36_pypy_index_html_.html b/tests/test_directive_/test_output_36_pypy_index_html_.html
index 21c0519..45a4ba9 100644
--- a/tests/test_directive_/test_output_36_pypy_index_html_.html
+++ b/tests/test_directive_/test_output_36_pypy_index_html_.html
@@ -28,8 +28,8 @@
{% endif %}
-
+ {% if alabaster_version < (0, 7, 15) %}
+
{% endif %}
diff --git a/tox.ini b/tox.ini
index a762fd1..eb464ec 100644
--- a/tox.ini
+++ b/tox.ini
@@ -247,6 +247,8 @@ filterwarnings =
always:datetime.datetime.utcfromtimestamp\(\) is deprecated and scheduled for removal in a future version.:DeprecationWarning:sphinx.builders.gettext
always:The alias 'sphinx.util.SkipProgressMessage' is deprecated, use 'sphinx.util.display.SkipProgressMessage' instead:DeprecationWarning:sphinxcontrib.applehelp
always:The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead.:DeprecationWarning:sphinxcontrib.applehelp
+ always:The alias 'sphinx.util.typing.stringify' is deprecated, use 'sphinx.util.typing.stringify_annotation' instead. Check CHANGES for Sphinx API modifications.:DeprecationWarning
+
markers = sphinx
[testenv:py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}]
From 9c5587efbf8790976f36f4b035d106777db4bbb4 Mon Sep 17 00:00:00 2001
From: Dominic Davis-Foster
Date: Thu, 17 Oct 2024 15:30:40 +0100
Subject: [PATCH 51/69] Fix tests with newer alabaster versions. (part 2)
---
tests/test_directive_/test_output_310_index_html_.html | 4 ++--
tests/test_directive_/test_output_37_index_html_.html | 4 ++--
tests/test_directive_/test_output_37_pypy_index_html_.html | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/test_directive_/test_output_310_index_html_.html b/tests/test_directive_/test_output_310_index_html_.html
index 3d03bff..3189f29 100644
--- a/tests/test_directive_/test_output_310_index_html_.html
+++ b/tests/test_directive_/test_output_310_index_html_.html
@@ -30,8 +30,8 @@
{% if sphinx_version >= (5, 2) %}
{% endif %}
-
+ {% endif %}{% if alabaster_version < (0, 7, 15) %}
+ {% endif %}
diff --git a/tests/test_directive_/test_output_37_index_html_.html b/tests/test_directive_/test_output_37_index_html_.html
index 55f6a1d..6f41498 100644
--- a/tests/test_directive_/test_output_37_index_html_.html
+++ b/tests/test_directive_/test_output_37_index_html_.html
@@ -30,8 +30,8 @@
{% if sphinx_version >= (5, 2) %}
{% endif %}
-
+ {% endif %}{% if alabaster_version < (0, 7, 15) %}
+
{% endif %}
diff --git a/tests/test_directive_/test_output_37_pypy_index_html_.html b/tests/test_directive_/test_output_37_pypy_index_html_.html
index 7b9fbd7..66a4e10 100644
--- a/tests/test_directive_/test_output_37_pypy_index_html_.html
+++ b/tests/test_directive_/test_output_37_pypy_index_html_.html
@@ -30,8 +30,8 @@
{% if sphinx_version >= (5, 2) %}
{% endif %}
-
+ {% endif %}{% if alabaster_version < (0, 7, 15) %}
+
{% endif %}
From 8702bf92be7064350b8f88344367d30bb8d2f0f8 Mon Sep 17 00:00:00 2001
From: Dominic Davis-Foster
Date: Thu, 13 Feb 2025 11:36:23 +0000
Subject: [PATCH 52/69] Update for latest beautifulsoup
---
tests/test_directive.py | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/tests/test_directive.py b/tests/test_directive.py
index ee2c102..800f80f 100644
--- a/tests/test_directive.py
+++ b/tests/test_directive.py
@@ -1,11 +1,11 @@
# stdlib
import os
from pathlib import Path
-from typing import Any, Iterator, Tuple, no_type_check
+from typing import Any, Iterator, Tuple, Union, cast, no_type_check
# 3rd party
import pytest
-from bs4 import BeautifulSoup, element # type: ignore[import]
+from bs4 import BeautifulSoup, NavigableString, PageElement, Tag, element
from coincidence import max_version, min_version, not_pypy, only_pypy, only_version
from domdf_python_tools.paths import PathPlus
from sphinx.application import Sphinx
@@ -84,21 +84,23 @@ def test_output(
version: str,
) -> None:
- code: element.Tag
+ code: Union[PageElement, Tag, NavigableString]
for code in page.find_all("code", attrs={"class": "sig-prename descclassname"}):
-
+ assert isinstance(code, Tag)
first_child = code.contents[0]
if isinstance(first_child, element.Tag):
code.contents = [first_child.contents[0]]
for code in page.find_all("code", attrs={"class": "sig-name descname"}):
+ assert isinstance(code, Tag)
first_child = code.contents[0]
if isinstance(first_child, element.Tag):
code.contents = [first_child.contents[0]]
- for div in page.findAll("script"):
+ for div in page.find_all("script"):
+ assert isinstance(div, Tag)
if div.get("src"):
- div["src"] = div["src"].split("?v=")[0]
+ div["src"] = cast(str, div["src"]).split("?v=")[0]
print(div["src"])
html_regression.check(page, jinja2=True, jinja2_namespace={"alabaster_version": _get_alabaster_version()})
From cde42959e9ed6e5acdd87f2171e68f71d6e40117 Mon Sep 17 00:00:00 2001
From: Dominic Davis-Foster
Date: Thu, 13 Feb 2025 11:39:01 +0000
Subject: [PATCH 53/69] Lint
---
tests/myproject.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/myproject.py b/tests/myproject.py
index 9d917a4..d1ae879 100644
--- a/tests/myproject.py
+++ b/tests/myproject.py
@@ -18,9 +18,9 @@ class A:
__all__.append('A')
-def foo():
+def foo() -> Callable:
- def bar():
+ def bar(): # noqa: MAN002
"""
A locally defined function.
"""
@@ -32,7 +32,7 @@ def bar():
# fizbuzz = foo()
-def create_fizbuzz():
+def create_fizbuzz(): # noqa: MAN002
# Based on the dataclass module from CPython
locals = {"BUILTINS": builtins} # noqa: A001 # pylint: disable=redefined-builtin
local_vars = ", ".join(locals.keys())
From 7328768b5c8a86a2f3bf11b90ffd94164bed68be Mon Sep 17 00:00:00 2001
From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com>
Date: Thu, 13 Feb 2025 13:32:53 +0000
Subject: [PATCH 54/69] Updated files with 'repo_helper'. (#76)
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
---
.pre-commit-config.yaml | 2 +-
README.rst | 2 +-
doc-source/index.rst | 2 +-
tox.ini | 3 ++-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index f32ee0c..d1e334a 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -81,7 +81,7 @@ repos:
- id: snippet-fmt
- repo: https://github.com/python-formate/formate
- rev: v0.7.0
+ rev: v0.8.0
hooks:
- id: formate
exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$
diff --git a/README.rst b/README.rst
index ff8bcc6..8d9a01c 100644
--- a/README.rst
+++ b/README.rst
@@ -114,7 +114,7 @@ and `the documentation for coincidence`_ for an example with the ReadTheDocs the
:target: https://github.com/sphinx-toolbox/sphinx-autofixture/commit/master
:alt: GitHub last commit
-.. |maintained| image:: https://img.shields.io/maintenance/yes/2024
+.. |maintained| image:: https://img.shields.io/maintenance/yes/2025
:alt: Maintenance
.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/sphinx-autofixture
diff --git a/doc-source/index.rst b/doc-source/index.rst
index 3a2dca0..db351b2 100644
--- a/doc-source/index.rst
+++ b/doc-source/index.rst
@@ -114,7 +114,7 @@ sphinx-autofixture
:last-commit:
:alt: GitHub last commit
- .. |maintained| maintained-shield:: 2024
+ .. |maintained| maintained-shield:: 2025
:alt: Maintenance
.. |pypi-downloads| pypi-shield::
diff --git a/tox.ini b/tox.ini
index eb464ec..c7921ca 100644
--- a/tox.ini
+++ b/tox.ini
@@ -248,15 +248,16 @@ filterwarnings =
always:The alias 'sphinx.util.SkipProgressMessage' is deprecated, use 'sphinx.util.display.SkipProgressMessage' instead:DeprecationWarning:sphinxcontrib.applehelp
always:The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead.:DeprecationWarning:sphinxcontrib.applehelp
always:The alias 'sphinx.util.typing.stringify' is deprecated, use 'sphinx.util.typing.stringify_annotation' instead. Check CHANGES for Sphinx API modifications.:DeprecationWarning
-
markers = sphinx
[testenv:py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}]
+download = True
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
[testenv:py313-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}]
+download = True
setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
From 722ba85c0a28282387b804a4b3da9811214254e8 Mon Sep 17 00:00:00 2001
From: Dominic Davis-Foster
Date: Mon, 7 Apr 2025 14:58:27 +0100
Subject: [PATCH 55/69] Drop support for Python 3.6
---
.github/workflows/python_ci.yml | 6 ++---
.github/workflows/python_ci_linux.yml | 6 ++---
.github/workflows/python_ci_macos.yml | 5 ++--
pyproject.toml | 2 +-
repo_helper.yml | 34 +--------------------------
tox.ini | 19 ++++++++-------
6 files changed, 19 insertions(+), 53 deletions(-)
diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml
index 1dac6be..02c0976 100644
--- a/.github/workflows/python_ci.yml
+++ b/.github/workflows/python_ci.yml
@@ -22,21 +22,19 @@ jobs:
runs-on: "windows-2019"
continue-on-error: ${{ matrix.config.experimental }}
env:
- USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.6,pypy-3.7,pypy-3.8,pypy-3.9'
+ USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.7,pypy-3.8,pypy-3.9'
strategy:
fail-fast: False
matrix:
config:
- - {python-version: "3.6", testenvs: "py36-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5},build", experimental: False}
- {python-version: "3.7", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.11", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.12", testenvs: "py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.13", testenvs: "py313-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
- - {python-version: "pypy-3.6", testenvs: "pypy36-sphinx{3.2,3.3,3.4,3.5}", experimental: False}
+ - {python-version: "3.13", testenvs: "py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "pypy-3.9-v7.3.15", testenvs: "pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml
index c494ee7..7091b90 100644
--- a/.github/workflows/python_ci_linux.yml
+++ b/.github/workflows/python_ci_linux.yml
@@ -23,21 +23,19 @@ jobs:
runs-on: "ubuntu-20.04"
continue-on-error: ${{ matrix.config.experimental }}
env:
- USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.6,pypy-3.7,pypy-3.8,pypy-3.9'
+ USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.7,pypy-3.8,pypy-3.9'
strategy:
fail-fast: False
matrix:
config:
- - {python-version: "3.6", testenvs: "py36-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5},build", experimental: False}
- {python-version: "3.7", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.11", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.12", testenvs: "py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.13", testenvs: "py313-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
- - {python-version: "pypy-3.6", testenvs: "pypy36-sphinx{3.2,3.3,3.4,3.5},build", experimental: False}
+ - {python-version: "3.13", testenvs: "py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "pypy-3.9", testenvs: "pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml
index 286899a..946cdb1 100644
--- a/.github/workflows/python_ci_macos.yml
+++ b/.github/workflows/python_ci_macos.yml
@@ -22,20 +22,19 @@ jobs:
runs-on: "macos-13"
continue-on-error: ${{ matrix.config.experimental }}
env:
- USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.7,pypy-3.8,pypy-3.9'
+ USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.7,pypy-3.8,pypy-3.9'
strategy:
fail-fast: False
matrix:
config:
- - {python-version: "3.6", testenvs: "py36-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5},build", experimental: False}
- {python-version: "3.7", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.11", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "3.12", testenvs: "py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.13", testenvs: "py313-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
+ - {python-version: "3.13", testenvs: "py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- {python-version: "pypy-3.9", testenvs: "pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
diff --git a/pyproject.toml b/pyproject.toml
index 8c05557..0b2ceab 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -34,7 +34,7 @@ base-classifiers = [
"Topic :: Software Development :: Documentation",
"Typing :: Typed",
]
-python-versions = [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12",]
+python-versions = [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13",]
python-implementations = [ "CPython", "PyPy",]
platforms = [ "Windows", "macOS", "Linux",]
license-key = "MIT"
diff --git a/repo_helper.yml b/repo_helper.yml
index 6c2a1c3..71318c8 100644
--- a/repo_helper.yml
+++ b/repo_helper.yml
@@ -18,19 +18,6 @@ min_coverage: 95
# Versions to run tests for
python_versions:
- '3.6':
- matrix_exclude:
- sphinx:
- - 5.0
- - 5.1
- - 5.2
- - 5.3
- - 6.0
- - 6.1
- - 6.2
- - 7.0
- - 7.1
- - 7.2
'3.7':
matrix_exclude:
sphinx:
@@ -48,26 +35,7 @@ python_versions:
'3.10':
"3.11":
"3.12":
- 3.13-dev:
- pypy36:
- matrix_exclude:
- sphinx:
- - 4.0
- - 4.1
- - 4.2
- - 4.3
- - 4.4
- - 4.5
- - 5.0
- - 5.1
- - 5.2
- - 5.3
- - 6.0
- - 6.1
- - 6.2
- - 7.0
- - 7.1
- - 7.2
+ 3.13:
pypy37:
matrix_exclude:
sphinx:
diff --git a/tox.ini b/tox.ini
index c7921ca..7f28fd6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -22,15 +22,13 @@
[tox]
envlist =
- py36-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5}
py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3}
py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
- py313-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
- pypy36-sphinx{3.2,3.3,3.4,3.5}
+ py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3}
pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
@@ -46,15 +44,13 @@ requires =
[envlists]
test =
- py36-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5}
py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3}
py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
- py313-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
- pypy36-sphinx{3.2,3.3,3.4,3.5}
+ py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3}
pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}
@@ -66,7 +62,7 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
-[testenv:py313-dev]
+[testenv:py313]
download = True
setenv =
PYTHONDEVMODE=1
@@ -199,7 +195,7 @@ inline-quotes = "
multiline-quotes = """
docstring-quotes = """
count = True
-min_python_version = 3.6.1
+min_python_version = 3.7
unused-arguments-ignore-abstract-functions = True
unused-arguments-ignore-overload-functions = True
unused-arguments-ignore-magic-methods = True
@@ -256,6 +252,13 @@ setenv =
PYTHONDEVMODE=1
PIP_DISABLE_PIP_VERSION_CHECK=1
+[testenv:py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}]
+download = True
+setenv =
+ PYTHONDEVMODE=1
+ PIP_DISABLE_PIP_VERSION_CHECK=1
+ UNSAFE_PYO3_SKIP_VERSION_CHECK=1
+
[testenv:py313-dev-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1}]
download = True
setenv =
From 0e2c21001f109ff40370bbc02b8ee46c9d908cc6 Mon Sep 17 00:00:00 2001
From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com>
Date: Tue, 8 Apr 2025 10:10:34 +0100
Subject: [PATCH 56/69] Bump Ubuntu to 22.04 (#78)
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
---
.github/workflows/mypy.yml | 2 +-
.github/workflows/python_ci_linux.yml | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml
index 10c6f30..bd74787 100644
--- a/.github/workflows/mypy.yml
+++ b/.github/workflows/mypy.yml
@@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
- os: ['ubuntu-20.04', 'windows-2019']
+ os: ['ubuntu-22.04', 'windows-2019']
fail-fast: false
steps:
diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml
index 7091b90..7b4980e 100644
--- a/.github/workflows/python_ci_linux.yml
+++ b/.github/workflows/python_ci_linux.yml
@@ -19,8 +19,8 @@ permissions:
jobs:
tests:
- name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}"
- runs-on: "ubuntu-20.04"
+ name: "ubuntu-22.04 / Python ${{ matrix.config.python-version }}"
+ runs-on: "ubuntu-22.04"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.7,pypy-3.8,pypy-3.9'
@@ -84,7 +84,7 @@ jobs:
Coverage:
needs: tests
- runs-on: "ubuntu-20.04"
+ runs-on: "ubuntu-22.04"
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
@@ -133,7 +133,7 @@ jobs:
Deploy:
needs: tests
- runs-on: "ubuntu-20.04"
+ runs-on: "ubuntu-22.04"
steps:
- name: Checkout 🛎️
uses: "actions/checkout@v4"
From bda1c5f2cbd87fc2f7d37380e8df99acd1edbb33 Mon Sep 17 00:00:00 2001
From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com>
Date: Wed, 9 Apr 2025 15:14:36 +0100
Subject: [PATCH 57/69] Run Flake8 CI on Ubuntu 22.04 (#80)
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
---
.github/workflows/flake8.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml
index 0a8c0c3..af1b394 100644
--- a/.github/workflows/flake8.yml
+++ b/.github/workflows/flake8.yml
@@ -16,7 +16,7 @@ permissions:
jobs:
Run:
name: "Flake8"
- runs-on: "ubuntu-20.04"
+ runs-on: "ubuntu-22.04"
steps:
- name: Checkout 🛎️
From 71f70f387a5aca2b2cd9e97b54687529d9953acd Mon Sep 17 00:00:00 2001
From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com>
Date: Fri, 18 Apr 2025 09:36:37 +0100
Subject: [PATCH 58/69] [repo-helper] Configuration Update (#81)
* Updated files with 'repo_helper'.
* Updated files with 'repo_helper'.
---------
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
---
.github/workflows/python_ci_macos.yml | 24 ++++++++++++------------
.readthedocs.yml | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml
index 946cdb1..48d8efa 100644
--- a/.github/workflows/python_ci_macos.yml
+++ b/.github/workflows/python_ci_macos.yml
@@ -18,8 +18,8 @@ permissions:
jobs:
tests:
- name: "macos-13 / Python ${{ matrix.config.python-version }}"
- runs-on: "macos-13"
+ name: "macos-${{ matrix.config.os-ver }} / Python ${{ matrix.config.python-version }}"
+ runs-on: "macos-${{ matrix.config.os-ver }}"
continue-on-error: ${{ matrix.config.experimental }}
env:
USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.7,pypy-3.8,pypy-3.9'
@@ -28,16 +28,16 @@ jobs:
fail-fast: False
matrix:
config:
- - {python-version: "3.7", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- - {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.11", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.12", testenvs: "py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.13", testenvs: "py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- - {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "pypy-3.9", testenvs: "pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
+ - {python-version: "3.7", os-ver: "13", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
+ - {python-version: "3.8", os-ver: "14", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
+ - {python-version: "3.9", os-ver: "14", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
+ - {python-version: "3.10", os-ver: "14", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
+ - {python-version: "3.11", os-ver: "14", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
+ - {python-version: "3.12", os-ver: "14", testenvs: "py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
+ - {python-version: "3.13", os-ver: "14", testenvs: "py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
+ - {python-version: "pypy-3.7", os-ver: "13", testenvs: "pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
+ - {python-version: "pypy-3.8", os-ver: "14", testenvs: "pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
+ - {python-version: "pypy-3.9", os-ver: "14", testenvs: "pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
steps:
- name: Checkout 🛎️
diff --git a/.readthedocs.yml b/.readthedocs.yml
index e928b70..83fc025 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -13,7 +13,7 @@ python:
- requirements: requirements.txt
- requirements: doc-source/requirements.txt
build:
- os: ubuntu-20.04
+ os: ubuntu-22.04
tools:
python: '3.9'
jobs:
From 6f6ac5bd247cbff467d47fb021421e8257fb7b19 Mon Sep 17 00:00:00 2001
From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com>
Date: Thu, 8 May 2025 21:42:24 +0100
Subject: [PATCH 59/69] Updated files with 'repo_helper'. (#82)
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
---
.github/workflows/python_ci.yml | 1 +
.github/workflows/python_ci_linux.yml | 3 +++
.github/workflows/python_ci_macos.yml | 1 +
.pre-commit-config.yaml | 2 +-
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml
index 02c0976..ef52f48 100644
--- a/.github/workflows/python_ci.yml
+++ b/.github/workflows/python_ci.yml
@@ -78,3 +78,4 @@ jobs:
with:
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage
+ include-hidden-files: true
diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml
index 7b4980e..c6883d3 100644
--- a/.github/workflows/python_ci_linux.yml
+++ b/.github/workflows/python_ci_linux.yml
@@ -80,6 +80,7 @@ jobs:
with:
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage
+ include-hidden-files: true
Coverage:
@@ -122,6 +123,7 @@ jobs:
with:
name: "combined-coverage"
path: .coverage
+ include-hidden-files: true
- name: "Upload Combined Coverage to Coveralls"
if: ${{ steps.show.outcome != 'failure' }}
@@ -207,6 +209,7 @@ jobs:
$CONDA/bin/conda config --set always_yes yes --set changeps1 no
$CONDA/bin/conda update -n base conda
$CONDA/bin/conda info -a
+ $CONDA/bin/conda install conda-forge::py-lief=0.14.1
$CONDA/bin/conda config --add channels conda-forge
$CONDA/bin/conda config --add channels domdfcoding
diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml
index 48d8efa..547e8c5 100644
--- a/.github/workflows/python_ci_macos.yml
+++ b/.github/workflows/python_ci_macos.yml
@@ -78,3 +78,4 @@ jobs:
with:
name: "coverage-${{ matrix.config.python-version }}"
path: .coverage
+ include-hidden-files: true
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d1e334a..3f31ad0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -8,7 +8,7 @@ ci:
repos:
- repo: https://github.com/repo-helper/pyproject-parser
- rev: v0.11.1
+ rev: v0.13.0
hooks:
- id: reformat-pyproject
From f48b60065fe6b27c09d89592556b7fe8d2212042 Mon Sep 17 00:00:00 2001
From: Dominic Davis-Foster
Date: Wed, 4 Jun 2025 15:13:38 +0100
Subject: [PATCH 60/69] Remove old Python 3.6 reference output.
---
.../test_output_36_index_html_.html | 208 ------------------
.../test_output_36_pypy_index_html_.html | 208 ------------------
2 files changed, 416 deletions(-)
delete mode 100644 tests/test_directive_/test_output_36_index_html_.html
delete mode 100644 tests/test_directive_/test_output_36_pypy_index_html_.html
diff --git a/tests/test_directive_/test_output_36_index_html_.html b/tests/test_directive_/test_output_36_index_html_.html
deleted file mode 100644
index 165af58..0000000
--- a/tests/test_directive_/test_output_36_index_html_.html
+++ /dev/null
@@ -1,208 +0,0 @@
-{% macro span_pre(text, indent='', min_version=(3, 5)) -%}
-{% if sphinx_version >= min_version %}
-{{ indent }} {{ text }}
-{{ indent }}{% else %}{{ text }}{% endif %}
-{%- endmacro -%}
-{% set heading = ("heading" if sphinx_version >= (5, 0) else 'headline') -%}
-{% set sig_prename_tag=("span" if sphinx_version >= (4, 0) else 'code') -%}
-{% set sig_object_class=(' class="sig sig-object py"' if sphinx_version >= (4, 0) else '') -%}
-{% set section = ("section", "section") if docutils_version >= (0, 17) else ('div class="section"', "div") -%}
-
-= (5, 0) %} lang="en"{% endif %}>
-
-
-
- {% if docutils_version[1] == 18 %}
- {% elif docutils_version[1] == 17 %}
- {% elif docutils_version[1] == 19 %}
- {% elif docutils_version[1] == 20 %}
- {% endif %}
- sphinx-autofixture Demo — Python documentation
-
-
-
- {% if sphinx_version >= (5, 0) %}
- {% endif %}
- {% if alabaster_version < (0, 7, 15) %}
- {% endif %}
-
-
-
-
-
-
- <{% if docutils_version >= (0, 17) %}section{% else %}div class="section"{% endif %} id="sphinx-autofixture-demo">
-
- sphinx-autofixture Demo
-
-
-
- -
-
- {{ span_pre("fixture", " ", (3, 5)) }}
-
- <{{ sig_prename_tag }} class="sig-prename descclassname">
- {{ span_pre("coincidence.fixtures.", " ") }}
- {{ sig_prename_tag }}>
- <{{ sig_prename_tag }} class="sig-name descname">
- {{ span_pre("tmp_pathplus", " ") }}
- {{ sig_prename_tag }}>
-
-
- -
-
-
- Scope:
-
- function
-
-
- Pytest fixture which returns a temporary directory in the form of a
-
-
- PathPlus
-
-
- object.
-
-
- The directory is unique to each test function invocation,
-created as a sub directory of the base temporary directory.
-
-
- Use it as follows:
-
-
-
-
pytest_plugins = ("coincidence", )
-
-def test_something(tmp_pathplus: PathPlus):
- assert True
-
-
-
-
-
-
-
-
-
- coincidence.fixtures.tmp_pathplus
-
-
-
-
-
- -
-
- {{ span_pre("fixture", " ", (3, 5)) }}
-
- <{{ sig_prename_tag }} class="sig-prename descclassname">
- {{ span_pre("coincidence.fixtures.", " ") }}
- {{ sig_prename_tag }}>
- <{{ sig_prename_tag }} class="sig-name descname">
- {{ span_pre("tmp_pathplus", " ") }}
- {{ sig_prename_tag }}>
-
- -
-
-
- Scope:
-
- function
-
-
- Pytest fixture which returns a temporary directory in the form of a
-
-
- PathPlus
-
-
- object.
-
-
- The directory is unique to each test function invocation,
-created as a sub directory of the base temporary directory.
-
-
- Use it as follows:
-
-
-
-
pytest_plugins = ("coincidence", )
-
-def test_something(tmp_pathplus: PathPlus):
- assert True
-
-
-
-
-
-
-
-
- -
- <{{ sig_prename_tag }} class="sig-prename descclassname">
- {{ span_pre("tests.myproject.", " ") }}
- {{ sig_prename_tag }}>
- <{{ sig_prename_tag }} class="sig-name descname">
- {{ span_pre("baz", " ") }}
- {{ sig_prename_tag }}>
-
- (
-
-
- )
-
-
-
- -
-
- A locally defined function.
-
-
-
-
- -
- <{{ sig_prename_tag }} class="sig-prename descclassname">
- {{ span_pre("tests.myproject.", " ") }}
- {{ sig_prename_tag }}>
- <{{ sig_prename_tag }} class="sig-name descname">
- {{ span_pre("fizbuzz", " ") }}
- {{ sig_prename_tag }}>
-
- (
-
-
- )
-
-
-
- -
-
- A locally defined function.
-
-
-
- {% if docutils_version >= (0, 17) %}section{% else %}div{% endif %}>
-
-
-
-
-
-
-
-
diff --git a/tests/test_directive_/test_output_36_pypy_index_html_.html b/tests/test_directive_/test_output_36_pypy_index_html_.html
deleted file mode 100644
index 45a4ba9..0000000
--- a/tests/test_directive_/test_output_36_pypy_index_html_.html
+++ /dev/null
@@ -1,208 +0,0 @@
-{% macro span_pre(text, indent='', min_version=(3, 5)) -%}
-{% if sphinx_version >= (3, 5) %}
-{{ indent }} {{ text }}
-{{ indent }}{% else %}{{ text }}{% endif %}
-{%- endmacro -%}
-{% set heading = ("heading" if sphinx_version >= (5, 0) else 'headline') -%}
-{% set sig_prename_tag=("span" if sphinx_version >= (4, 0) else 'code') -%}
-{% set sig_object_class=(' class="sig sig-object py"' if sphinx_version >= (4, 0) else '') -%}
-{% set section = ("section", "section") if docutils_version >= (0, 17) else ('div class="section"', "div") -%}
-
-= (5, 0) %} lang="en"{% endif %}>
-
-
-
- {% if docutils_version[1] == 18 %}
- {% elif docutils_version[1] == 17 %}
- {% elif docutils_version[1] == 19 %}
- {% elif docutils_version[1] == 20 %}
- {% endif %}
- sphinx-autofixture Demo — Python documentation
-
-
-
- {% if sphinx_version >= (5, 0) %}
- {% endif %}
- {% if alabaster_version < (0, 7, 15) %}
- {% endif %}
-
-
-
-
-
-
- <{% if docutils_version >= (0, 17) %}section{% else %}div class="section"{% endif %} id="sphinx-autofixture-demo">
-
- sphinx-autofixture Demo
-
-
-
- -
-
- {{ span_pre("fixture", " ") }}
-
- <{{ sig_prename_tag }} class="sig-prename descclassname">
- {{ span_pre("coincidence.fixtures.", " ") }}
- {{ sig_prename_tag }}>
- <{{ sig_prename_tag }} class="sig-name descname">
- {{ span_pre("tmp_pathplus", " ") }}
- {{ sig_prename_tag }}>
-
-
- -
-
-
- Scope:
-
- function
-
-
- Pytest fixture which returns a temporary directory in the form of a
-
-
- PathPlus
-
-
- object.
-
-
- The directory is unique to each test function invocation,
-created as a sub directory of the base temporary directory.
-
-
- Use it as follows:
-
-
-
-
pytest_plugins = ("coincidence", )
-
-def test_something(tmp_pathplus: PathPlus):
- assert True
-
-
-
-
-
-
-
-
-
- coincidence.fixtures.tmp_pathplus
-
-
-
-
-
- -
-
- {{ span_pre("fixture", " ") }}
-
- <{{ sig_prename_tag }} class="sig-prename descclassname">
- {{ span_pre("coincidence.fixtures.", " ") }}
- {{ sig_prename_tag }}>
- <{{ sig_prename_tag }} class="sig-name descname">
- {{ span_pre("tmp_pathplus", " ") }}
- {{ sig_prename_tag }}>
-
- -
-
-
- Scope:
-
- function
-
-
- Pytest fixture which returns a temporary directory in the form of a
-
-
- PathPlus
-
-
- object.
-
-
- The directory is unique to each test function invocation,
-created as a sub directory of the base temporary directory.
-
-
- Use it as follows:
-
-
-
-
pytest_plugins = ("coincidence", )
-
-def test_something(tmp_pathplus: PathPlus):
- assert True
-
-
-
-
-
-
-
-
- -
- <{{ sig_prename_tag }} class="sig-prename descclassname">
- {{ span_pre("tests.myproject.", " ") }}
- {{ sig_prename_tag }}>
- <{{ sig_prename_tag }} class="sig-name descname">
- {{ span_pre("baz", " ") }}
- {{ sig_prename_tag }}>
-
- (
-
-
- )
-
-
-
- -
-
- A locally defined function.
-
-
-
-
- -
- <{{ sig_prename_tag }} class="sig-prename descclassname">
- {{ span_pre("tests.myproject.", " ") }}
- {{ sig_prename_tag }}>
- <{{ sig_prename_tag }} class="sig-name descname">
- {{ span_pre("fizbuzz", " ") }}
- {{ sig_prename_tag }}>
-
- (
-
-
- )
-
-
-
- -
-
- A locally defined function.
-
-
-
- {% if docutils_version >= (0, 17) %}section{% else %}div{% endif %}>
-
-
-
-
-
-
-
-
From abf3f09e4f5c227b8e8ae80e7dd583ffe53ac535 Mon Sep 17 00:00:00 2001
From: Dominic Davis-Foster
Date: Wed, 4 Jun 2025 15:55:34 +0100
Subject: [PATCH 61/69] Test against multiple pytest versions and newer Sphinx
versions
---
.github/workflows/python_ci.yml | 20 +-
.github/workflows/python_ci_linux.yml | 20 +-
.github/workflows/python_ci_macos.yml | 20 +-
formate.toml | 1 +
repo_helper.yml | 118 +++++++++-
sphinx_autofixture/__init__.py | 10 +-
tests/doc-test/test-root/conf.py | 1 +
tests/requirements.txt | 3 +-
tests/test_directive.py | 9 +-
.../test_output_310_index_html_.html | 51 ++--
.../test_output_37_index_html_.html | 49 ++--
.../test_output_37_pypy_index_html_.html | 49 ++--
tests/test_sphinx_version.py | 22 ++
tox.ini | 217 +++++++++++++-----
14 files changed, 427 insertions(+), 163 deletions(-)
create mode 100644 tests/test_sphinx_version.py
diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml
index ef52f48..546a7f0 100644
--- a/.github/workflows/python_ci.yml
+++ b/.github/workflows/python_ci.yml
@@ -28,16 +28,16 @@ jobs:
fail-fast: False
matrix:
config:
- - {python-version: "3.7", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- - {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.11", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.12", testenvs: "py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.13", testenvs: "py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- - {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "pypy-3.9-v7.3.15", testenvs: "pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
+ - {python-version: "3.7", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},py37-pytest7.4,build", experimental: False}
+ - {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},py38-pytest{7.4,8.3},build", experimental: False}
+ - {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4},py39-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1},py310-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.11", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1,8.2},py311-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.12", testenvs: "py312-sphinx{4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1,8.2},py312-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.13", testenvs: "py313-sphinx{6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1,8.2},py313-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3},pypy37-pytest7.4,build", experimental: False}
+ - {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},pypy38-pytest{7.4,8.3},build", experimental: False}
+ - {python-version: "pypy-3.9-v7.3.15", testenvs: "pypy39-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4},pypy39-pytest{7.4,8.3,latest},build", experimental: True}
steps:
- name: Checkout 🛎️
diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml
index c6883d3..c6cfc9f 100644
--- a/.github/workflows/python_ci_linux.yml
+++ b/.github/workflows/python_ci_linux.yml
@@ -29,16 +29,16 @@ jobs:
fail-fast: False
matrix:
config:
- - {python-version: "3.7", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- - {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.11", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.12", testenvs: "py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.13", testenvs: "py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- - {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "pypy-3.9", testenvs: "pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
+ - {python-version: "3.7", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},py37-pytest7.4,build", experimental: False}
+ - {python-version: "3.8", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},py38-pytest{7.4,8.3},build", experimental: False}
+ - {python-version: "3.9", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4},py39-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.10", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1},py310-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.11", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1,8.2},py311-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.12", testenvs: "py312-sphinx{4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1,8.2},py312-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.13", testenvs: "py313-sphinx{6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1,8.2},py313-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "pypy-3.7", testenvs: "pypy37-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3},pypy37-pytest7.4,build", experimental: False}
+ - {python-version: "pypy-3.8", testenvs: "pypy38-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},pypy38-pytest{7.4,8.3},build", experimental: False}
+ - {python-version: "pypy-3.9", testenvs: "pypy39-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4},pypy39-pytest{7.4,8.3,latest},build", experimental: True}
steps:
- name: Checkout 🛎️
diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml
index 547e8c5..760d5e6 100644
--- a/.github/workflows/python_ci_macos.yml
+++ b/.github/workflows/python_ci_macos.yml
@@ -28,16 +28,16 @@ jobs:
fail-fast: False
matrix:
config:
- - {python-version: "3.7", os-ver: "13", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- - {python-version: "3.8", os-ver: "14", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.9", os-ver: "14", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.10", os-ver: "14", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.11", os-ver: "14", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.12", os-ver: "14", testenvs: "py312-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "3.13", os-ver: "14", testenvs: "py313-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "pypy-3.7", os-ver: "13", testenvs: "pypy37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},build", experimental: False}
- - {python-version: "pypy-3.8", os-ver: "14", testenvs: "pypy38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: False}
- - {python-version: "pypy-3.9", os-ver: "14", testenvs: "pypy39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},build", experimental: True}
+ - {python-version: "3.7", os-ver: "13", testenvs: "py37-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3},py37-pytest7.4,build", experimental: False}
+ - {python-version: "3.8", os-ver: "14", testenvs: "py38-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},py38-pytest{7.4,8.3},build", experimental: False}
+ - {python-version: "3.9", os-ver: "14", testenvs: "py39-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4},py39-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.10", os-ver: "14", testenvs: "py310-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1},py310-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.11", os-ver: "14", testenvs: "py311-sphinx{3.2,3.3,3.4,3.5,4.0,4.1,4.2,4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1,8.2},py311-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.12", os-ver: "14", testenvs: "py312-sphinx{4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1,8.2},py312-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "3.13", os-ver: "14", testenvs: "py313-sphinx{6.2,7.0,7.1,7.2,7.3,7.4,8.0,8.1,8.2},py313-pytest{7.4,8.3,latest},build", experimental: False}
+ - {python-version: "pypy-3.7", os-ver: "13", testenvs: "pypy37-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3},pypy37-pytest7.4,build", experimental: False}
+ - {python-version: "pypy-3.8", os-ver: "14", testenvs: "pypy38-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1},pypy38-pytest{7.4,8.3},build", experimental: False}
+ - {python-version: "pypy-3.9", os-ver: "14", testenvs: "pypy39-sphinx{4.3,4.4,4.5,5.0,5.1,5.2,5.3,6.0,6.1,6.2,7.0,7.1,7.2,7.3,7.4},pypy39-pytest{7.4,8.3,latest},build", experimental: True}
steps:
- name: Checkout 🛎️
diff --git a/formate.toml b/formate.toml
index ef2e426..25f5c52 100644
--- a/formate.toml
+++ b/formate.toml
@@ -31,6 +31,7 @@ known_third_party = [
"coincidence",
"coverage",
"coverage_pyver_pragma",
+ "defusedxml",
"domdf_python_tools",
"github",
"importlib_metadata",
diff --git a/repo_helper.yml b/repo_helper.yml
index 71318c8..d46558b 100644
--- a/repo_helper.yml
+++ b/repo_helper.yml
@@ -20,6 +20,9 @@ min_coverage: 95
python_versions:
'3.7':
matrix_exclude:
+ pytest:
+ - 8.3
+ - latest
sphinx:
- 6.0
- 6.1
@@ -27,29 +30,123 @@ python_versions:
- 7.0
- 7.1
- 7.2
+ - 7.3
+ - 7.4
+ - 8.0
+ - 8.1
+ - 8.2
+ - latest
'3.8':
matrix_exclude:
+ pytest:
+ - latest
sphinx:
- 7.2
- '3.9':
- '3.10':
+ - 7.3
+ - 7.4
+ - 8.0
+ - 8.1
+ - 8.2
+ - latest
+ 3.9:
+ matrix_exclude:
+ sphinx:
+ - 8.0
+ - 8.1
+ - 8.2
+ "3.10":
+ matrix_exclude:
+ sphinx:
+ - 8.2
"3.11":
"3.12":
- 3.13:
+ matrix_exclude:
+ sphinx:
+ - 3.2
+ - 3.3
+ - 3.4
+ - 3.5
+ - 4.0
+ - 4.1
+ - 4.2
+ - 4.3
+ "3.13":
+ matrix_exclude:
+ sphinx:
+ - 3.2
+ - 3.3
+ - 3.4
+ - 3.5
+ - 4.0
+ - 4.1
+ - 4.2
+ - 4.3
+ - 4.4
+ - 4.5
+ - 5.0
+ - 5.1
+ - 5.2
+ - 5.3
+ - 6.0
+ - 6.1
pypy37:
matrix_exclude:
+ pytest:
+ - 8.3
+ - latest
sphinx:
+ - 3.2
+ - 3.3
+ - 3.4
+ - 3.5
+ - 4.0
+ - 4.1
+ - 4.2
- 6.0
- 6.1
- 6.2
- 7.0
- 7.1
- 7.2
+ - 7.3
+ - 7.4
+ - 8.0
+ - 8.1
+ - 8.2
+ - latest
pypy38:
matrix_exclude:
+ pytest:
+ - latest
sphinx:
+ - 3.2
+ - 3.3
+ - 3.4
+ - 3.5
+ - 4.0
+ - 4.1
+ - 4.2
- 7.2
+ - 7.3
+ - 7.4
+ - 8.0
+ - 8.1
+ - 8.2
+ - latest
pypy39:
+ matrix_exclude:
+ sphinx:
+ - 3.2
+ - 3.3
+ - 3.4
+ - 3.5
+ - 4.0
+ - 4.1
+ - 4.2
+ - 8.0
+ - 8.1
+ - 8.2
+ - latest
conda_channels:
- conda-forge
@@ -79,7 +176,16 @@ third_party_version_matrix:
- 6.2
- 7.0
- 7.1
- # - 7.2
+ - 7.2
+ - 7.3
+ - 7.4
+ - 8.0
+ - 8.1
+ - 8.2
+ pytest:
+ - 7.4
+ - 8.3
+ - latest
keywords:
- sphinx
@@ -98,6 +204,4 @@ classifiers:
exclude_files:
- contributing
-
-tox_unmanaged:
- - testenv
+ - tox
diff --git a/sphinx_autofixture/__init__.py b/sphinx_autofixture/__init__.py
index d0350e7..368ff4a 100644
--- a/sphinx_autofixture/__init__.py
+++ b/sphinx_autofixture/__init__.py
@@ -50,6 +50,14 @@
__all__ = ["FixtureDecoratorFinder", "FixtureDocumenter", "is_fixture", "setup"]
+try: # pragma: no cover
+ # 3rd party
+ from _pytest.fixtures import FixtureFunctionDefinition
+except ImportError: # pragma: no cover
+
+ class FixtureFunctionDefinition:
+ pass
+
class FixtureDecoratorFinder(ast.NodeVisitor):
"""
@@ -160,7 +168,7 @@ def can_document_member(
:param parent: The parent of the member.
"""
- if isinstance(member, FunctionType):
+ if isinstance(member, (FunctionType, FixtureFunctionDefinition)):
return is_fixture(member)[0]
else: # pragma: no cover
return False
diff --git a/tests/doc-test/test-root/conf.py b/tests/doc-test/test-root/conf.py
index 36055e4..b2ccf4c 100644
--- a/tests/doc-test/test-root/conf.py
+++ b/tests/doc-test/test-root/conf.py
@@ -5,3 +5,4 @@
]
package_root = "dummy_package"
+project = "Python"
diff --git a/tests/requirements.txt b/tests/requirements.txt
index d1d77c7..830698f 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -1,9 +1,10 @@
coincidence>=0.2.0
coverage>=5.1
coverage-pyver-pragma>=0.2.1
+defusedxml>=0.7.1
importlib-metadata>=3.6.0
pytest>=6.0.0
pytest-cov>=2.8.1
pytest-randomly>=3.7.0
pytest-timeout>=1.4.2
-sphinx-toolbox[testing]>=2.13.0b1
+sphinx-toolbox[testing]>=4.0.0
diff --git a/tests/test_directive.py b/tests/test_directive.py
index 800f80f..79b01c8 100644
--- a/tests/test_directive.py
+++ b/tests/test_directive.py
@@ -1,17 +1,24 @@
# stdlib
import os
+import pathlib
from pathlib import Path
from typing import Any, Iterator, Tuple, Union, cast, no_type_check
# 3rd party
import pytest
+import sphinx
from bs4 import BeautifulSoup, NavigableString, PageElement, Tag, element
from coincidence import max_version, min_version, not_pypy, only_pypy, only_version
from domdf_python_tools.paths import PathPlus
from sphinx.application import Sphinx
-from sphinx.testing.path import path
from sphinx_toolbox.testing import HTMLRegressionFixture
+if sphinx.version_info >= (7, 2):
+ path = pathlib.Path
+else:
+ # 3rd party
+ from sphinx.testing.path import path # type: ignore[misc]
+
pytest_plugins = "sphinx.testing.fixtures"
diff --git a/tests/test_directive_/test_output_310_index_html_.html b/tests/test_directive_/test_output_310_index_html_.html
index 3189f29..7b39c2b 100644
--- a/tests/test_directive_/test_output_310_index_html_.html
+++ b/tests/test_directive_/test_output_310_index_html_.html
@@ -3,23 +3,30 @@
{{ indent }} {{ text }}
{{ indent }}{% else %}{{ text }}{% endif %}
{%- endmacro -%}
+{% macro span_target (module, indent='', min_version=(7, 2)) -%}
+{% if sphinx_version >= min_version %}{% else %}
+{{ indent }}
+{{ indent }}{% endif %}
+{%- endmacro -%}
+{% set permalink = ("Link" if sphinx_version >= (7, 2) else 'Permalink') -%}
{% set heading = ("heading" if sphinx_version >= (5, 0) else 'headline') -%}
{% set sig_prename_tag=("span" if sphinx_version >= (4, 0) else 'code') -%}
{% set sig_object_class=(' class="sig sig-object py"' if sphinx_version >= (4, 0) else '') -%}
{% set section = ("section", "section") if docutils_version >= (0, 17) else ('div class="section"', "div") -%}
-= (5, 0) %} lang="en"{% endif %}>
+= (7, 2) %} data-content_root="./"{% endif %}{% if sphinx_version >= (5, 0) %} lang="en"{% endif %}>
{% if docutils_version[1] == 18 %}
{% elif docutils_version[1] == 17 %}
{% elif docutils_version[1] == 19 %}
- {% elif docutils_version[1] == 20 %}
+ {% elif docutils_version[1] >= 20 %}
{% endif %}
sphinx-autofixture Demo — Python documentation
-
- {% if sphinx_version < (6, 0) %}
@@ -41,7 +48,7 @@
<{% if docutils_version >= (0, 17) %}section{% else %}div class="section"{% endif %} id="sphinx-autofixture-demo">
sphinx-autofixture Demo
-
@@ -56,7 +63,7 @@
<{{ sig_prename_tag }} class="sig-name descname">
{{ span_pre("tmp_pathplus", " ") }}
{{ sig_prename_tag }}>
-
@@ -149,9 +156,7 @@
-
-
-
+ {{ span_target("tests.myproject", " ")}}
-
{{ span_pre("class", " ", (3, 5)) }}
@@ -162,7 +167,7 @@
<{{ sig_prename_tag }} class="sig-name descname">
{{ span_pre("A", " ") }}
{{ sig_prename_tag }}>
-
@@ -184,7 +189,7 @@
{% else %}
= {}{% endif %}
-
@@ -205,7 +210,7 @@
{% else %}
= _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False{{ DataclassParams_end_args }}){% endif %}
-
@@ -228,7 +233,7 @@
)
-
@@ -252,7 +257,7 @@
{% else %}
= None{% endif %}
-
@@ -285,7 +290,7 @@
None
{% else %}
→ None{% endif %}
-
@@ -309,7 +314,7 @@
{% else %}
= (){% endif %}
-
@@ -330,7 +335,7 @@
{% else %}
= 'tests.myproject'{% endif %}
-
@@ -348,7 +353,7 @@
)
-
@@ -363,7 +368,7 @@
<{{ sig_prename_tag }} class="sig-name descname">
{{ span_pre("__weakref__", " ") }}
{{ sig_prename_tag }}>
-
@@ -389,7 +394,7 @@
)
-
@@ -413,7 +418,7 @@
)
-
@@ -423,7 +428,9 @@
- {% if docutils_version >= (0, 17) %}section{% else %}div{% endif %}>
+ {% if docutils_version >= (0, 17) %}section{% else %}div{% endif %}>{% if sphinx_version >= (8, 1) %}
+
+
{% endif %}
diff --git a/tests/test_directive_/test_output_37_index_html_.html b/tests/test_directive_/test_output_37_index_html_.html
index 6f41498..bdfc0b2 100644
--- a/tests/test_directive_/test_output_37_index_html_.html
+++ b/tests/test_directive_/test_output_37_index_html_.html
@@ -3,23 +3,30 @@
{{ indent }} {{ text }}
{{ indent }}{% else %}{{ text }}{% endif %}
{%- endmacro -%}
+{% macro span_target (module, indent='', min_version=(7, 2)) -%}
+{% if sphinx_version >= min_version %}
{% else %}
+{{ indent }}
+{{ indent }}{% endif %}
+{%- endmacro -%}
+{% set permalink = ("Link" if sphinx_version >= (7, 2) else 'Permalink') -%}
{% set heading = ("heading" if sphinx_version >= (5, 0) else 'headline') -%}
{% set sig_prename_tag=("span" if sphinx_version >= (4, 0) else 'code') -%}
{% set sig_object_class=(' class="sig sig-object py"' if sphinx_version >= (4, 0) else '') -%}
{% set section = ("section", "section") if docutils_version >= (0, 17) else ('div class="section"', "div") -%}
-= (5, 0) %} lang="en"{% endif %}>
+= (7, 2) %} data-content_root="./"{% endif %}{% if sphinx_version >= (5, 0) %} lang="en"{% endif %}>
{% if docutils_version[1] == 18 %}
{% elif docutils_version[1] == 17 %}
{% elif docutils_version[1] == 19 %}
- {% elif docutils_version[1] == 20 %}
+ {% elif docutils_version[1] >= 20 %}
{% endif %}
sphinx-autofixture Demo — Python documentation
-
- {% if sphinx_version < (6, 0) %}
@@ -41,7 +48,7 @@
<{% if docutils_version >= (0, 17) %}section{% else %}div class="section"{% endif %} id="sphinx-autofixture-demo">
sphinx-autofixture Demo
-
@@ -56,7 +63,7 @@
<{{ sig_prename_tag }} class="sig-name descname">
{{ span_pre("tmp_pathplus", " ") }}
{{ sig_prename_tag }}>
-
@@ -149,9 +156,7 @@