From 9e248849f7f684a2b7a20579d533c20bb302dae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 13 Aug 2024 14:31:53 -0700 Subject: [PATCH 1/5] MAINT: fix sphinx 8.0 compatibility --- myst_nb/core/read.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myst_nb/core/read.py b/myst_nb/core/read.py index 2b3dae4b..0d50dd26 100644 --- a/myst_nb/core/read.py +++ b/myst_nb/core/read.py @@ -68,7 +68,7 @@ def create_nb_reader( # we check suffixes ordered by longest first, to ensure we get the "closest" match iterator = sorted(readers.items(), key=lambda x: len(x[0]), reverse=True) for suffix, (reader, reader_kwargs, commonmark_only) in iterator: - if path.endswith(suffix): + if path.suffix == suffix: if isinstance(reader, str): # attempt to load the reader as an object path reader = import_object(reader) From 55a389560664b71e4c01d7aa1ec8c6610c06e165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 13 Aug 2024 14:42:02 -0700 Subject: [PATCH 2/5] CI: adding sphinx 8 to the test matrix --- .github/workflows/tests.yml | 8 ++++---- tox.ini | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bc716135..149f7192 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,17 +16,17 @@ jobs: matrix: os: [ubuntu-latest] python-version: ["3.9", "3.10", "3.11", "3.12"] - sphinx: [">=5,<8"] # Newest Sphinx (any) + sphinx: [">=5,<9"] # Newest Sphinx (any) myst-parser: [">=1,<3"] # Newest MyST Parser (any) include: # Just check the other platforms once - os: windows-latest python-version: "3.10" - sphinx: "~=7.0" + sphinx: "~=8.0" myst-parser: "~=2.0" - os: macos-latest python-version: "3.10" - sphinx: "~=7.0" + sphinx: "~=8.0" myst-parser: "~=2.0" # Oldest known-compatible dependencies - os: ubuntu-latest @@ -36,7 +36,7 @@ jobs: # Newest known-compatible dependencies - os: ubuntu-latest python-version: "3.12" - sphinx: "==7.0.0" + sphinx: "==8.0.0" myst-parser: "==2.0.0" runs-on: ${{ matrix.os }} diff --git a/tox.ini b/tox.ini index d8008132..464ea42a 100644 --- a/tox.ini +++ b/tox.ini @@ -16,12 +16,13 @@ envlist = py311-sphinx7 [testenv] usedevelop = true -[testenv:py{39,310,311,312}-sphinx{5,6,7}] +[testenv:py{39,310,311,312}-sphinx{5,6,7,8}] extras = testing deps = sphinx5: sphinx>=5,<6 sphinx6: sphinx>=6,<7 sphinx7: sphinx>=7,<8 + sphinx8: sphinx>=8,<9 commands = pytest {posargs} [testenv:docs-{update,clean}] From 9987645c581a924c68598d0f0339d52868c1a72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 13 Aug 2024 15:11:41 -0700 Subject: [PATCH 3/5] MAINT: fix it for older sphinx versions --- myst_nb/core/read.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myst_nb/core/read.py b/myst_nb/core/read.py index 0d50dd26..6951f34a 100644 --- a/myst_nb/core/read.py +++ b/myst_nb/core/read.py @@ -68,7 +68,7 @@ def create_nb_reader( # we check suffixes ordered by longest first, to ensure we get the "closest" match iterator = sorted(readers.items(), key=lambda x: len(x[0]), reverse=True) for suffix, (reader, reader_kwargs, commonmark_only) in iterator: - if path.suffix == suffix: + if Path(path).suffix == suffix: if isinstance(reader, str): # attempt to load the reader as an object path reader = import_object(reader) From 95af54f399a06621416a919a19e794609a308741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Tue, 13 Aug 2024 15:44:40 -0700 Subject: [PATCH 4/5] CI: some more version magic --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 149f7192..85c96dd8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,11 +23,11 @@ jobs: - os: windows-latest python-version: "3.10" sphinx: "~=8.0" - myst-parser: "~=2.0" + myst-parser: "~=4.0" - os: macos-latest python-version: "3.10" sphinx: "~=8.0" - myst-parser: "~=2.0" + myst-parser: "~=4.0" # Oldest known-compatible dependencies - os: ubuntu-latest python-version: "3.9" @@ -36,8 +36,8 @@ jobs: # Newest known-compatible dependencies - os: ubuntu-latest python-version: "3.12" - sphinx: "==8.0.0" - myst-parser: "==2.0.0" + sphinx: "==8.0.2" + myst-parser: "==4.0.0" runs-on: ${{ matrix.os }} From d9dabea70740683c4f3267885a9d94e8b10b7bbc Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Wed, 28 Aug 2024 12:43:05 +0100 Subject: [PATCH 5/5] ci: add mid-range case, bump Python version --- .github/workflows/tests.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 85c96dd8..5c760131 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,11 +21,11 @@ jobs: include: # Just check the other platforms once - os: windows-latest - python-version: "3.10" + python-version: "3.12" sphinx: "~=8.0" myst-parser: "~=4.0" - os: macos-latest - python-version: "3.10" + python-version: "3.12" sphinx: "~=8.0" myst-parser: "~=4.0" # Oldest known-compatible dependencies @@ -33,6 +33,11 @@ jobs: python-version: "3.9" sphinx: "==5.0.0" myst-parser: "==1.0.0" + # Mid-range dependencies + - os: ubuntu-latest + python-version: "3.11" + sphinx: "==7.0.0" + myst-parser: "==2.0.0" # Newest known-compatible dependencies - os: ubuntu-latest python-version: "3.12"