diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 369ebc8e..1e455693 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,10 +19,10 @@ jobs: contents: write steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 + uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: "3.x" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8e7fa81..7a3c535a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,28 +26,38 @@ jobs: os: - ubuntu-latest python-version: - ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", pypy3.11] + ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15", "3.15t", pypy3.11] include: # Windows: Test lowest and highest supported Python versions - os: windows-latest python-version: "3.10" - os: windows-latest - python-version: "3.14" + python-version: "3.15" + + env: + # Select the tox envs for this matrix entry (see `[gh]` in `tox.ini`). + TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }} + # Use uv-managed interpreters everywhere. + UV_PYTHON_PREFERENCE: only-managed steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 + - name: Install uv + uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2 with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true + version-file: requirements-ci.txt + enable-cache: true + cache-dependency-glob: | + pyproject.toml + tox.ini + requirements-ci.txt - - name: Upgrade pip - run: python -m pip install --upgrade pip + - name: Install tox + run: uv tool install --python 3.15 --with-requirements requirements-ci.txt tox - - name: Install dependencies - run: pip install tox tox-gh-actions + - name: Setup test suite + run: tox run -v --notest --skip-missing-interpreters false - - name: Test with tox - run: tox + - name: Run test suite + run: tox run --skip-pkg-install diff --git a/CHANGELOG.md b/CHANGELOG.md index e5f25414..71c9740d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +- Add support for Python 3.15. + ### Fixed - Fix a package build deprecation warning caused by a non-string `license` value in `pyproject.toml` by [@kurtmckee] in [#648] diff --git a/MANIFEST.in b/MANIFEST.in index bf0d47e6..afa35896 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,5 +9,6 @@ include .coveragerc include .editorconfig include Makefile include requirements.txt +include requirements-ci.txt include requirements-docs.txt include src/dotenv/py.typed diff --git a/pyproject.toml b/pyproject.toml index 1619e9d4..7dc2a711 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Implementation :: PyPy", "Intended Audience :: Developers", "Intended Audience :: System Administrators", diff --git a/requirements-ci.txt b/requirements-ci.txt new file mode 100644 index 00000000..002cc7aa --- /dev/null +++ b/requirements-ci.txt @@ -0,0 +1,5 @@ +# Tooling installed by `.github/workflows/test.yml`. +tox==4.67.4 +tox-gh==1.9.1 +tox-uv==1.37.2 +uv==0.13.6 diff --git a/tox.ini b/tox.ini index 6d1f25f8..1f49dc26 100644 --- a/tox.ini +++ b/tox.ini @@ -1,26 +1,30 @@ [tox] -envlist = lint,py{310,311,312,313,314,314t},pypy3,manifest,coverage-report +envlist = lint,py{310,311,312,313,314,315,315t},pypy3,manifest,coverage-report -[gh-actions] +[gh] python = - 3.10: py310 - 3.11: py311 - 3.12: py312 - 3.13: py313, lint, manifest - 3.14: py314 - 3.14t: py314t - pypy-3.11: pypy3 + 3.10 = py310 + 3.11 = py311 + 3.12 = py312 + 3.13 = py313, lint, manifest + 3.14 = py314 + 3.15 = py315 + 3.15t = py315t + pypy3.11 = pypy3 [testenv] deps = pytest pytest-cov click - py{310,311,312,313,314,314t,pypy3}: ipython + py{310,311,312,313,314,315,315t},pypy3: ipython commands = pytest --cov --cov-report=term-missing {posargs} depends = - py{310,311,312,313,314,314t},pypy3: coverage-clean - coverage-report: py{310,311,312,313,314,314t},pypy3 + py{310,311,312,313,314,315,315t},pypy3: coverage-clean + coverage-report: py{310,311,312,313,314,315,315t},pypy3 + +[testenv:pypy3] +base_python = pypy3.11 [testenv:lint] skip_install = true @@ -30,6 +34,7 @@ deps = commands = ruff check src tests ruff format --check src tests + mypy --python-version=3.15 src tests mypy --python-version=3.14 src tests mypy --python-version=3.13 src tests mypy --python-version=3.12 src tests