Skip to content

Commit 69e78b7

Browse files
authored
Merge branch 'main' into bug-stopiteration-hook
2 parents 9af9742 + 544f589 commit 69e78b7

Some content is hidden

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

84 files changed

+4343
-731
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
- uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 0
33-
persist-credentials: false
33+
# persist-credentials is needed in order for us to push the release branch.
34+
persist-credentials: true
3435

3536
- name: Set up Python
3637
uses: actions/setup-python@v5
@@ -47,13 +48,15 @@ jobs:
4748
env:
4849
BRANCH: ${{ github.event.inputs.branch }}
4950
PRERELEASE: ${{ github.event.inputs.prerelease }}
51+
GH_TOKEN: ${{ github.token }}
5052
run: |
51-
tox -e prepare-release-pr -- "$BRANCH" ${{ github.token }} --prerelease="$PRERELEASE"
53+
tox -e prepare-release-pr -- "$BRANCH" --prerelease="$PRERELEASE"
5254
5355
- name: Prepare release PR (major release)
5456
if: github.event.inputs.major == 'yes'
5557
env:
5658
BRANCH: ${{ github.event.inputs.branch }}
5759
PRERELEASE: ${{ github.event.inputs.prerelease }}
60+
GH_TOKEN: ${{ github.token }}
5861
run: |
59-
tox -e prepare-release-pr -- "$BRANCH" ${{ github.token }} --major --prerelease="$PRERELEASE"
62+
tox -e prepare-release-pr -- "$BRANCH" --major --prerelease="$PRERELEASE"

.github/workflows/update-plugin-list.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
- name: Create Pull Request
5050
id: pr
51-
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
51+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
5252
with:
5353
commit-message: '[automated] Update plugin list'
5454
author: 'pytest bot <pytestbot@users.noreply.github.com>'

.pre-commit-config.yaml

Lines changed: 3 additions & 3 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.9.7"
3+
rev: "v0.11.2"
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.3.1
15+
rev: v1.5.2
1616
hooks:
1717
- id: zizmor
1818
- repo: https://github.com/adamchainz/blacken-docs
@@ -48,7 +48,7 @@ repos:
4848
# on <3.11
4949
- exceptiongroup>=1.0.0rc8
5050
- repo: https://github.com/tox-dev/pyproject-fmt
51-
rev: "v2.5.0"
51+
rev: "v2.5.1"
5252
hooks:
5353
- id: pyproject-fmt
5454
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Andras Tim
3232
Andrea Cimatoribus
3333
Andreas Motl
3434
Andreas Zeidler
35+
Andrew Pikul
3536
Andrew Shapton
3637
Andrey Paramonov
3738
Andrzej Klajnert
@@ -264,6 +265,7 @@ lovetheguitar
264265
Lukas Bednar
265266
Luke Murphy
266267
Maciek Fijalkowski
268+
Maggie Chung
267269
Maho
268270
Maik Figura
269271
Mandeep Bhutani

RELEASING.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ Both automatic and manual processes described above follow the same steps from t
137137
in https://github.com/pytest-dev/pytest/actions/workflows/deploy.yml, using the ``release-MAJOR.MINOR.PATCH`` branch
138138
as source.
139139

140+
Using the command-line::
141+
142+
$ gh workflow run deploy.yml -R pytest-dev/pytest --ref=release-{VERSION} -f version={VERSION}
143+
140144
This job will require approval from ``pytest-dev/core``, after which it will publish to PyPI
141145
and tag the repository.
142146

changelog/10558.doc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/10829.doc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/11538.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added :class:`pytest.RaisesGroup` as an equivalent to :func:`pytest.raises` for expecting :exc:`ExceptionGroup`. Also adds :class:`pytest.RaisesExc` which is now the logic behind :func:`pytest.raises` and used as parameter to :class:`pytest.RaisesGroup`. ``RaisesGroup`` includes the ability to specify multiple different expected exceptions, the structure of nested exception groups, and flags for emulating :ref:`except* <except_star>`. See :ref:`assert-matching-exception-groups` and docstrings for more information.

