From 25e88cb17ba8d02c80da401719b41015d47ccce2 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:15:52 +0000 Subject: [PATCH 1/2] Updated files with 'repo_helper'. --- .github/workflows/octocheese.yml | 3 +++ .github/workflows/python_ci.yml | 4 ++-- .github/workflows/python_ci_linux.yml | 4 ++-- .github/workflows/python_ci_macos.yml | 6 +++--- .pre-commit-config.yaml | 6 +++--- doc-source/requirements.txt | 1 + tox.ini | 1 + 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/octocheese.yml b/.github/workflows/octocheese.yml index 84f2408..5e64ca9 100644 --- a/.github/workflows/octocheese.yml +++ b/.github/workflows/octocheese.yml @@ -6,6 +6,9 @@ on: schedule: - cron: 0 12 * * * +permissions: + contents: write + jobs: Run: runs-on: ubuntu-latest diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index eb2c62d..a223325 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -36,8 +36,8 @@ jobs: - {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},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},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},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},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},build", experimental: True} + - {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}", 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}", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 19d10fb..7041a3b 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -38,7 +38,7 @@ jobs: - {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},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},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},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},build", experimental: True} + - {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}", experimental: True} steps: - name: Checkout 🛎️ @@ -161,7 +161,7 @@ jobs: - name: Upload distribution to PyPI 🚀 if: startsWith(github.ref, 'refs/tags/') - uses: pypa/gh-action-pypi-publish@v1.4.2 + uses: pypa/gh-action-pypi-publish@v1.13.0 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index f72925f..89215b3 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.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.7", os-ver: "15-intel", testenvs: "py37-sphinx{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.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.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},build", experimental: False} - {python-version: "3.10", os-ver: "14", testenvs: "py310-sphinx{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},build", experimental: False} - {python-version: "3.11", os-ver: "14", testenvs: "py311-sphinx{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},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},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},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},build", experimental: False} + - {python-version: "pypy-3.7", os-ver: "15-intel", testenvs: "pypy37-sphinx{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{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{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},build", experimental: True} + - {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}", experimental: True} steps: - name: Checkout 🛎️ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 55c19cf..867c1ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: - id: bind-requirements - repo: https://github.com/python-formate/flake8-dunder-all - rev: v0.4.1 + rev: v0.5.0 hooks: - id: ensure-dunder-all files: ^sphinxcontrib.extras_require/.*\.py$ @@ -62,11 +62,11 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/asottile/pyupgrade - rev: v2.12.0 + rev: v3.3.0 hooks: - id: pyupgrade args: - - --py36-plus + - --py37-plus - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index b259604..27cbd67 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -2,6 +2,7 @@ git+https://github.com/sphinx-toolbox/sphinx-toolbox-experimental default-values>=0.6.0 domdf-sphinx-theme>=0.3.0 html-section>=0.3.0 +roman>=4.0 seed-intersphinx-mapping>=1.2.2 sphinx-copybutton>=0.2.12 sphinx-debuginfo>=0.2.2 diff --git a/tox.ini b/tox.ini index 06af943..fbb945c 100644 --- a/tox.ini +++ b/tox.ini @@ -110,6 +110,7 @@ deps = flake8-sphinx-links>=0.0.4 flake8-strftime>=0.1.1 flake8-typing-imports>=1.10.0 + git+https://github.com/domdfcoding/restructuredtext-lint.git@fix-deprecations git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git git+https://github.com/domdfcoding/flake8-rst-docstrings.git git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods From 1c09cf04dc6ea0b846098e2633b5c8450487caba Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:16:05 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_directive.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/tests/test_directive.py b/tests/test_directive.py index e1e65f7..01194b4 100644 --- a/tests/test_directive.py +++ b/tests/test_directive.py @@ -104,25 +104,11 @@ def test_validate_requirements(requirements: List[str], valid_requirements: List ) def test_validate_requirements_warning(requirements: List[str], valid_requirements: List[str]) -> None: - if sys.version_info < (3, 7): - # Old packaging version - warning_msg = "Creating a LegacyVersion has been deprecated and will be removed in the next major release" - - with warnings.catch_warnings(): - warnings.simplefilter("always", DeprecationWarning) - - with pytest.warns(DeprecationWarning, match=warning_msg): - assert validate_requirements(requirements) == valid_requirements - - with pytest.raises(ValueError, match=f"Invalid requirement .*: {warning_msg}"): - validate_requirements(requirements) - else: - # New packaging version - with pytest.raises( - ValueError, - match=rf"Invalid requirement .*: Expected end or semicolon \(after version specifier\)" - ): - validate_requirements(requirements) + # New packaging version + with pytest.raises( + ValueError, match=rf"Invalid requirement .*: Expected end or semicolon \(after version specifier\)" + ): + validate_requirements(requirements) @pytest.mark.parametrize(