diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bc716135..5c760131 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,28 +16,33 @@ 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" - myst-parser: "~=2.0" + python-version: "3.12" + sphinx: "~=8.0" + myst-parser: "~=4.0" - os: macos-latest - python-version: "3.10" - sphinx: "~=7.0" - myst-parser: "~=2.0" + python-version: "3.12" + sphinx: "~=8.0" + myst-parser: "~=4.0" # Oldest known-compatible dependencies - os: ubuntu-latest python-version: "3.9" sphinx: "==5.0.0" myst-parser: "==1.0.0" - # Newest known-compatible dependencies + # Mid-range dependencies - os: ubuntu-latest - python-version: "3.12" + python-version: "3.11" sphinx: "==7.0.0" myst-parser: "==2.0.0" + # Newest known-compatible dependencies + - os: ubuntu-latest + python-version: "3.12" + sphinx: "==8.0.2" + myst-parser: "==4.0.0" runs-on: ${{ matrix.os }} diff --git a/myst_nb/core/read.py b/myst_nb/core/read.py index 2b3dae4b..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.endswith(suffix): + if Path(path).suffix == suffix: if isinstance(reader, str): # attempt to load the reader as an object path reader = import_object(reader) 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}]