changelog/11777.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/12017.contrib.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Mixed internal improvements:
2+
3+
* Migrate formatting to f-strings in some tests.
4+
* Use type-safe constructs in JUnitXML tests.
5+
* Moved`` MockTiming`` into ``_pytest.timing``.
6+
7+
-- by :user:`RonnyPfannschmidt`

changelog/12081.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added :fixture:`capteesys` to capture AND pass output to next handler set by ``--capture=``.

changelog/12497.contrib.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/12504.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
:func:`pytest.mark.xfail` now accepts :class:`pytest.RaisesGroup` for the ``raises`` parameter when you expect an exception group. You can also pass a :class:`pytest.RaisesExc` if you e.g. want to make use of the ``check`` parameter.

changelog/12592.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/12818.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/12849.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/12866.doc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/12888.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/12966.doc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/13026.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/13053.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/13083.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/13112.contrib.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/13248.bugfix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed an issue where passing a ``scope`` in :py:func:`Metafunc.parametrize <pytest.Metafunc.parametrize>` with ``indirect=True``
2+
could result in other fixtures being unable to depend on the parametrized fixture.

changelog/13253.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
New flag: :ref:`--disable-plugin-autoload <disable_plugin_autoload>` which works as an alternative to :envvar:`PYTEST_DISABLE_PLUGIN_AUTOLOAD` when setting environment variables is inconvenient; and allows setting it in config files with :confval:`addopts`.

changelog/13256.contrib.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

changelog/13291.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed ``repr`` of ``attrs`` objects in assertion failure messages when using ``attrs>=25.2``.

changelog/13317.packaging.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Specified minimum allowed versions of ``colorama``, ``iniconfig``,
2+
and ``packaging``; and bumped the minimum allowed version
3+
of ``exceptiongroup`` for ``python_version<'3.11'`` from a release
4+
candidate to a full release.

changelog/9353.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

codecov.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ codecov:
66

77
coverage:
88
status:
9-
patch: true
9+
patch:
10+
default:
11+
target: 100% # require patches to be 100%
1012
project: false
1113
comment: false

doc/en/announce/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Release announcements
66
:maxdepth: 2
77

88

9+
release-8.3.5
10+
release-8.3.4
911
release-8.3.3
1012
release-8.3.2
1113
release-8.3.1

doc/en/announce/release-8.3.4.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
pytest-8.3.4
2+
=======================================
3+
4+
pytest 8.3.4 has just been released to PyPI.
5+
6+
This is a bug-fix release, being a drop-in replacement. To upgrade::
7+
8+
pip install --upgrade pytest
9+
10+
The full changelog is available at https://docs.pytest.org/en/stable/changelog.html.
11+
12+
Thanks to all of the contributors to this release:
13+
14+
* Bruno Oliveira
15+
* Florian Bruhin
16+
* Frank Hoffmann
17+
* Jakob van Santen
18+
* Leonardus Chen
19+
* Pierre Sassoulas
20+
* Pradeep Kumar
21+
* Ran Benita
22+
* Serge Smertin
23+
* Stefaan Lippens
24+
* Sviatoslav Sydorenko (Святослав Сидоренко)
25+
* dongfangtianyu
26+
* suspe
27+
28+
29+
Happy testing,
30+
The pytest Development Team

doc/en/announce/release-8.3.5.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
pytest-8.3.5
2+
=======================================
3+
4+
pytest 8.3.5 has just been released to PyPI.
5+
6+
This is a bug-fix release, being a drop-in replacement.
7+
8+
The full changelog is available at https://docs.pytest.org/en/stable/changelog.html.
9+
10+
Thanks to all of the contributors to this release:
11+
12+
* Bruno Oliveira
13+
* Florian Bruhin
14+
* John Litborn
15+
* Kenny Y
16+
* Ran Benita
17+
* Sadra Barikbin
18+
* Vincent (Wen Yu) Ge
19+
* delta87
20+
* dongfangtianyu
21+
* mwychung
22+
* 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
23+
24+
25+
Happy testing,
26+
The pytest Development Team

