From d95c4bb70e0549887da8634843141022ac98983e Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 30 May 2024 15:50:58 -0500 Subject: [PATCH 1/5] Fix tests The latest version of Sphinx doesn't install some packages that are required for the tests by default. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index a4f6bdeb..28c56fda 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ deps = sphinx60: sphinx~=6.0.0 sphinx62: sphinx~=6.2.0 sphinx73: sphinx~=7.0.0 - sphinxlatest: sphinx + sphinxlatest: sphinx[test] commands = pytest {posargs} From f432eeb30eef4713b149cbd1309dbf15266b4cea Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 30 May 2024 16:01:03 -0500 Subject: [PATCH 2/5] Fix versions and test with Python 3.12 --- .circleci/config.yml | 11 +++++++++-- tox.ini | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8cf36e36..b8094f99 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ commands: type: string sphinx-version: type: string - default: "50,53,60,62,70,latest" + default: "50,53,60,62,70,73,latest" steps: - checkout # Tox >=4 fails with `ValueError: py310-sphinx{18` @@ -37,6 +37,13 @@ jobs: - run-tox: version: py310 + py312: + docker: + - image: 'cimg/python:3.12' + steps: + - run-tox: + version: py312 + workflows: version: 2 test: @@ -44,4 +51,4 @@ workflows: - py38 - py39 - py310 - + - py312 diff --git a/tox.ini b/tox.ini index 28c56fda..938d57d1 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ isolated_build = True envlist = docs - py{38,39,310}-sphinx{50,53,60,62,70,latest} + py{38,39,310,312}-sphinx{50,53,60,62,70,73,latest} [testenv] deps = @@ -16,7 +16,8 @@ deps = sphinx53: sphinx~=5.3.0 sphinx60: sphinx~=6.0.0 sphinx62: sphinx~=6.2.0 - sphinx73: sphinx~=7.0.0 + sphinx70: sphinx~=7.0.0 + sphinx73: sphinx[test]~=7.3.0 sphinxlatest: sphinx[test] commands = pytest {posargs} From 214f4e69ddb0fe4af991bcb418ae676dbb2f474f Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 17 Jun 2024 10:12:26 +0200 Subject: [PATCH 3/5] More test fixing --- .circleci/config.yml | 2 ++ tests/test_htmltag.py | 1 + 2 files changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b8094f99..568bd156 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,6 +22,8 @@ jobs: steps: - run-tox: version: py38 + # Sphinx >=7.2 requires Python 3.9+ + sphinx-version: "50,53,60,62,70" py39: docker: diff --git a/tests/test_htmltag.py b/tests/test_htmltag.py index 8981d5b2..9264b675 100644 --- a/tests/test_htmltag.py +++ b/tests/test_htmltag.py @@ -156,6 +156,7 @@ def test_python_domain_intersphinx(app, status, warning): assert chunk in content +@pytest.skipif(sys.version_info >= (3, 12), reason="sphinxcontrib.bibtex is not compatible with Python 3.12") @pytest.mark.sphinx( srcdir=bibtexdomainsrcdir, confoverrides={ From 44182a68bc3c42efdad98b6899f3aa0891240747 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 17 Jun 2024 10:15:01 +0200 Subject: [PATCH 4/5] pytest skipif --- tests/test_htmltag.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_htmltag.py b/tests/test_htmltag.py index 9264b675..afdfde2d 100644 --- a/tests/test_htmltag.py +++ b/tests/test_htmltag.py @@ -156,7 +156,7 @@ def test_python_domain_intersphinx(app, status, warning): assert chunk in content -@pytest.skipif(sys.version_info >= (3, 12), reason="sphinxcontrib.bibtex is not compatible with Python 3.12") +@pytest.mark.skipif(sys.version_info >= (3, 12), reason="sphinxcontrib.bibtex is not compatible with Python 3.12") @pytest.mark.sphinx( srcdir=bibtexdomainsrcdir, confoverrides={ From 0d28092a7e3c45b5e04df35caaa4006a227ec72a Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 17 Jun 2024 10:19:11 +0200 Subject: [PATCH 5/5] import sys --- tests/test_htmltag.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_htmltag.py b/tests/test_htmltag.py index afdfde2d..9ebbbc1c 100644 --- a/tests/test_htmltag.py +++ b/tests/test_htmltag.py @@ -1,4 +1,5 @@ import re +import sys import pytest import sphinx import textwrap