From 6441ecfcceba4e8cbf875a5a05d6b8574caf1176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta?= Date: Tue, 19 Sep 2023 12:35:10 +0200 Subject: [PATCH 1/6] Fix tests for Sphinx 7.2 --- ...test_conditional_assets_html_assets_policy_index_.html | 8 ++++---- ...t_conditional_assets_html_assets_policy_no_tabs1_.html | 8 ++++---- ...t_conditional_assets_html_assets_policy_no_tabs2_.html | 8 ++++---- tests/test_build/test_conditional_assets_index_.html | 8 ++++---- tests/test_build/test_conditional_assets_no_tabs1_.html | 8 ++++---- tests/test_build/test_conditional_assets_no_tabs2_.html | 8 ++++---- tests/test_build/test_nested_markup.html | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/test_build/test_conditional_assets_html_assets_policy_index_.html b/tests/test_build/test_conditional_assets_html_assets_policy_index_.html index 66f00b1..b87a329 100644 --- a/tests/test_build/test_conditional_assets_html_assets_policy_index_.html +++ b/tests/test_build/test_conditional_assets_html_assets_policy_index_.html @@ -18,7 +18,7 @@

Fruits - +

@@ -54,7 +54,7 @@

Luminaries - +

@@ -82,7 +82,7 @@

Code Tabs - +

@@ -182,7 +182,7 @@

Group Tabs - +

diff --git a/tests/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.html b/tests/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.html index 66f00b1..b87a329 100644 --- a/tests/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.html +++ b/tests/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.html @@ -18,7 +18,7 @@

Fruits - +

@@ -54,7 +54,7 @@

Luminaries - +

@@ -82,7 +82,7 @@

Code Tabs - +

@@ -182,7 +182,7 @@

Group Tabs - +

diff --git a/tests/test_build/test_conditional_assets_html_assets_policy_no_tabs2_.html b/tests/test_build/test_conditional_assets_html_assets_policy_no_tabs2_.html index 66f00b1..b87a329 100644 --- a/tests/test_build/test_conditional_assets_html_assets_policy_no_tabs2_.html +++ b/tests/test_build/test_conditional_assets_html_assets_policy_no_tabs2_.html @@ -18,7 +18,7 @@

Fruits - +

@@ -54,7 +54,7 @@

Luminaries - +

@@ -82,7 +82,7 @@

Code Tabs - +

@@ -182,7 +182,7 @@

Group Tabs - +

diff --git a/tests/test_build/test_conditional_assets_index_.html b/tests/test_build/test_conditional_assets_index_.html index 66f00b1..b87a329 100644 --- a/tests/test_build/test_conditional_assets_index_.html +++ b/tests/test_build/test_conditional_assets_index_.html @@ -18,7 +18,7 @@

Fruits - +

@@ -54,7 +54,7 @@

Luminaries - +

@@ -82,7 +82,7 @@

Code Tabs - +

@@ -182,7 +182,7 @@

Group Tabs - +

diff --git a/tests/test_build/test_conditional_assets_no_tabs1_.html b/tests/test_build/test_conditional_assets_no_tabs1_.html index 66f00b1..b87a329 100644 --- a/tests/test_build/test_conditional_assets_no_tabs1_.html +++ b/tests/test_build/test_conditional_assets_no_tabs1_.html @@ -18,7 +18,7 @@

Fruits - +

@@ -54,7 +54,7 @@

Luminaries - +

@@ -82,7 +82,7 @@

Code Tabs - +

@@ -182,7 +182,7 @@

Group Tabs - +

diff --git a/tests/test_build/test_conditional_assets_no_tabs2_.html b/tests/test_build/test_conditional_assets_no_tabs2_.html index 66f00b1..b87a329 100644 --- a/tests/test_build/test_conditional_assets_no_tabs2_.html +++ b/tests/test_build/test_conditional_assets_no_tabs2_.html @@ -18,7 +18,7 @@

Fruits - +

@@ -54,7 +54,7 @@

Luminaries - +

@@ -82,7 +82,7 @@

Code Tabs - +

@@ -182,7 +182,7 @@

Group Tabs - +

diff --git a/tests/test_build/test_nested_markup.html b/tests/test_build/test_nested_markup.html index b77df2c..22588a9 100644 --- a/tests/test_build/test_nested_markup.html +++ b/tests/test_build/test_nested_markup.html @@ -4,7 +4,7 @@

Markup in Tab Titles - +

From 76e11720f9152b8aa765dba72b4554c58fb25edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta?= Date: Tue, 19 Sep 2023 12:46:34 +0200 Subject: [PATCH 2/6] attempt for backwards compatibility --- tests/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index f776f49..434fd33 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -129,6 +129,11 @@ def read(app, docname="index", resolve=False, regress=False, replace=None): '', "", ) + if sphinx.version_info < (7, 2): + text = text.replace( + 'title="Permalink to this heading"', + 'title="Link to this heading"', + ) file_regression.check(text, extension=extension) return doctree From 1119f49c5135ffb1949716fc034a50eb56d1e9fa Mon Sep 17 00:00:00 2001 From: David Foster <31405412+foster999@users.noreply.github.com> Date: Sun, 22 Oct 2023 19:56:02 +0100 Subject: [PATCH 3/6] Remove testing for python < 3.9 --- .github/workflows/tests.yml | 2 +- tests/conftest.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6f8a9af..fa22922 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] steps: - uses: actions/checkout@v2 diff --git a/tests/conftest.py b/tests/conftest.py index 434fd33..f776f49 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -129,11 +129,6 @@ def read(app, docname="index", resolve=False, regress=False, replace=None): '', "", ) - if sphinx.version_info < (7, 2): - text = text.replace( - 'title="Permalink to this heading"', - 'title="Link to this heading"', - ) file_regression.check(text, extension=extension) return doctree From ff5396076732c0c17278f9bdc70013e2935fc3cb Mon Sep 17 00:00:00 2001 From: David Foster <31405412+foster999@users.noreply.github.com> Date: Sun, 22 Oct 2023 20:00:54 +0100 Subject: [PATCH 4/6] Update readthedocs config for new settings --- .readthedocs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index 1bfa2df..db02e3b 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,5 +1,9 @@ version: 2 +build: + os: ubuntu-22.04 + tools: python + python: version: 3 install: From c2007ccc9824f8fafe6cec0184cc23082ba30a7d Mon Sep 17 00:00:00 2001 From: David Foster <31405412+foster999@users.noreply.github.com> Date: Sun, 22 Oct 2023 20:03:38 +0100 Subject: [PATCH 5/6] Fix readthedocs config format --- .readthedocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index db02e3b..87dcd66 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -2,10 +2,10 @@ version: 2 build: os: ubuntu-22.04 - tools: python + tools: + python: 3 python: - version: 3 install: - method: pip path: . From 70521a2eac5f179aa472315f4502deb39bd43552 Mon Sep 17 00:00:00 2001 From: David Foster <31405412+foster999@users.noreply.github.com> Date: Sun, 22 Oct 2023 20:04:48 +0100 Subject: [PATCH 6/6] Fix readthedocs config python version format --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 87dcd66..97528aa 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: 3 + python: "3" python: install: