From 35c4ac5d148afd64158da072b2c27555246b2b9d Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 11 Jun 2026 11:54:46 +0200 Subject: [PATCH 1/3] Switch from requirements files to pyproject.toml --- .github/workflows/build-docs.yml | 2 +- .github/workflows/ci.yml | 8 +++----- .readthedocs.yaml | 8 ++++++-- docs/Makefile | 4 ++-- docs/requirements.txt | 10 ---------- pyproject.toml | 21 +++++++++++++++++++++ test-requirements.txt | 3 --- 7 files changed, 33 insertions(+), 23 deletions(-) delete mode 100644 docs/requirements.txt create mode 100644 pyproject.toml delete mode 100644 test-requirements.txt diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 82cae008f..5d7c4b64a 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -21,6 +21,6 @@ jobs: - name: Install dependencies run: | pip install --upgrade pip - pip install -r docs/requirements.txt + pip install --group docs - name: Build the documentation run: make -C docs html diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd5fb80f1..f8f31f7a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,17 +15,15 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Set up Python 3 - uses: actions/setup-python@v6 + - uses: actions/setup-python@v6 with: - python-version: 3 + python-version: "3.14" cache: "pip" - cache-dependency-path: "test-requirements.txt" - name: Install dependencies run: | pip install --upgrade pip - pip install -r test-requirements.txt + pip install --group test - name: Lint implementation run: flake8 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index b6c9041cf..5618e1cb1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -4,13 +4,17 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-26.04 tools: python: "3" + jobs: + install: + - uv sync --group docs sphinx: configuration: docs/conf.py python: install: - - requirements: docs/requirements.txt + - method: uv + command: sync diff --git a/docs/Makefile b/docs/Makefile index ba87fe401..5aaa480ee 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -38,8 +38,8 @@ text: build venv: $(PYTHON) -m venv $(VENVDIR) - $(VENVDIR)/bin/python3 -m pip install -U pip setuptools - $(VENVDIR)/bin/python3 -m pip install -r requirements.txt + $(VENVDIR)/bin/python3 -m pip install -U pip + $(VENVDIR)/bin/python3 -m pip install --group docs @echo "The venv has been created in the $(VENVDIR) directory" # Catch-all target: route all unknown targets to Sphinx using the new diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 2af32818f..000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Requirements to build the Python documentation - -# Sphinx version is pinned so that new versions that introduce new warnings -# won't suddenly cause build failures. Updating the version is fine as long -# as no warnings are raised by doing so. -sphinx==9.1.0 - -# The theme used by the documentation is stored separately, so we need -# to install that as well. -python-docs-theme diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..5eca7c54e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,21 @@ +[project] +name = "typing" +version = "1" # dummy +requires-python = ">= 3.12" # for building the documentation etc. + +[dependency-groups] +test = [ + "flake8", + "flake8-bugbear", + "flake8-pyi", +] +docs = [ + # Sphinx version is pinned so that new versions that introduce new warnings + # won't suddenly cause build failures. Updating the version is fine as long + # as no warnings are raised by doing so. + "sphinx==9.1.0", + + # The theme used by the documentation is stored separately, so we need + # to install that as well. + "python-docs-theme", +] diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 658ae0a52..000000000 --- a/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -flake8 -flake8-bugbear -flake8-pyi From 802361701b7f44cbe64f240d5a07691ed6463342 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 11 Jun 2026 12:04:02 +0200 Subject: [PATCH 2/3] Fix pyproject path --- docs/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 5aaa480ee..7d6f7d6d0 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,6 +3,7 @@ # You can set these variables from the command line, and also # from the environment for the first two. +ROOTDIR = .. SOURCEDIR = . SOURCES = BUILDDIR = _build @@ -39,7 +40,7 @@ text: build venv: $(PYTHON) -m venv $(VENVDIR) $(VENVDIR)/bin/python3 -m pip install -U pip - $(VENVDIR)/bin/python3 -m pip install --group docs + $(VENVDIR)/bin/python3 -m pip install --group $(ROOTDIR)/pyproject.toml:docs @echo "The venv has been created in the $(VENVDIR) directory" # Catch-all target: route all unknown targets to Sphinx using the new From 0f20dad0f33b4ee85c70e68b708d13086bc77d30 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 11 Jun 2026 12:07:58 +0200 Subject: [PATCH 3/3] Ensure comment is correct --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 7d6f7d6d0..418d93680 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,9 +3,9 @@ # You can set these variables from the command line, and also # from the environment for the first two. -ROOTDIR = .. SOURCEDIR = . SOURCES = +ROOTDIR = .. BUILDDIR = _build PYTHON = python3 VENVDIR = ./venv