Skip to content

Commit 310b7d5

Browse files
authored
Merge branch 'main' into feature/doc-typing-12842
2 parents 1d944c4 + b938e70 commit 310b7d5

File tree

95 files changed

+902
-576
lines changed

Some content is hidden

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

95 files changed

+902
-576
lines changed

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

+1-1
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

+60-45
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,24 @@ jobs:
5454
fail-fast: false
5555
matrix:
5656
name: [
57-
"windows-py38",
58-
"windows-py38-pluggy",
59-
"windows-py39",
57+
"windows-py39-unittestextras",
58+
"windows-py39-pluggy",
59+
"windows-py39-xdist",
6060
"windows-py310",
6161
"windows-py311",
6262
"windows-py312",
6363
"windows-py313",
6464

65-
"ubuntu-py38",
66-
"ubuntu-py38-pluggy",
67-
"ubuntu-py38-freeze",
68-
"ubuntu-py39",
69-
"ubuntu-py310",
65+
"ubuntu-py39-lsof-numpy-pexpect",
66+
"ubuntu-py39-pluggy",
67+
"ubuntu-py39-freeze",
68+
"ubuntu-py39-xdist",
69+
"ubuntu-py310-xdist",
7070
"ubuntu-py311",
7171
"ubuntu-py312",
72-
"ubuntu-py313",
73-
"ubuntu-pypy3",
72+
"ubuntu-py313-pexpect",
73+
"ubuntu-pypy3-xdist",
7474

75-
"macos-py38",
7675
"macos-py39",
7776
"macos-py310",
7877
"macos-py312",
@@ -83,106 +82,122 @@ jobs:
8382
]
8483

8584
include:
86-
- name: "windows-py38"
87-
python: "3.8"
85+
- name: "windows-py39-unittestextras"
86+
python: "3.9"
8887
os: windows-latest
89-
tox_env: "py38-unittestextras"
88+
tox_env: "py39-unittestextras"
9089
use_coverage: true
91-
- name: "windows-py38-pluggy"
92-
python: "3.8"
90+
91+
- name: "windows-py39-pluggy"
92+
python: "3.9"
9393
os: windows-latest
94-
tox_env: "py38-pluggymain-pylib-xdist"
95-
- name: "windows-py39"
94+
tox_env: "py39-pluggymain-pylib-xdist"
95+
96+
- name: "windows-py39-xdist"
9697
python: "3.9"
9798
os: windows-latest
9899
tox_env: "py39-xdist"
100+
99101
- name: "windows-py310"
100102
python: "3.10"
101103
os: windows-latest
102104
tox_env: "py310-xdist"
105+
103106
- name: "windows-py311"
104107
python: "3.11"
105108
os: windows-latest
106109
tox_env: "py311"
110+
107111
- name: "windows-py312"
108112
python: "3.12"
109113
os: windows-latest
110114
tox_env: "py312"
115+
111116
- name: "windows-py313"
112-
python: "3.13-dev"
117+
python: "3.13"
113118
os: windows-latest
114119
tox_env: "py313"
115120

116-
- name: "ubuntu-py38"
117-
python: "3.8"
121+
122+
- name: "ubuntu-py39-lsof-numpy-pexpect"
123+
python: "3.9"
118124
os: ubuntu-latest
119-
tox_env: "py38-lsof-numpy-pexpect"
120-
use_coverage: true
121-
- name: "ubuntu-py38-pluggy"
122-
python: "3.8"
125+
tox_env: "py39-lsof-numpy-pexpect"
126+
127+
- name: "ubuntu-py39-pluggy"
128+
python: "3.9"
123129
os: ubuntu-latest
124-
tox_env: "py38-pluggymain-pylib-xdist"
125-
- name: "ubuntu-py38-freeze"
126-
python: "3.8"
130+
tox_env: "py39-pluggymain-pylib-xdist"
131+
132+
- name: "ubuntu-py39-freeze"
133+
python: "3.9"
127134
os: ubuntu-latest
128-
tox_env: "py38-freeze"
129-
- name: "ubuntu-py39"
135+
tox_env: "py39-freeze"
136+
137+
- name: "ubuntu-py39-xdist"
130138
python: "3.9"
131139
os: ubuntu-latest
132140
tox_env: "py39-xdist"
133-
- name: "ubuntu-py310"
141+
142+
- name: "ubuntu-py310-xdist"
134143
python: "3.10"
135144
os: ubuntu-latest
136145
tox_env: "py310-xdist"
146+
137147
- name: "ubuntu-py311"
138148
python: "3.11"
139149
os: ubuntu-latest
140150
tox_env: "py311"
141151
use_coverage: true
152+
142153
- name: "ubuntu-py312"
143154
python: "3.12"
144155
os: ubuntu-latest
145156
tox_env: "py312"
146157
use_coverage: true
147-
- name: "ubuntu-py313"
148-
python: "3.13-dev"
158+
159+
- name: "ubuntu-py313-pexpect"
160+
python: "3.13"
149161
os: ubuntu-latest
150162
tox_env: "py313-pexpect"
151163
use_coverage: true
152-
- name: "ubuntu-pypy3"
164+
165+
- name: "ubuntu-pypy3-xdist"
153166
python: "pypy-3.9"
154167
os: ubuntu-latest
155168
tox_env: "pypy3-xdist"
156169

