Skip to content

Commit

Permalink
Work in progress drop python 3.8 (need to be squashed after review)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Nov 10, 2024
1 parent de56152 commit 72dcc7d
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.x"

- name: Install dependencies
run: |
Expand Down
65 changes: 29 additions & 36 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,23 @@ jobs:
fail-fast: false
matrix:
name: [
"windows-py38",
"windows-py38-pluggy",
"windows-py39-pluggy",
"windows-py39",
"windows-py310",
"windows-py311",
"windows-py312",
"windows-py313",

"ubuntu-py38",
"ubuntu-py38-pluggy",
"ubuntu-py38-freeze",
"ubuntu-py39-lsof-numpy-pexpect",
"ubuntu-py39-pluggy",
"ubuntu-py39-freeze",
"ubuntu-py39",
"ubuntu-py310",
"ubuntu-py311",
"ubuntu-py312",
"ubuntu-py313",
"ubuntu-pypy3",

"macos-py38",
"macos-py39",
"macos-py310",
"macos-py312",
Expand All @@ -83,15 +81,15 @@ jobs:
]

include:
- name: "windows-py38"
python: "3.8"
- name: "windows-py39-unittestextras"
python: "3.9"
os: windows-latest
tox_env: "py38-unittestextras"
tox_env: "py39-unittestextras"
use_coverage: true
- name: "windows-py38-pluggy"
python: "3.8"
- name: "windows-py39-pluggy"
python: "3.9"
os: windows-latest
tox_env: "py38-pluggymain-pylib-xdist"
tox_env: "py39-pluggymain-pylib-xdist"
- name: "windows-py39"
python: "3.9"
os: windows-latest
Expand All @@ -109,28 +107,27 @@ 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"
- name: "ubuntu-py39-lsof-numpy-pexpect"
python: "3.9"
os: ubuntu-latest
tox_env: "py38-lsof-numpy-pexpect"
use_coverage: true
- name: "ubuntu-py38-pluggy"
python: "3.8"
tox_env: "py39-lsof-numpy-pexpect"
- name: "ubuntu-py39-pluggy"
python: "3.9"
os: ubuntu-latest
tox_env: "py38-pluggymain-pylib-xdist"
- name: "ubuntu-py38-freeze"
python: "3.8"
tox_env: "py39-pluggymain-pylib-xdist"
- name: "ubuntu-py39-freeze"
python: "3.9"
os: ubuntu-latest
tox_env: "py38-freeze"
- name: "ubuntu-py39"
tox_env: "py39-freeze"
- name: "ubuntu-py39-xdist"
python: "3.9"
os: ubuntu-latest
tox_env: "py39-xdist"
- name: "ubuntu-py310"
- name: "ubuntu-py310-xdist"
python: "3.10"
os: ubuntu-latest
tox_env: "py310-xdist"
Expand All @@ -145,7 +142,7 @@ jobs:
tox_env: "py312"
use_coverage: true
- name: "ubuntu-py313"
python: "3.13-dev"
python: "3.13"
os: ubuntu-latest
tox_env: "py313-pexpect"
use_coverage: true
Expand All @@ -154,10 +151,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
Expand All @@ -172,7 +165,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"

Expand All @@ -182,7 +175,7 @@ jobs:
tox_env: "plugins"

- name: "doctesting"
python: "3.8"
python: "3.9"
os: ubuntu-latest
tox_env: "doctesting"
use_coverage: true
Expand All @@ -192,12 +185,12 @@ jobs:
contains(
fromJSON(
'[
"windows-py38-pluggy",
"windows-py39-pluggy",
"windows-py313",
"ubuntu-py38-pluggy",
"ubuntu-py38-freeze",
"ubuntu-py39-pluggy",
"ubuntu-py39-freeze",
"ubuntu-py313",
"macos-py38",
"macos-py39",
"macos-py313"
]'
),
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.2"
rev: "v0.7.3"
hooks:
- id: ruff
args: ["--fix"]
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Features
- Can run `unittest <https://docs.pytest.org/en/stable/how-to/unittest.html>`_ (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 <https://docs.pytest.org/en/latest/reference/plugin_list.html>`_ and thriving community

Expand Down
1 change: 1 addition & 0 deletions changelog/12874.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
We dropped support for python 3.8 following its end of life (2024-10-07)
1 change: 1 addition & 0 deletions doc/en/backwards-compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Released pytest versions support all Python versions that are actively maintaine
============== ===================
pytest version min. Python version
============== ===================
8.4+ 3.9+
8.0+ 3.8+
7.1+ 3.7+
6.2 - 7.0 3.6+
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -85,7 +84,7 @@ write_to = "src/_pytest/_version.py"

[tool.black]
target-version = [
'py38',
'py39',
]

[tool.ruff]
Expand Down Expand Up @@ -509,7 +508,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
Expand Down
2 changes: 1 addition & 1 deletion testing/code/test_excinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 4 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ 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
py39-freeze
docs
docs-checklinks

Expand Down Expand Up @@ -58,7 +57,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
Expand Down Expand Up @@ -178,7 +177,7 @@ commands =
pytest pytest_twisted_integration.py
pytest simple_integration.py --force-sugar --flakes

[testenv:py38-freeze]
[testenv:py39-freeze]
description =
test pytest frozen with `pyinstaller` under `{basepython}`
changedir = testing/freeze
Expand Down

0 comments on commit 72dcc7d

Please sign in to comment.