diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eba1b15..76f75b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: python-version: ${{ matrix.python }} allow-prereleases: true cache: pip - cache-dependency-path: test-requirements.txt + cache-dependency-path: pyproject.toml - name: Run tests run: ./ci.sh shell: bash @@ -51,7 +51,7 @@ jobs: python-version: ${{ matrix.python }} allow-prereleases: true cache: pip - cache-dependency-path: test-requirements.txt + cache-dependency-path: pyproject.toml - name: Run tests run: ./ci.sh env: @@ -76,7 +76,7 @@ jobs: python-version: ${{ matrix.python }} allow-prereleases: true cache: pip - cache-dependency-path: test-requirements.txt + cache-dependency-path: pyproject.toml - name: Set PYTHON_GIL if: endsWith(matrix.python-version, 't') run: | diff --git a/.readthedocs.yml b/.readthedocs.yml index aceed1f..7cc8b0a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -2,17 +2,17 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.8" + python: "3.12" + jobs: + install: + - python -m pip install --no-cache-dir "pip >= 25.1" + - python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir --group rtd . formats: - htmlzip - epub -python: - install: - - requirements: ci/rtd-requirements.txt - sphinx: configuration: docs/source/conf.py diff --git a/MANIFEST.in b/MANIFEST.in index 4edd4b1..a2c07d1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,4 @@ include README.rst CHEATSHEET.rst LICENSE* CODE_OF_CONDUCT* CONTRIBUTING* include .coveragerc .style.yapf -include test-requirements.txt recursive-include docs * prune docs/build diff --git a/ci.sh b/ci.sh index 967836e..23cc85e 100755 --- a/ci.sh +++ b/ci.sh @@ -43,10 +43,7 @@ EOF exit 0 fi -pip install . - -# Actual tests -pip install -Ur test-requirements.txt +pip install --upgrade --group test . mkdir empty cd empty diff --git a/ci/rtd-requirements.txt b/ci/rtd-requirements.txt deleted file mode 100644 index 67898ba..0000000 --- a/ci/rtd-requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -# RTD is currently installing 1.5.3, which has a bug in :lineno-match: -sphinx >= 1.6.1 -sphinx_rtd_theme -sphinxcontrib-trio diff --git a/pyproject.toml b/pyproject.toml index a054095..cd73b2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,18 @@ Homepage = "https://github.com/python-trio/sniffio" Documentation = "https://sniffio.readthedocs.io/" Changelog = "https://sniffio.readthedocs.io/en/latest/history.html" +[dependency-groups] +test = [ + "pytest", + "pytest-cov", + "curio", +] +rtd = [ + "sphinx >= 1.6.1", + "sphinx_rtd_theme", + "sphinxcontrib-trio", +] + [tool.setuptools.dynamic] version = {attr = "sniffio._version.__version__"} diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 6742196..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest -pytest-cov -curio