Skip to content

Commit 5799868

Browse files
authored
Merge branch 'main' into faulthandler-exit-on-timeout
2 parents d752ce9 + 6feed56 commit 5799868

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+625
-548
lines changed

.github/workflows/test.yml

Lines changed: 52 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,29 @@ jobs:
5656
fail-fast: false
5757
matrix:
5858
name: [
59-
"windows-py39-unittest-asynctest",
60-
"windows-py39-unittest-twisted24",
61-
"windows-py39-unittest-twisted25",
62-
"windows-py39-pluggy",
63-
"windows-py39-xdist",
64-
"windows-py310",
59+
"windows-py310-unittest-asynctest",
60+
"windows-py310-unittest-twisted24",
61+
"windows-py310-unittest-twisted25",
62+
"windows-py310-pluggy",
63+
"windows-py310-xdist",
6564
"windows-py311",
6665
"windows-py312",
6766
"windows-py313",
6867
"windows-py314",
6968

70-
"ubuntu-py39-unittest-asynctest",
71-
"ubuntu-py39-unittest-twisted24",
72-
"ubuntu-py39-unittest-twisted25",
73-
"ubuntu-py39-lsof-numpy-pexpect",
74-
"ubuntu-py39-pluggy",
75-
"ubuntu-py39-freeze",
76-
"ubuntu-py39-xdist",
69+
"ubuntu-py310-unittest-asynctest",
70+
"ubuntu-py310-unittest-twisted24",
71+
"ubuntu-py310-unittest-twisted25",
72+
"ubuntu-py310-lsof-numpy-pexpect",
73+
"ubuntu-py310-pluggy",
74+
"ubuntu-py310-freeze",
7775
"ubuntu-py310-xdist",
7876
"ubuntu-py311",
7977
"ubuntu-py312",
8078
"ubuntu-py313-pexpect",
8179
"ubuntu-py314",
8280
"ubuntu-pypy3-xdist",
8381

84-
"macos-py39",
8582
"macos-py310",
8683
"macos-py312",
8784
"macos-py313",
@@ -93,35 +90,31 @@ jobs:
9390

9491
include:
9592
# Use separate jobs for different unittest flavors (twisted, asynctest) to ensure proper coverage.
96-
- name: "windows-py39-unittest-asynctest"
97-
python: "3.9"
93+
- name: "windows-py310-unittest-asynctest"
94+
python: "3.10"
9895
os: windows-latest
99-
tox_env: "py39-asynctest"
96+
tox_env: "py310-asynctest"
10097
use_coverage: true
10198

102-
- name: "windows-py39-unittest-twisted24"
103-
python: "3.9"
99+
- name: "windows-py310-unittest-twisted24"
100+
python: "3.10"
104101
os: windows-latest
105-
tox_env: "py39-twisted24"
102+
tox_env: "py310-twisted24"
106103
use_coverage: true
107104

108-
- name: "windows-py39-unittest-twisted25"
109-
python: "3.9"
105+
- name: "windows-py310-unittest-twisted25"
106+
python: "3.10"
110107
os: windows-latest
111-
tox_env: "py39-twisted25"
108+
tox_env: "py310-twisted25"
112109
use_coverage: true
113110

114-
- name: "windows-py39-pluggy"
115-
python: "3.9"
116-
os: windows-latest
117-
tox_env: "py39-pluggymain-pylib-xdist"
118-
119-
- name: "windows-py39-xdist"
120-
python: "3.9"
111+
- name: "windows-py310-pluggy"
112+
python: "3.10"
121113
os: windows-latest
122-
tox_env: "py39-xdist"
114+
tox_env: "py310-pluggymain-pylib-xdist"
115+
xfail: true
123116

124-
- name: "windows-py310"
117+
- name: "windows-py310-xdist"
125118
python: "3.10"
126119
os: windows-latest
127120
tox_env: "py310-xdist"
@@ -140,51 +133,49 @@ jobs:
140133
python: "3.13"
141134
os: windows-latest
142135
tox_env: "py313"
136+
xfail: true
143137

144138
- name: "windows-py314"
145139
python: "3.14"
146140
os: windows-latest
147141
tox_env: "py314"
148142

149143
# Use separate jobs for different unittest flavors (twisted, asynctest) to ensure proper coverage.
150-
- name: "ubuntu-py39-unittest-asynctest"
151-
python: "3.9"
144+
- name: "ubuntu-py310-unittest-asynctest"
145+
python: "3.10"
152146
os: ubuntu-latest
153-
tox_env: "py39-asynctest"
147+
tox_env: "py310-asynctest"
154148
use_coverage: true
155149

156-
- name: "ubuntu-py39-unittest-twisted24"
157-
python: "3.9"
150+
- name: "ubuntu-py310-unittest-twisted24"
151+
python: "3.10"
158152
os: ubuntu-latest
159-
tox_env: "py39-twisted24"
153+
tox_env: "py310-twisted24"
160154
use_coverage: true
161155

162-
- name: "ubuntu-py39-unittest-twisted25"
163-
python: "3.9"
156+
- name: "ubuntu-py310-unittest-twisted25"
157+
python: "3.10"
164158
os: ubuntu-latest
165-
tox_env: "py39-twisted25"
159+
tox_env: "py310-twisted25"
166160
use_coverage: true
167161

168-
- name: "ubuntu-py39-lsof-numpy-pexpect"
169-
python: "3.9"
162+
- name: "ubuntu-py310-lsof-numpy-pexpect"
163+
python: "3.10"
170164
os: ubuntu-latest
171-
tox_env: "py39-lsof-numpy-pexpect"
165+
tox_env: "py310-lsof-numpy-pexpect"
172166
use_coverage: true
173167

174-
- name: "ubuntu-py39-pluggy"
175-
python: "3.9"
176-
os: ubuntu-latest
177-
tox_env: "py39-pluggymain-pylib-xdist"
178-
179-
- name: "ubuntu-py39-freeze"
180-
python: "3.9"
168+
- name: "ubuntu-py310-pluggy"
169+
python: "3.10"
181170
os: ubuntu-latest
182-
tox_env: "py39-freeze"
171+
tox_env: "py310-pluggymain-pylib-xdist"
172+
xfail: true
183173

184-
- name: "ubuntu-py39-xdist"
185-
python: "3.9"
174+
- name: "ubuntu-py310-freeze"
175+
python: "3.10"
186176
os: ubuntu-latest
187-
tox_env: "py39-xdist"
177+
tox_env: "py310-freeze"
178+
xfail: true
188179

189180
- name: "ubuntu-py310-xdist"
190181
python: "3.10"
@@ -208,6 +199,7 @@ jobs:
208199
os: ubuntu-latest
209200
tox_env: "py313-pexpect"
210201
use_coverage: true
202+
xfail: true
211203

212204
- name: "ubuntu-py314"
213205
python: "3.14"
@@ -216,21 +208,16 @@ jobs:
216208
use_coverage: true
217209

218210
- name: "ubuntu-pypy3-xdist"
219-
python: "pypy-3.9"
211+
python: "pypy-3.10"
220212
os: ubuntu-latest
221213
tox_env: "pypy3-xdist"
222214

223215

224-
- name: "macos-py39"
225-
python: "3.9"
226-
os: macos-latest
227-
tox_env: "py39-xdist"
228-
use_coverage: true
229-
230216
- name: "macos-py310"
231217
python: "3.10"
232218
os: macos-latest
233219
tox_env: "py310-xdist"
220+
xfail: true
234221

235222
- name: "macos-py312"
236223
python: "3.12"
@@ -241,6 +228,7 @@ jobs:
241228
python: "3.13"
242229
os: macos-latest
243230
tox_env: "py313-xdist"
231+
xfail: true
244232

245233
- name: "macos-py314"
246234
python: "3.14"
@@ -254,30 +242,12 @@ jobs:
254242

255243

256244
- name: "doctesting"
257-
python: "3.9"
245+
python: "3.10"
258246
os: ubuntu-latest
259247
tox_env: "doctesting"
260248
use_coverage: true
261249

262-
continue-on-error: >-
263-
${{
264-
contains(
265-
fromJSON(
266-
'[
267-
"windows-py39-pluggy",
268-
"windows-py313",
269-
"ubuntu-py39-pluggy",
270-
"ubuntu-py39-freeze",
271-
"ubuntu-py313",
272-
"macos-py39",
273-
"macos-py313"
274-
]'
275-
),
276-
matrix.name
277-
)
278-
&& true
279-
|| false
280-
}}
250+
continue-on-error: ${{ matrix.xfail && true || false }}
281251

