From 0ae56f307e4033da943662c467289fbfb914c58c Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Thu, 10 Oct 2024 17:58:10 +0200 Subject: [PATCH] Work in progress drop python 3.8 Refs #12874 --- .github/workflows/prepare-release-pr.yml | 2 +- .github/workflows/test.yml | 38 ++---------------------- CONTRIBUTING.rst | 2 +- README.rst | 2 +- doc/en/backwards-compatibility.rst | 1 + pyproject.toml | 5 ++-- testing/code/test_excinfo.py | 2 +- tox.ini | 8 ++--- 8 files changed, 13 insertions(+), 47 deletions(-) diff --git a/.github/workflows/prepare-release-pr.yml b/.github/workflows/prepare-release-pr.yml index 1bb23fab844..f537bd64163 100644 --- a/.github/workflows/prepare-release-pr.yml +++ b/.github/workflows/prepare-release-pr.yml @@ -34,7 +34,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.13" - name: Install dependencies run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e66f5eae5c..b1bd15108dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,17 +54,12 @@ jobs: fail-fast: false matrix: name: [ - "windows-py38", - "windows-py38-pluggy", "windows-py39", "windows-py310", "windows-py311", "windows-py312", "windows-py313", - "ubuntu-py38", - "ubuntu-py38-pluggy", - "ubuntu-py38-freeze", "ubuntu-py39", "ubuntu-py310", "ubuntu-py311", @@ -72,7 +67,6 @@ jobs: "ubuntu-py313", "ubuntu-pypy3", - "macos-py38", "macos-py39", "macos-py310", "macos-py312", @@ -83,15 +77,6 @@ jobs: ] include: - - name: "windows-py38" - python: "3.8" - os: windows-latest - tox_env: "py38-unittestextras" - use_coverage: true - - name: "windows-py38-pluggy" - python: "3.8" - os: windows-latest - tox_env: "py38-pluggymain-pylib-xdist" - name: "windows-py39" python: "3.9" os: windows-latest @@ -109,23 +94,10 @@ jobs: os: windows-latest tox_env: "py312" - name: "windows-py313" - python: "3.13-dev" + python: "3.13" os: windows-latest tox_env: "py313" - - name: "ubuntu-py38" - python: "3.8" - os: ubuntu-latest - tox_env: "py38-lsof-numpy-pexpect" - use_coverage: true - - name: "ubuntu-py38-pluggy" - python: "3.8" - os: ubuntu-latest - tox_env: "py38-pluggymain-pylib-xdist" - - name: "ubuntu-py38-freeze" - python: "3.8" - os: ubuntu-latest - tox_env: "py38-freeze" - name: "ubuntu-py39" python: "3.9" os: ubuntu-latest @@ -154,10 +126,6 @@ jobs: os: ubuntu-latest tox_env: "pypy3-xdist" - - name: "macos-py38" - python: "3.8" - os: macos-latest - tox_env: "py38-xdist" - name: "macos-py39" python: "3.9" os: macos-latest @@ -172,7 +140,7 @@ jobs: os: macos-latest tox_env: "py312-xdist" - name: "macos-py313" - python: "3.13-dev" + python: "3.13" os: macos-latest tox_env: "py313-xdist" @@ -182,7 +150,7 @@ jobs: tox_env: "plugins" - name: "doctesting" - python: "3.8" + python: "3.9" os: ubuntu-latest tox_env: "doctesting" use_coverage: true diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d615e5fb113..56824a43ff4 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -270,7 +270,7 @@ Here is a simple overview, with pytest-specific bits: #. Run all the tests - You need to have Python 3.8 or later available in your system. Now + You need to have Python 3.9 or later available in your system. Now running tests is as simple as issuing this command:: $ tox -e linting,py39 diff --git a/README.rst b/README.rst index a81e082cdd7..091afc363da 100644 --- a/README.rst +++ b/README.rst @@ -97,7 +97,7 @@ Features - Can run `unittest `_ (or trial) test suites out of the box -- Python 3.8+ or PyPy3 +- Python 3.9+ or PyPy3 - Rich plugin architecture, with over 1300+ `external plugins `_ and thriving community diff --git a/doc/en/backwards-compatibility.rst b/doc/en/backwards-compatibility.rst index c0feb833ce1..11b9247f1d5 100644 --- a/doc/en/backwards-compatibility.rst +++ b/doc/en/backwards-compatibility.rst @@ -83,6 +83,7 @@ Released pytest versions support all Python versions that are actively maintaine ============== =================== pytest version min. Python version ============== =================== +9.0+ 3.9+ 8.0+ 3.8+ 7.1+ 3.7+ 6.2 - 7.0 3.6+ diff --git a/pyproject.toml b/pyproject.toml index caeb4bf7f83..bd5a74acec0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ authors = [ { name = "Florian Bruhin" }, { name = "Others (See AUTHORS)" }, ] -requires-python = ">=3.8" +requires-python = ">=3.9" classifiers = [ "Development Status :: 6 - Mature", "Intended Audience :: Developers", @@ -33,7 +33,6 @@ classifiers = [ "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -481,7 +480,7 @@ files = [ mypy_path = [ "src", ] -python_version = "3.8" +python_version = "3.9" check_untyped_defs = true disallow_any_generics = true disallow_untyped_defs = true diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py index fc60ae9ac99..6fc76d13958 100644 --- a/testing/code/test_excinfo.py +++ b/testing/code/test_excinfo.py @@ -965,7 +965,7 @@ def raiseos(): assert upframe is not None if upframe.f_code.co_name == "_makepath": # Only raise with expected calls, but not via e.g. inspect for - # py38-windows. + # py38-windows. (?) raised += 1 raise OSError(2, "custom_oserror") return orig_path_cwd() diff --git a/tox.ini b/tox.ini index 61563ca2c5f..def535d31c3 100644 --- a/tox.ini +++ b/tox.ini @@ -4,18 +4,16 @@ minversion = 3.20.0 distshare = {homedir}/.tox/distshare envlist = linting - py38 py39 py310 py311 py312 py313 pypy3 - py38-{pexpect,xdist,unittestextras,numpy,pluggymain,pylib} + py39-{pexpect,xdist,unittestextras,numpy,pluggymain,pylib} doctesting doctesting-coverage plugins - py38-freeze docs docs-checklinks @@ -58,7 +56,7 @@ setenv = PYTHONWARNDEFAULTENCODING=1 # Configuration to run with coverage similar to CI, e.g. - # "tox -e py38-coverage". + # "tox -e py39-coverage". coverage: _PYTEST_TOX_COVERAGE_RUN=coverage run -m coverage: _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess coverage: COVERAGE_FILE={toxinidir}/.coverage @@ -178,7 +176,7 @@ commands = pytest pytest_twisted_integration.py pytest simple_integration.py --force-sugar --flakes -[testenv:py38-freeze] +[testenv:py39] description = test pytest frozen with `pyinstaller` under `{basepython}` changedir = testing/freeze