Skip to content

Commit defa8cd

Browse files
Work in progress drop python 3.8
Refs #12874
1 parent 26215b8 commit defa8cd

File tree

9 files changed

+42
-49
lines changed

9 files changed

+42
-49
lines changed

.github/workflows/prepare-release-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Set up Python
3535
uses: actions/setup-python@v5
3636
with:
37-
python-version: "3.8"
37+
python-version: "3.x"
3838

3939
- name: Install dependencies
4040
run: |

.github/workflows/test.yml

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,23 @@ jobs:
5454
fail-fast: false
5555
matrix:
5656
name: [
57-
"windows-py38",
58-
"windows-py38-pluggy",
57+
"windows-py39-pluggy",
5958
"windows-py39",
6059
"windows-py310",
6160
"windows-py311",
6261
"windows-py312",
6362
"windows-py313",
6463

65-
"ubuntu-py38",
66-
"ubuntu-py38-pluggy",
67-
"ubuntu-py38-freeze",
64+
"ubuntu-py39-lsof-numpy-pexpect",
65+
"ubuntu-py39-pluggy",
66+
"ubuntu-py39-freeze",
6867
"ubuntu-py39",
6968
"ubuntu-py310",
7069
"ubuntu-py311",
7170
"ubuntu-py312",
7271
"ubuntu-py313",
7372
"ubuntu-pypy3",
7473

75-
"macos-py38",
7674
"macos-py39",
7775
"macos-py310",
7876
"macos-py312",
@@ -83,15 +81,15 @@ jobs:
8381
]
8482

8583
include:
86-
- name: "windows-py38"
87-
python: "3.8"
84+
- name: "windows-py39-unittestextras"
85+
python: "3.9"
8886
os: windows-latest
89-
tox_env: "py38-unittestextras"
87+
tox_env: "py39-unittestextras"
9088
use_coverage: true
91-
- name: "windows-py38-pluggy"
92-
python: "3.8"
89+
- name: "windows-py39-pluggy"
90+
python: "3.9"
9391
os: windows-latest
94-
tox_env: "py38-pluggymain-pylib-xdist"
92+
tox_env: "py39-pluggymain-pylib-xdist"
9593
- name: "windows-py39"
9694
python: "3.9"
9795
os: windows-latest
@@ -109,28 +107,27 @@ jobs:
109107
os: windows-latest
110108
tox_env: "py312"
111109
- name: "windows-py313"
112-
python: "3.13-dev"
110+
python: "3.13"
113111
os: windows-latest
114112
tox_env: "py313"
115113

116-
- name: "ubuntu-py38"
117-
python: "3.8"
114+
- name: "ubuntu-py39-lsof-numpy-pexpect"
115+
python: "3.9"
118116
os: ubuntu-latest
119-
tox_env: "py38-lsof-numpy-pexpect"
120-
use_coverage: true
121-
- name: "ubuntu-py38-pluggy"
122-
python: "3.8"
117+
tox_env: "py39-lsof-numpy-pexpect"
118+
- name: "ubuntu-py39-pluggy"
119+
python: "3.9"
123120
os: ubuntu-latest
124-
tox_env: "py38-pluggymain-pylib-xdist"
125-
- name: "ubuntu-py38-freeze"
126-
python: "3.8"
121+
tox_env: "py39-pluggymain-pylib-xdist"
122+
- name: "ubuntu-py39-freeze"
123+
python: "3.9"
127124
os: ubuntu-latest
128-
tox_env: "py38-freeze"
129-
- name: "ubuntu-py39"
125+
tox_env: "py39-freeze"
126+
- name: "ubuntu-py39-xdist"
130127
python: "3.9"
131128
os: ubuntu-latest
132129
tox_env: "py39-xdist"
133-
- name: "ubuntu-py310"
130+
- name: "ubuntu-py310-xdist"
134131
python: "3.10"
135132
os: ubuntu-latest
136133
tox_env: "py310-xdist"
@@ -145,7 +142,7 @@ jobs:
145142
tox_env: "py312"
146143
use_coverage: true
147144
- name: "ubuntu-py313"
148-
python: "3.13-dev"
145+
python: "3.13"
149146
os: ubuntu-latest
150147
tox_env: "py313-pexpect"
151148
use_coverage: true
@@ -154,10 +151,6 @@ jobs:
154151
os: ubuntu-latest
155152
tox_env: "pypy3-xdist"
156153

157-
- name: "macos-py38"
158-
python: "3.8"
159-
os: macos-latest
160-
tox_env: "py38-xdist"
161154
- name: "macos-py39"
162155
python: "3.9"
163156
os: macos-latest
@@ -172,7 +165,7 @@ jobs:
172165
os: macos-latest
173166
tox_env: "py312-xdist"
174167
- name: "macos-py313"
175-
python: "3.13-dev"
168+
python: "3.13"
176169
os: macos-latest
177170
tox_env: "py313-xdist"
178171

@@ -182,7 +175,7 @@ jobs:
182175
tox_env: "plugins"
183176

