diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e12f6de..32b59e49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -150,6 +150,24 @@ jobs: python_arch: 'arm64' tox_env: 'py314-pytest90-xdist38-coverage713' os: 'macos-latest' + - name: 'py315-pytest90-xdist38-coverage713 (ubuntu)' + python: '3.15' + toxpython: 'python3.15' + python_arch: 'x64' + tox_env: 'py315-pytest90-xdist38-coverage713' + os: 'ubuntu-latest' + - name: 'py315-pytest90-xdist38-coverage713 (windows)' + python: '3.15' + toxpython: 'python3.15' + python_arch: 'x64' + tox_env: 'py315-pytest90-xdist38-coverage713' + os: 'windows-latest' + - name: 'py315-pytest90-xdist38-coverage713 (macos)' + python: '3.15' + toxpython: 'python3.15' + python_arch: 'arm64' + tox_env: 'py315-pytest90-xdist38-coverage713' + os: 'macos-latest' - name: 'pypy310-pytest90-xdist38-coverage713 (ubuntu)' python: 'pypy-3.10' toxpython: 'pypy3.10' @@ -186,42 +204,6 @@ jobs: python_arch: 'arm64' tox_env: 'pypy311-pytest90-xdist38-coverage713' os: 'macos-latest' - - name: 'py39-pytest80-xdist38-coverage710 (ubuntu)' - python: '3.9' - toxpython: 'python3.9' - python_arch: 'x64' - tox_env: 'py39-pytest80-xdist38-coverage710' - os: 'ubuntu-latest' - - name: 'py39-pytest80-xdist38-coverage710 (windows)' - python: '3.9' - toxpython: 'python3.9' - python_arch: 'x64' - tox_env: 'py39-pytest80-xdist38-coverage710' - os: 'windows-latest' - - name: 'py39-pytest80-xdist38-coverage710 (macos)' - python: '3.9' - toxpython: 'python3.9' - python_arch: 'arm64' - tox_env: 'py39-pytest80-xdist38-coverage710' - os: 'macos-latest' - - name: 'pypy39-pytest80-xdist38-coverage710 (ubuntu)' - python: 'pypy-3.9' - toxpython: 'pypy3.9' - python_arch: 'x64' - tox_env: 'pypy39-pytest80-xdist38-coverage710' - os: 'ubuntu-latest' - - name: 'pypy39-pytest80-xdist38-coverage710 (windows)' - python: 'pypy-3.9' - toxpython: 'pypy3.9' - python_arch: 'x64' - tox_env: 'pypy39-pytest80-xdist38-coverage710' - os: 'windows-latest' - - name: 'pypy39-pytest80-xdist38-coverage710 (macos)' - python: 'pypy-3.9' - toxpython: 'pypy3.9' - python_arch: 'arm64' - tox_env: 'pypy39-pytest80-xdist38-coverage710' - os: 'macos-latest' steps: - uses: actions/checkout@v6 with: @@ -230,6 +212,7 @@ jobs: with: python-version: ${{ matrix.python }} architecture: ${{ matrix.python_arch }} + allow-prereleases: true - name: install dependencies run: | python -mpip install --progress-bar=off -r ci/requirements.txt diff --git a/ci/templates/.github/workflows/test.yml b/ci/templates/.github/workflows/test.yml index 08f90d1b..2374ed02 100644 --- a/ci/templates/.github/workflows/test.yml +++ b/ci/templates/.github/workflows/test.yml @@ -95,6 +95,7 @@ jobs: with: python-version: {{ '${{ matrix.python }}' }} architecture: {{ '${{ matrix.python_arch }}' }} + allow-prereleases: true - name: install dependencies run: | python -mpip install --progress-bar=off -r ci/requirements.txt diff --git a/pyproject.toml b/pyproject.toml index c1641b10..b1a5326a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dynamic = ["readme"] version = "7.1.0" description = "Pytest plugin for measuring coverage." license = "MIT" -requires-python = ">=3.9" +requires-python = ">=3.10" authors = [ { name = "Marc Schlaich", email = "marc.schlaich@gmail.com" }, ] @@ -34,12 +34,12 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Testing", @@ -78,7 +78,7 @@ fragments = [ extend-exclude = ["static", "ci/templates"] line-length = 140 src = ["src", "tests"] -target-version = "py39" +target-version = "py310" [tool.ruff.lint.per-file-ignores] "ci/*" = ["S"] diff --git a/src/pytest_cov/engine.py b/src/pytest_cov/engine.py index a6a465fa..7187d070 100644 --- a/src/pytest_cov/engine.py +++ b/src/pytest_cov/engine.py @@ -10,7 +10,6 @@ import sys import warnings from pathlib import Path -from typing import Union import coverage from coverage.data import CoverageData @@ -52,7 +51,7 @@ def ensure_topdir_wrapper(self, *args, **kwargs): class CovController: """Base class for different plugin implementations.""" - def __init__(self, options: argparse.Namespace, config: Union[None, object], nodeid: Union[None, str]): + def __init__(self, options: argparse.Namespace, config: object | None, nodeid: str | None): """Get some common config used by multiple derived classes.""" self.cov_source = options.cov_source self.cov_report = options.cov_report diff --git a/tox.ini b/tox.ini index 07548537..10774601 100644 --- a/tox.ini +++ b/tox.ini @@ -15,8 +15,7 @@ envlist = clean, check, docs, - {py310,py311,py312,py313,py314,pypy310,pypy311}-{pytest90}-{xdist38}-{coverage713}, - {py39,pypy39}-{pytest80}-{xdist38}-{coverage710}, + {py310,py311,py312,py313,py314,py315,pypy310,pypy311}-{pytest90}-{xdist38}-{coverage713}, report ignore_basepython_conflict = true @@ -27,34 +26,11 @@ setenv = PYTHONUNBUFFERED=yes # Use env vars for (optional) pinning of deps. - pytest62: _DEP_PYTEST=pytest==6.2.5 - pytest80: _DEP_PYTEST=pytest==8.0.2 - pytest81: _DEP_PYTEST=pytest==8.1.1 - pytest82: _DEP_PYTEST=pytest==8.2.2 - pytest83: _DEP_PYTEST=pytest==8.3.5 - pytest84: _DEP_PYTEST=pytest==8.4.2 pytest90: _DEP_PYTEST=pytest==9.0.2 - xdist32: _DEP_PYTESTXDIST=pytest-xdist==3.2.0 - xdist33: _DEP_PYTESTXDIST=pytest-xdist==3.3.1 - xdist34: _DEP_PYTESTXDIST=pytest-xdist==3.4.0 - xdist35: _DEP_PYTESTXDIST=pytest-xdist==3.5.0 - xdist36: _DEP_PYTESTXDIST=pytest-xdist==3.6.1 - xdist37: _DEP_PYTESTXDIST=pytest-xdist==3.7.0 xdist38: _DEP_PYTESTXDIST=pytest-xdist==3.8.0 xdistdev: _DEP_PYTESTXDIST=git+https://github.com/pytest-dev/pytest-xdist.git#egg=pytest-xdist - coverage72: _DEP_COVERAGE=coverage==7.2.7 - coverage73: _DEP_COVERAGE=coverage==7.3.4 - coverage74: _DEP_COVERAGE=coverage==7.4.4 - coverage75: _DEP_COVERAGE=coverage==7.5.4 - coverage76: _DEP_COVERAGE=coverage==7.6.12 - coverage77: _DEP_COVERAGE=coverage==7.7.1 - coverage78: _DEP_COVERAGE=coverage==7.8.2 - coverage79: _DEP_COVERAGE=coverage==7.9.2 - coverage710: _DEP_COVERAGE=coverage==7.10.7 - coverage711: _DEP_COVERAGE=coverage==7.11.3 - coverage712: _DEP_COVERAGE=coverage==7.12.0 coverage713: _DEP_COVERAGE=coverage==7.13.5 # For testing against a coverage.py working tree.