From ccdda4977159004aca945bdd1c249b08cf685afe Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 30 Jul 2024 14:02:20 +0200 Subject: [PATCH 1/2] Update Git ignore --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6cb47a2..c904c41 100644 --- a/.gitignore +++ b/.gitignore @@ -108,4 +108,7 @@ package-lock.json node_modules # vscode -.vscode/ \ No newline at end of file +.vscode/ + +# PyPI build +_build/ \ No newline at end of file From 40799b4548e23d665f7cc48333398175f614bfaa Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 31 Jul 2024 14:03:17 +0200 Subject: [PATCH 2/2] Tests: update test suite and fix some tests I expect some versions to fail due to #240. If that's the case, we can merge #241 here and move forward with it. --- .circleci/config.yml | 4 +++- tests/examples/404rst/conf.py | 1 + tests/examples/default/conf.py | 1 + tests/test_urls.py | 22 +++++++++++++++++++--- tox.ini | 6 +++++- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 363ff79..74869c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ commands: type: string sphinx-version: type: string - default: "5,6,7,latest" + default: "5,6,7,8,latest,dev" steps: - checkout # NOTE: use Tox 3.x until I understand the syntax for generative environments: @@ -23,12 +23,14 @@ jobs: steps: - run-tox: version: py38 + sphinx-version: "5,6" py39: docker: - image: 'cimg/python:3.9' steps: - run-tox: version: py39 + sphinx-version: "5,6,7" py310: docker: - image: 'cimg/python:3.10' diff --git a/tests/examples/404rst/conf.py b/tests/examples/404rst/conf.py index ba27a90..99956a6 100644 --- a/tests/examples/404rst/conf.py +++ b/tests/examples/404rst/conf.py @@ -1,5 +1,6 @@ # conf.py to run tests +project = 'Python' master_doc = 'index' extensions = [ 'notfound.extension', diff --git a/tests/examples/default/conf.py b/tests/examples/default/conf.py index eaf730d..7d7a172 100644 --- a/tests/examples/default/conf.py +++ b/tests/examples/default/conf.py @@ -1,5 +1,6 @@ # conf.py to run tests +project = 'Python' master_doc = 'index' extensions = [ 'notfound.extension', diff --git a/tests/test_urls.py b/tests/test_urls.py index 80a2e73..d5a4031 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -64,6 +64,11 @@ def test_default_settings(app, status, warning): else: cssclass = "" + if sphinx.version_info < (7, 3): + alt = "Logo" + else: + alt = "Logo of Python" + chunks = [ '

Page not found

', "Unfortunately we couldn't find the content you were looking for.", @@ -71,7 +76,7 @@ def test_default_settings(app, status, warning): # favicon and logo f'', - '', + f'', # sidebar URLs '

Python

', @@ -139,6 +144,11 @@ def test_urls_prefix_setting(app, status, warning): else: cssclass = "" + if sphinx.version_info < (7, 3): + alt = "Logo" + else: + alt = "Logo of Python" + chunks = [ # sidebar URLs '

Python

', @@ -147,7 +157,7 @@ def test_urls_prefix_setting(app, status, warning): # favicon and logo f'', - '', + f'', # resources _get_css_html_link_tag(app, 'language', 'version', 'alabaster.css'), @@ -177,6 +187,12 @@ def test_urls_prefix_setting_none(app, status, warning): else: cssclass = "" + if sphinx.version_info < (7, 3): + alt = "Logo" + else: + alt = "Logo of Python" + + chunks = [ # sidebar URLs '

Python

', @@ -185,7 +201,7 @@ def test_urls_prefix_setting_none(app, status, warning): # favicon and logo f'', - '', + f'', # resources _get_css_html_link_tag(app, '', '', 'alabaster.css'), diff --git a/tox.ini b/tox.ini index a25b197..a2107a8 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,9 @@ isolated_build = True envlist = docs - py{38,39,310,311,312}-sphinx{5,6,7,latest} + py{38}-sphinx{5,6} + py{39}-sphinx{5,6,7} + py{310,311,312}-sphinx{5,6,7,8,latest,dev} [testenv] deps = @@ -15,7 +17,9 @@ deps = sphinx5: sphinx<6.0 sphinx6: sphinx<7.0 sphinx7: sphinx<8.0 + sphinx8: sphinx<9.0 sphinxlatest: sphinx + sphinxdev: https://github.com/sphinx-doc/sphinx/archive/refs/heads/master.zip commands = pytest {posargs} [testenv:docs]