184177
- name: "doctesting"
185-
python: "3.8"
178+
python: "3.9"
186179
os: ubuntu-latest
187180
tox_env: "doctesting"
188181
use_coverage: true
@@ -192,12 +185,12 @@ jobs:
192185
contains(
193186
fromJSON(
194187
'[
195-
"windows-py38-pluggy",
188+
"windows-py39-pluggy",
196189
"windows-py313",
197-
"ubuntu-py38-pluggy",
198-
"ubuntu-py38-freeze",
190+
"ubuntu-py39-pluggy",
191+
"ubuntu-py39-freeze",
199192
"ubuntu-py313",
200-
"macos-py38",
193+
"macos-py39",
201194
"macos-py313"
202195
]'
203196
),

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ Here is a simple overview, with pytest-specific bits:
270270

271271
#. Run all the tests
272272

273-
You need to have Python 3.8 or later available in your system. Now
273+
You need to have Python 3.9 or later available in your system. Now
274274
running tests is as simple as issuing this command::
275275

276276
$ tox -e linting,py39

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Features
9797
- Can run `unittest <https://docs.pytest.org/en/stable/how-to/unittest.html>`_ (or trial)
9898
test suites out of the box
9999

100-
- Python 3.8+ or PyPy3
100+
- Python 3.9+ or PyPy3
101101

102102
- Rich plugin architecture, with over 1300+ `external plugins <https://docs.pytest.org/en/latest/reference/plugin_list.html>`_ and thriving community
103103

changelog/12874.breaking.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
We dropped support for python 3.8 following its end of life (2024-10-07)

doc/en/backwards-compatibility.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Released pytest versions support all Python versions that are actively maintaine
8383
============== ===================
8484
pytest version min. Python version
8585
============== ===================
86+
8.4+ 3.9+
8687
8.0+ 3.8+
8788
7.1+ 3.7+
8889
6.2 - 7.0 3.6+

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ authors = [
2323
{ name = "Florian Bruhin" },
2424
{ name = "Others (See AUTHORS)" },
2525
]
26-
requires-python = ">=3.8"
26+
requires-python = ">=3.9"
2727
classifiers = [
2828
"Development Status :: 6 - Mature",
2929
"Intended Audience :: Developers",
@@ -33,7 +33,6 @@ classifiers = [
3333
"Operating System :: POSIX",
3434
"Operating System :: Unix",
3535
"Programming Language :: Python :: 3 :: Only",
36-
"Programming Language :: Python :: 3.8",
3736
"Programming Language :: Python :: 3.9",
3837
"Programming Language :: Python :: 3.10",
3938
"Programming Language :: Python :: 3.11",
@@ -85,7 +84,7 @@ write_to = "src/_pytest/_version.py"
8584

8685
[tool.black]
8786
target-version = [
88-
'py38',
87+
'py39',
8988
]
9089

9190
[tool.ruff]
@@ -481,7 +480,7 @@ files = [
481480
mypy_path = [
482481
"src",
483482
]
484-
python_version = "3.8"
483+
python_version = "3.9"
485484
check_untyped_defs = true
486485
disallow_any_generics = true
487486
disallow_untyped_defs = true

testing/code/test_excinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ def raiseos():
965965
assert upframe is not None
966966
if upframe.f_code.co_name == "_makepath":
967967
# Only raise with expected calls, but not via e.g. inspect for
968-
# py38-windows.
968+
# py38-windows. (?)
969969
raised += 1
970970
raise OSError(2, "custom_oserror")
971971
return orig_path_cwd()

tox.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@ minversion = 3.20.0
44
distshare = {homedir}/.tox/distshare
55
envlist =
66
linting
7-
py38
87
py39
98
py310
109
py311
1110
py312
1211
py313
1312
pypy3
14-
py38-{pexpect,xdist,unittestextras,numpy,pluggymain,pylib}
13+
py39-{pexpect,xdist,unittestextras,numpy,pluggymain,pylib}
1514
doctesting
1615
doctesting-coverage
1716
plugins
18-
py38-freeze
17+
py39-freeze
1918
docs
2019
docs-checklinks
2120

@@ -58,7 +57,7 @@ setenv =
5857
PYTHONWARNDEFAULTENCODING=1
5958

6059
# Configuration to run with coverage similar to CI, e.g.
61-
# "tox -e py38-coverage".
60+
# "tox -e py39-coverage".
6261
coverage: _PYTEST_TOX_COVERAGE_RUN=coverage run -m
6362
coverage: _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
6463
coverage: COVERAGE_FILE={toxinidir}/.coverage
@@ -178,7 +177,7 @@ commands =
178177
pytest pytest_twisted_integration.py
179178
pytest simple_integration.py --force-sugar --flakes
180179

181-
[testenv:py38-freeze]
180+
[testenv:py39-freeze]
182181
description =
183182
test pytest frozen with `pyinstaller` under `{basepython}`
184183
changedir = testing/freeze

0 commit comments

Comments
 (0)