diff --git a/.github/workflows/test-formats.yml b/.github/workflows/test-formats.yml
index e000c6c0..ebf6bb95 100644
--- a/.github/workflows/test-formats.yml
+++ b/.github/workflows/test-formats.yml
@@ -19,10 +19,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Set up Python 3.10
+ - name: Set up Python 3.11
uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@@ -43,10 +43,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Set up Python 3.10
+ - name: Set up Python 3.11
uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index f668ed51..4772cf03 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Set up Python 3.10
+ - name: Set up Python 3.11
uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.11"
- uses: pre-commit/action@v3.0.1
tests:
@@ -25,16 +25,16 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.10", "3.11", "3.12", "3.13"]
- sphinx: [">=8,<8.2"]
+ python-version: ["3.11", "3.12", "3.13"]
+ sphinx: [">=8,<9"]
os: [ubuntu-latest]
include:
- - os: ubuntu-latest
- python-version: "3.10"
- sphinx: ">=7,<8"
+ # - os: ubuntu-latest
+ # python-version: "3.11"
+ # sphinx: ">=7,<8"
- os: windows-latest
- python-version: "3.10"
- sphinx: ">=7,<8"
+ python-version: "3.11"
+ sphinx: ">=8,<9"
runs-on: ${{ matrix.os }}
@@ -56,7 +56,7 @@ jobs:
pytest --cov=myst_parser --cov-report=xml --cov-report=term-missing
coverage xml
- name: Upload to Codecov
- if: github.repository == 'executablebooks/MyST-Parser' && matrix.python-version == 3.10 && matrix.os == 'ubuntu-latest'
+ if: github.repository == 'executablebooks/MyST-Parser' && matrix.python-version == 3.11 && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
@@ -78,10 +78,10 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v4
- - name: Set up Python 3.10
+ - name: Set up Python 3.11
uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.11"
- name: Install setup
run: |
python -m pip install --upgrade pip
@@ -133,10 +133,10 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v4
- - name: Set up Python 3.10
+ - name: Set up Python 3.11
uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.11"
- name: install flit
run: |
pip install flit~=3.4
@@ -156,10 +156,10 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v4
- - name: Set up Python 3.10
+ - name: Set up Python 3.11
uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.11"
- name: install flit and tomlkit
run: |
pip install flit~=3.4 tomlkit
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 8097ec15..d83d53d5 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -34,7 +34,7 @@ repos:
args: [--config-file=pyproject.toml]
additional_dependencies:
- types-urllib3
- - sphinx~=7.4
+ - sphinx~=8.2
- markdown-it-py~=3.0
- mdit-py-plugins~=0.4.0
files: >
diff --git a/.readthedocs.yml b/.readthedocs.yml
index cb68e005..f166afb7 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
- python: "3.10"
+ python: "3.11"
python:
install:
diff --git a/docs/conf.py b/docs/conf.py
index 2fc9589d..748bec75 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -54,7 +54,7 @@
suppress_warnings = ["myst.strikethrough"]
intersphinx_mapping = {
- "python": ("https://docs.python.org/3.10", None),
+ "python": ("https://docs.python.org/3.11", None),
"sphinx": ("https://www.sphinx-doc.org/en/master", None),
"markdown_it": ("https://markdown-it-py.readthedocs.io/en/latest", None),
}
diff --git a/myst_parser/inventory.py b/myst_parser/inventory.py
index 0782752c..5ece7b6e 100644
--- a/myst_parser/inventory.py
+++ b/myst_parser/inventory.py
@@ -80,7 +80,7 @@ def to_sphinx(inv: InventoryType) -> SphinxInventoryType:
for domain_name, obj_types in inv["objects"].items():
for obj_type, refs in obj_types.items():
for refname, refdata in refs.items():
- objs.setdefault(f"{domain_name}:{obj_type}", {})[refname] = (
+ objs.setdefault(f"{domain_name}:{obj_type}", {})[refname] = ( # type: ignore[assignment]
inv["name"],
inv["version"],
refdata["loc"],
diff --git a/myst_parser/sphinx_ext/main.py b/myst_parser/sphinx_ext/main.py
index f3fe0f4a..3788a5a2 100644
--- a/myst_parser/sphinx_ext/main.py
+++ b/myst_parser/sphinx_ext/main.py
@@ -2,7 +2,6 @@
from typing import Any
-import sphinx
from docutils import nodes
from sphinx.application import Sphinx
from sphinx.transforms import (
@@ -12,9 +11,7 @@
from myst_parser.mdit_to_docutils.transforms import UnreferencedFootnotesDetector
from myst_parser.parsers.docutils_ import (
depart_container_html,
- depart_rubric_html,
visit_container_html,
- visit_rubric_html,
)
from myst_parser.warnings_ import MystWarnings
@@ -51,13 +48,6 @@ def setup_sphinx(app: Sphinx, load_parser: bool = False) -> None:
app.add_post_transform(MystReferenceResolver)
- # override only the html writer visit methods for rubric, to use the "level" attribute
- # this allows for nested headers to be correctly rendered
- if sphinx.version_info < (7, 4):
- # This is now added in sphinx: https://github.com/sphinx-doc/sphinx/pull/12506
- app.add_node(
- nodes.rubric, override=True, html=(visit_rubric_html, depart_rubric_html)
- )
# override only the html writer visit methods for container,
# to remove the "container" class for divs
# this avoids CSS clashes with the bootstrap theme
diff --git a/pyproject.toml b/pyproject.toml
index e97dff7f..c8d53761 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -15,7 +15,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
@@ -32,14 +31,14 @@ keywords = [
"docutils",
"sphinx",
]
-requires-python = ">=3.10"
+requires-python = ">=3.11"
dependencies = [
"docutils>=0.19,<0.22",
"jinja2", # required for substitutions, but let sphinx choose version
"markdown-it-py~=3.0",
"mdit-py-plugins~=0.4,>=0.4.1",
"pyyaml",
- "sphinx>=7,<9",
+ "sphinx>=8,<9",
]
[project.urls]
@@ -52,7 +51,7 @@ code_style = ["pre-commit~=4.0"]
linkify = ["linkify-it-py~=2.0"]
# Note: This is only required for internal use
rtd = [
- "sphinx>=7",
+ "sphinx>=8",
"ipython",
"sphinx-book-theme~=1.1",
"sphinx-design",
diff --git a/tests/test_renderers/fixtures/sphinx_directives.md b/tests/test_renderers/fixtures/sphinx_directives.md
index bb2ba2df..357ba114 100644
--- a/tests/test_renderers/fixtures/sphinx_directives.md
+++ b/tests/test_renderers/fixtures/sphinx_directives.md
@@ -21,7 +21,7 @@ object (`sphinx.directives.ObjectDescription`):
.
Header
-
+
¶
@@ -79,7 +79,7 @@
Caption
-
+
¶