doc/en/builtin.rst

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
3333
3434
Values can be any object handled by the json stdlib module.
3535
36-
capsysbinary -- .../_pytest/capture.py:1006
36+
capsysbinary -- .../_pytest/capture.py:1024
3737
Enable bytes capturing of writes to ``sys.stdout`` and ``sys.stderr``.
3838
3939
The captured output is made available via ``capsysbinary.readouterr()``
@@ -51,7 +51,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
5151
captured = capsysbinary.readouterr()
5252
assert captured.out == b"hello\n"
5353
54-
capfd -- .../_pytest/capture.py:1034
54+
capfd -- .../_pytest/capture.py:1052
5555
Enable text capturing of writes to file descriptors ``1`` and ``2``.
5656
5757
The captured output is made available via ``capfd.readouterr()`` method
@@ -69,7 +69,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
6969
captured = capfd.readouterr()
7070
assert captured.out == "hello\n"
7171
72-
capfdbinary -- .../_pytest/capture.py:1062
72+
capfdbinary -- .../_pytest/capture.py:1080
7373
Enable bytes capturing of writes to file descriptors ``1`` and ``2``.
7474
7575
The captured output is made available via ``capfd.readouterr()`` method
@@ -87,7 +87,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
8787
captured = capfdbinary.readouterr()
8888
assert captured.out == b"hello\n"
8989
90-
capsys -- .../_pytest/capture.py:978
90+
capsys -- .../_pytest/capture.py:996
9191
Enable text capturing of writes to ``sys.stdout`` and ``sys.stderr``.
9292
9393
The captured output is made available via ``capsys.readouterr()`` method
@@ -178,16 +178,11 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
178178
Return a :class:`pytest.TempdirFactory` instance for the test session.
179179
180180
tmpdir -- .../_pytest/legacypath.py:305
181-
Return a temporary directory path object which is unique to each test
182-
function invocation, created as a sub directory of the base temporary
183-
directory.
184-
185-
By default, a new base temporary directory is created each test session,
186-
and old bases are removed after 3 sessions, to aid in debugging. If
187-
``--basetemp`` is used then it is cleared each session. See
188-
:ref:`temporary directory location and retention`.
189-
190-
The returned object is a `legacy_path`_ object.
181+
Return a temporary directory (as `legacy_path`_ object)
182+
which is unique to each test function invocation.
183+
The temporary directory is created as a subdirectory
184+
of the base temporary directory, with configurable retention,
185+
as discussed in :ref:`temporary directory location and retention`.
191186
192187
.. note::
193188
These days, it is preferred to use ``tmp_path``.
@@ -236,22 +231,15 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
236231
237232
See :ref:`warnings` for information on warning categories.
238233
239-
tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:242
234+
tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:241
240235
Return a :class:`pytest.TempPathFactory` instance for the test session.
241236
242-
tmp_path -- .../_pytest/tmpdir.py:257
243-
Return a temporary directory path object which is unique to each test
244-
function invocation, created as a sub directory of the base temporary
245-
directory.
246-
247-
By default, a new base temporary directory is created each test session,
248-
and old bases are removed after 3 sessions, to aid in debugging.
249-
This behavior can be configured with :confval:`tmp_path_retention_count` and
250-
:confval:`tmp_path_retention_policy`.
251-
If ``--basetemp`` is used then it is cleared each session. See
252-
:ref:`temporary directory location and retention`.
253-
254-
The returned object is a :class:`pathlib.Path` object.
237+
tmp_path -- .../_pytest/tmpdir.py:256
238+
Return a temporary directory (as :class:`pathlib.Path` object)
239+
which is unique to each test function invocation.
240+
The temporary directory is created as a subdirectory
241+
of the base temporary directory, with configurable retention,
242+
as discussed in :ref:`temporary directory location and retention`.
255243
256244
257245
========================== no tests ran in 0.12s ===========================

0 commit comments

Comments
 (0)