From 5348e3b8fb1b41d27c56b069213a14bae2975875 Mon Sep 17 00:00:00 2001 From: David Foster Date: Sat, 25 Jun 2022 22:37:53 +0100 Subject: [PATCH 1/9] Add testing for sphinx 5 and update dependency --- .github/workflows/tests.yml | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b7414e8..fef62bc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,8 +17,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] - sphinx: [">=2,<3", ">=3,<4", ">=4,<5"] + python-version: [3.7, 3.8, 3.9, 3.10] + sphinx: [">=2,<3", ">=3,<4", ">=4,<5", ">=5,<6"] pygments: ["==2.8.0", "==2.9.0", "==2.10.0"] steps: diff --git a/setup.py b/setup.py index cb60110..c562e61 100755 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def get_version(): url="https://github.com/executablebooks/sphinx-tabs", license="MIT", python_requires="~=3.6", - install_requires=["sphinx>=2,<5", "pygments", "docutils~=0.17.0"], + install_requires=["sphinx>=2,<6", "pygments", "docutils~=0.17.0"], extras_require={ "testing": [ "coverage", From c2466bfe48995a2936ede83d60fbc41d51cfe205 Mon Sep 17 00:00:00 2001 From: David Foster Date: Sat, 25 Jun 2022 22:48:44 +0100 Subject: [PATCH 2/9] Fix testing matrix for python 3.10 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fef62bc..02db70e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, 3.10] + python-version: ["3.7", "3.8", "3.9", "3.10"] sphinx: [">=2,<3", ">=3,<4", ">=4,<5", ">=5,<6"] pygments: ["==2.8.0", "==2.9.0", "==2.10.0"] From 0bd068181660cf53da42052b0ca1af4bdfd029f1 Mon Sep 17 00:00:00 2001 From: David Foster Date: Sat, 25 Jun 2022 22:57:51 +0100 Subject: [PATCH 3/9] Fix limit jinja2 version --- .github/workflows/tests.yml | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 02db70e..a06777b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,8 +18,8 @@ jobs: strategy: matrix: python-version: ["3.7", "3.8", "3.9", "3.10"] - sphinx: [">=2,<3", ">=3,<4", ">=4,<5", ">=5,<6"] - pygments: ["==2.8.0", "==2.9.0", "==2.10.0"] + sphinx: [">=3,<4", ">=4,<5", ">=5,<6"] + pygments: ["==2.8.0", "==2.9.0", "==2.10.0", "==2.12.0",] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index c562e61..8eea170 100755 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def get_version(): url="https://github.com/executablebooks/sphinx-tabs", license="MIT", python_requires="~=3.6", - install_requires=["sphinx>=2,<6", "pygments", "docutils~=0.17.0"], + install_requires=["sphinx>=2,<6", "pygments", "docutils~=0.17.0", "jinja2<3.1.0"], extras_require={ "testing": [ "coverage", From 060eeaf20cf09641516b56ac5a0e4fee76b85fca Mon Sep 17 00:00:00 2001 From: David Foster Date: Sat, 25 Jun 2022 23:06:40 +0100 Subject: [PATCH 4/9] Updating testing dependencies and metadata --- setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 8eea170..81267ed 100755 --- a/setup.py +++ b/setup.py @@ -24,12 +24,12 @@ def get_version(): include_package_data=True, url="https://github.com/executablebooks/sphinx-tabs", license="MIT", - python_requires="~=3.6", + python_requires="~=3.7", install_requires=["sphinx>=2,<6", "pygments", "docutils~=0.17.0", "jinja2<3.1.0"], extras_require={ "testing": [ "coverage", - "pytest>=3.6,<4", + "pytest>=7.1,<8", "pytest-cov", "pytest-regressions", "pygments", @@ -48,9 +48,10 @@ def get_version(): "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Programming Language :: Python", "Topic :: Documentation :: Sphinx", "Topic :: Documentation", From 60fafe4051f49a0d796dc2e8eca536bfb2e62057 Mon Sep 17 00:00:00 2001 From: David Foster Date: Sat, 25 Jun 2022 23:14:08 +0100 Subject: [PATCH 5/9] Document custom pytest mark --- tests/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 6c15bd4..b8bf9f4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -8,6 +8,11 @@ pytest_plugins = "sphinx.testing.fixtures" +def pytest_configure(config): + config.addinivalue_line( + "markers", "noautobuild: mark test to prevent autouse fixtures from running" + ) + @pytest.fixture(scope="session") def rootdir(): From 4f542d20fd1c6825f73231af17b8c752ae506ff0 Mon Sep 17 00:00:00 2001 From: David Foster Date: Sat, 25 Jun 2022 23:18:18 +0100 Subject: [PATCH 6/9] Update regression outputs for sphinx text change --- ...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 1032d5e..66f00b1 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 1032d5e..66f00b1 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 1032d5e..66f00b1 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 1032d5e..66f00b1 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 1032d5e..66f00b1 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 1032d5e..66f00b1 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 3b6f504..b77df2c 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 5525e7f972b86d603fe3aa09c4fe1cc6cb6504df Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 25 Jun 2022 22:18:43 +0000 Subject: [PATCH 7/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/conftest.py b/tests/conftest.py index b8bf9f4..b1f0728 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -8,6 +8,7 @@ pytest_plugins = "sphinx.testing.fixtures" + def pytest_configure(config): config.addinivalue_line( "markers", "noautobuild: mark test to prevent autouse fixtures from running" From e87283f2d8d3a1cb857f52d4a07b012d62c321d0 Mon Sep 17 00:00:00 2001 From: David Foster Date: Sat, 25 Jun 2022 23:35:52 +0100 Subject: [PATCH 8/9] Drop sphinx 4 testing --- .github/workflows/tests.yml | 4 ++-- tests/test_build.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a06777b..b76189b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,8 +18,8 @@ jobs: strategy: matrix: python-version: ["3.7", "3.8", "3.9", "3.10"] - sphinx: [">=3,<4", ">=4,<5", ">=5,<6"] - pygments: ["==2.8.0", "==2.9.0", "==2.10.0", "==2.12.0",] + sphinx: [">=3,<4", ">=5,<6"] + pygments: ["==2.8.0", "==2.9.0", "==2.12.0",] steps: - uses: actions/checkout@v2 diff --git a/tests/test_build.py b/tests/test_build.py index a44a9ef..ca2554a 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -29,7 +29,7 @@ def test_conditional_assets(app, docname, check_asset_links): @pytest.mark.parametrize("docname", ["index", "no_tabs1", "no_tabs2"]) @pytest.mark.sphinx(testroot="conditionalassets-policy") @pytest.mark.skipif( - sphinx.version_info[:2] < (4, 1), reason="Test uses Sphinx 4.1 config" + sphinx.version_info[:2] < (4, 1), reason="Test uses option that was introduced in Sphinx 4.1 " ) def test_conditional_assets_html_assets_policy( app, From 0d9005acb8df4b761cce20ee1bf1962f77a7c795 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 25 Jun 2022 22:36:37 +0000 Subject: [PATCH 9/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_build.py b/tests/test_build.py index ca2554a..2e32014 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -29,7 +29,8 @@ def test_conditional_assets(app, docname, check_asset_links): @pytest.mark.parametrize("docname", ["index", "no_tabs1", "no_tabs2"]) @pytest.mark.sphinx(testroot="conditionalassets-policy") @pytest.mark.skipif( - sphinx.version_info[:2] < (4, 1), reason="Test uses option that was introduced in Sphinx 4.1 " + sphinx.version_info[:2] < (4, 1), + reason="Test uses option that was introduced in Sphinx 4.1 ", ) def test_conditional_assets_html_assets_policy( app,