157-
- name: "macos-py38"
158-
python: "3.8"
159-
os: macos-latest
160-
tox_env: "py38-xdist"
170+
161171
- name: "macos-py39"
162172
python: "3.9"
163173
os: macos-latest
164174
tox_env: "py39-xdist"
165175
use_coverage: true
176+
166177
- name: "macos-py310"
167178
python: "3.10"
168179
os: macos-latest
169180
tox_env: "py310-xdist"
181+
170182
- name: "macos-py312"
171183
python: "3.12"
172184
os: macos-latest
173185
tox_env: "py312-xdist"
186+
174187
- name: "macos-py313"
175-
python: "3.13-dev"
188+
python: "3.13"
176189
os: macos-latest
177190
tox_env: "py313-xdist"
178191

192+
179193
- name: "plugins"
180194
python: "3.12"
181195
os: ubuntu-latest
182196
tox_env: "plugins"
183197

198+
184199
- name: "doctesting"
185-
python: "3.8"
200+
python: "3.9"
186201
os: ubuntu-latest
187202
tox_env: "doctesting"
188203
use_coverage: true
@@ -192,12 +207,12 @@ jobs:
192207
contains(
193208
fromJSON(
194209
'[
195-
"windows-py38-pluggy",
210+
"windows-py39-pluggy",
196211
"windows-py313",
197-
"ubuntu-py38-pluggy",
198-
"ubuntu-py38-freeze",
212+
"ubuntu-py39-pluggy",
213+
"ubuntu-py39-freeze",
199214
"ubuntu-py313",
200-
"macos-py38",
215+
"macos-py39",
201216
"macos-py313"
202217
]'
203218
),
@@ -246,7 +261,7 @@ jobs:
246261

247262
- name: Upload coverage to Codecov
248263
if: "matrix.use_coverage"
249-
uses: codecov/codecov-action@v4
264+
uses: codecov/codecov-action@v5
250265
with:
251266
fail_ci_if_error: false
252267
files: ./coverage.xml

.pre-commit-config.yaml

+5-1
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.7.3"
3+
rev: "v0.7.4"
44
hooks:
55
- id: ruff
66
args: ["--fix"]
@@ -53,6 +53,10 @@ repos:
5353
rev: v3.19.0
5454
hooks:
5555
- id: pyupgrade
56+
args:
57+
- "--py39-plus"
58+
# Manual because ruff does what pyupgrade does and the two are not out of sync
59+
# often enough to make launching pyupgrade everytime worth it
5660
stages: [manual]
5761
- repo: local
5862
hooks:

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ Kristoffer Nordström
247247
Kyle Altendorf
248248
Lawrence Mitchell
249249
Lee Kamentsky
250+
Leonardus Chen
250251
Lev Maximov
251252
Levon Saldamli
252253
Lewis Cowles

CONTRIBUTING.rst

+1-1
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

+1-1
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/10839.deprecation.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Requesting an asynchronous fixture without a `pytest_fixture_setup` hook that resolves it will now give a DeprecationWarning. This most commonly happens if a sync test requests an async fixture. This should have no effect on a majority of users with async tests or fixtures using async pytest plugins, but may affect non-standard hook setups or ``autouse=True``. For guidance on how to work around this warning see :ref:`sync-test-async-fixture`.

changelog/12535.doc.rst

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
`This
2+
example`<https://docs.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures>
3+
showed ``print`` statements that do not exactly reflect what the
4+
different branches actually do. The fix makes the example more precise.

changelog/12849.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ANSI escape codes for colored output now handled correctly in :func:`pytest.fail` with `pytrace=False`.

changelog/12874.breaking.rst

+1
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).

changelog/12943.improvement.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If a test fails with an exceptiongroup with a single exception, the contained exception will now be displayed in the short test summary info.

changelog/12960.breaking.rst

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Test functions containing a yield now cause an explicit error. They have not been run since pytest 4.0, and were previously marked as an expected failure and deprecation warning.
2+
3+
See :ref:`the docs <yield tests deprecated>` for more information.

changelog/12966.doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify :ref:`filterwarnings` docs on filter precedence/order when using multiple :ref:`@pytest.mark.filterwarnings <pytest.mark.filterwarnings ref>` marks.

changelog/12981.bugfix.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Prevent exceptions in :func:`pytest.Config.add_cleanup` callbacks preventing further cleanups.

doc/en/backwards-compatibility.rst

+1
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+

0 commit comments

Comments
 (0)