Skip to content

Commit 80078e1

Browse files
authored
Merge branch 'main' into feat/tests-with-uv
2 parents 576f3a4 + 5eaad82 commit 80078e1

Some content is hidden

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

69 files changed

+2678
-911
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
persist-credentials: true
5151

5252
- name: Download Package
53-
uses: actions/download-artifact@v5
53+
uses: actions/download-artifact@v6
5454
with:
5555
name: Packages
5656
path: dist
@@ -86,7 +86,7 @@ jobs:
8686
persist-credentials: false
8787

8888
- name: Download Package
89-
uses: actions/download-artifact@v5
89+
uses: actions/download-artifact@v6
9090
with:
9191
name: Packages
9292
path: dist

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ jobs:
256256
persist-credentials: false
257257

258258
- name: Download Package
259-
uses: actions/download-artifact@v5
259+
uses: actions/download-artifact@v6
260260
with:
261261
name: Packages
262262
path: dist

.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.14.1"
3+
rev: "v0.14.2"
44
hooks:
55
- id: ruff-check
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.15.2
15+
rev: v1.16.0
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/RobertCraigie/pyright-python
51-
rev: v1.1.406
51+
rev: v1.1.407
5252
hooks:
5353
- id: pyright
5454
files: ^(src/|scripts/)

CONTRIBUTING.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Short version
203203

204204
#. Write a ``changelog`` entry: ``changelog/2574.bugfix.rst``, use issue id number
205205
and one of ``feature``, ``improvement``, ``bugfix``, ``doc``, ``deprecation``,
206-
``breaking``, ``vendor`` or ``trivial`` for the issue type.
206+
``breaking``, ``vendor``, ``packaging``, ``contrib``, or ``misc`` for the issue type.
207207

208208

209209
#. Unless your change is a trivial or a documentation fix (e.g., a typo or reword of a small section) please
@@ -305,8 +305,9 @@ Here is a simple overview, with pytest-specific bits:
305305

306306
#. Create a new changelog entry in ``changelog``. The file should be named ``<issueid>.<type>.rst``,
307307
where *issueid* is the number of the issue related to the change and *type* is one of
308-
``feature``, ``improvement``, ``bugfix``, ``doc``, ``deprecation``, ``breaking``, ``vendor``
309-
or ``trivial``. You may skip creating the changelog entry if the change doesn't affect the
308+
``feature``, ``improvement``, ``bugfix``, ``doc``, ``deprecation``, ``breaking``, ``vendor``,
309+
``packaging``, ``contrib``, or ``misc``.
310+
You may skip creating the changelog entry if the change doesn't affect the
310311
documented behaviour of pytest.
311312

312313
#. Add yourself to ``AUTHORS`` file if not there yet, in alphabetical order.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ To execute it::
7979
========================== 1 failed in 0.04 seconds ===========================
8080

8181

82-
Due to ``pytest``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <https://docs.pytest.org/en/stable/getting-started.html#our-first-test-run>`_ for more examples.
82+
Thanks to ``pytest``'s detailed assertion introspection, you can simply use plain ``assert`` statements. See `getting-started <https://docs.pytest.org/en/stable/getting-started.html#our-first-test-run>`_ for more examples.
8383

8484

8585
Features

changelog/13537.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug in which ExceptionGroup with only Skipped exceptions in teardown was not handled correctly and showed as error.

changelog/13743.feature.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Added support for native TOML configuration files.
2+
3+
While pytest, since version 6, supports configuration in ``pyproject.toml`` files under ``[tool.pytest.ini_options]``,
4+
it does so in an "INI compatibility mode", where all configuration values are treated as strings or list of strings.
5+
Now, pytest supports the native TOML data model.
6+
7+
In ``pyproject.toml``, the native TOML configuration is under the ``[tool.pytest]`` table.
8+
9+
.. code-block:: toml
10+
11+
# pyproject.toml
12+
[tool.pytest]
13+
minversion = "9.0"
14+
addopts = ["-ra", "-q"]
15+
testpaths = [
16+
"tests",
17+
"integration",
18+
]
19+
20+
The ``[tool.pytest.ini_options]`` table remains supported, but both tables cannot be used at the same time.
21+
22+
If you prefer to use a separate configuration file, or don't use ``pyproject.toml``, you can use ``pytest.toml`` or ``.pytest.toml``:
23+
24+
.. code-block:: toml
25+
26+
# pytest.toml or .pytest.toml
27+
[pytest]
28+
minversion = "9.0"
29+
addopts = ["-ra", "-q"]
30+
testpaths = [
31+
"tests",
32+
"integration",
33+
]
34+
35+
The documentation now shows configuration snippets in both TOML and INI formats, in a tabbed interface.
36+
37+
See :ref:`config file formats` for full details.

changelog/13823.feature.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Added a :confval:`strict` configuration option to enable all strictness-related options.
2+
3+
When set to ``true``, the :confval:`strict` option currently enables
4+
5+
* :confval:`strict_config`
6+
* :confval:`strict_markers`
7+
* :confval:`strict_parametrization_ids`
8+
* :confval:`strict_xfail`
9+
10+
The individual strictness options can be explicitly set to override the global :confval:`strict` setting.
11+
12+
The previously-deprecated ``--strict`` command-line flag now enables strict mode.
13+
14+
If pytest adds new strictness options in the future, they will also be enabled in strict mode.
15+
Therefore, you should only enable strict mode if you use a pinned/locked version of pytest,
16+
or if you want to proactively adopt new strictness options as they are added.
17+
18+
See :ref:`strict mode` for more details.

changelog/13823.improvement.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Added :confval:`strict_xfail` as an alias to the ``xfail_strict`` option,
2+
:confval:`strict_config` as an alias to the ``--strict-config`` flag,
3+
and :confval:`strict_markers` as an alias to the ``--strict-markers`` flag.
4+
This makes all strictness options consistently have configuration options with the prefix ``strict_``.

changelog/13841.contrib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``tox>=4`` is now required when contributing to pytest.

0 commit comments

Comments
 (0)