282252
steps:
283253
- uses: actions/checkout@v5

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: "v0.12.12"
3+
rev: "v0.13.1"
44
hooks:
55
- id: ruff
66
args: ["--fix"]
@@ -12,7 +12,7 @@ repos:
1212
- id: end-of-file-fixer
1313
- id: check-yaml
1414
- repo: https://github.com/woodruffw/zizmor-pre-commit
15-
rev: v1.12.1
15+
rev: v1.13.0
1616
hooks:
1717
- id: zizmor
1818
- repo: https://github.com/adamchainz/blacken-docs
@@ -32,7 +32,7 @@ repos:
3232
hooks:
3333
- id: python-use-type-annotations
3434
- repo: https://github.com/pre-commit/mirrors-mypy
35-
rev: v1.17.1
35+
rev: v1.18.2
3636
hooks:
3737
- id: mypy
3838
files: ^(src/|testing/|scripts/)
@@ -76,7 +76,7 @@ repos:
7676
hooks:
7777
- id: pyupgrade
7878
args:
79-
- "--py39-plus"
79+
- "--py310-plus"
8080
# Manual because ruff does what pyupgrade does and the two are not out of sync
8181
# often enough to make launching pyupgrade everytime worth it
8282
stages: [manual]

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ Ilya Konstantinov
201201
Ionuț Turturică
202202
Isaac Virshup
203203
Israel Fruchter
204+
Israël Hallé
204205
Itxaso Aizpurua
205206
Iwan Briquemont
206207
Jaap Broekhuizen

CONTRIBUTING.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Short version
197197
#. Follow `PEP-8 <https://www.python.org/dev/peps/pep-0008/>`_ for naming.
198198
#. Tests are run using ``tox``::
199199

200-
tox -e linting,py39
200+
tox -e linting,py313
201201

202202
The test environments above are usually enough to cover most cases locally.
203203

@@ -269,24 +269,24 @@ Here is a simple overview, with pytest-specific bits:
269269

270270
#. Run all the tests
271271

272-
You need to have Python 3.9 or later available in your system. Now
272+
You need to have a supported Python version available in your system. Now
273273
running tests is as simple as issuing this command::
274274

275-
$ tox -e linting,py39
275+
$ tox -e linting,py
276276

277-
This command will run tests via the "tox" tool against Python 3.9
278-
and also perform "lint" coding-style checks.
277+
This command will run tests via the "tox" tool against your default Python
278+
version and also perform "lint" coding-style checks.
279279

280280
#. You can now edit your local working copy and run the tests again as necessary. Please follow `PEP-8 <https://www.python.org/dev/peps/pep-0008/>`_ for naming.
281281

282-
You can pass different options to ``tox``. For example, to run tests on Python 3.9 and pass options to pytest
282+
You can pass different options to ``tox``. For example, to run tests on Python 3.13 and pass options to pytest
283283
(e.g. enter pdb on failure) to pytest you can do::
284284

285-
$ tox -e py39 -- --pdb
285+
$ tox -e py313 -- --pdb
286286

287-
Or to only run tests in a particular test module on Python 3.9::
287+
Or to only run tests in a particular test module on Python 3.12::
288288

289-
$ tox -e py39 -- testing/test_config.py
289+
$ tox -e py312 -- testing/test_config.py
290290

291291

292292
When committing, ``pre-commit`` will re-format the files if necessary.

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.9+ or PyPy3
100+
- Python 3.10+ 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/13716.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a bug where a nonsensical invocation like ``pytest x.py[a]`` (a file cannot be parametrized) was silently treated as ``pytest x.py``. This is now a usage error.

changelog/13719.breaking.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support for Python 3.9 is dropped following its end of life.

changelog/13722.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a misleading assertion failure message when using :func:`pytest.approx` on mappings with differing lengths.

changelog/13732.improvement.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Previously, when filtering warnings, pytest would fail if the filter referenced a class that could not be imported. Now, this only outputs a message indicating the problem.

doc/en/example/.ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore = ["RUF059"]

0 commit comments

Comments
 (0)