diff --git a/changelog/12444.bugfix.rst b/changelog/12444.bugfix.rst deleted file mode 100644 index d4e804ac613..00000000000 --- a/changelog/12444.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed :func:`pytest.approx` which now correctly takes into account :class:`~collections.abc.Mapping` keys order to compare them. diff --git a/changelog/12689.contrib.rst b/changelog/12689.contrib.rst deleted file mode 100644 index 81bb5577d97..00000000000 --- a/changelog/12689.contrib.rst +++ /dev/null @@ -1,5 +0,0 @@ -The test reports are now published to Codecov from GitHub Actions. -The test statistics is visible `on the web interface -`__. - --- by :user:`aleguy02` diff --git a/changelog/13388.doc.rst b/changelog/13388.doc.rst deleted file mode 100644 index bade402a60d..00000000000 --- a/changelog/13388.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Clarified documentation for ``-p`` vs ``PYTEST_PLUGINS`` plugin loading and fixed an incorrect ``-p`` example. diff --git a/changelog/13634.bugfix.rst b/changelog/13634.bugfix.rst deleted file mode 100644 index ee12aeafc3a..00000000000 --- a/changelog/13634.bugfix.rst +++ /dev/null @@ -1,5 +0,0 @@ -Blocking a ``conftest.py`` file using the ``-p no:`` option is now explicitly disallowed. - -Previously this resulted in an internal assertion failure during plugin loading. - -Pytest now raises a clear ``UsageError`` explaining that conftest files are not plugins and cannot be disabled via ``-p``. diff --git a/changelog/13731.doc.rst b/changelog/13731.doc.rst deleted file mode 100644 index 0cfdbebfc40..00000000000 --- a/changelog/13731.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Clarified that capture fixtures (e.g. ``capsys`` and ``capfd``) take precedence over the ``-s`` / ``--capture=no`` command-line options in :ref:`Accessing captured output from a test function `. diff --git a/changelog/13734.bugfix.rst b/changelog/13734.bugfix.rst deleted file mode 100644 index de1d7368cd4..00000000000 --- a/changelog/13734.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed crash when a test raises an exceptiongroup with ``__tracebackhide__ = True``. diff --git a/changelog/14088.doc.rst b/changelog/14088.doc.rst deleted file mode 100644 index 3f3a0963516..00000000000 --- a/changelog/14088.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Clarified that the default :hook:`pytest_collection` hook sets ``session.items`` before it calls :hook:`pytest_collection_finish`, not after. diff --git a/changelog/14195.bugfix.rst b/changelog/14195.bugfix.rst deleted file mode 100644 index 29ae149dd98..00000000000 --- a/changelog/14195.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed an issue where non-string messages passed to `unittest.TestCase.subTest()` were not printed. diff --git a/changelog/14255.doc.rst b/changelog/14255.doc.rst deleted file mode 100644 index b96d2c2a1b9..00000000000 --- a/changelog/14255.doc.rst +++ /dev/null @@ -1 +0,0 @@ -TOML integer log levels must be quoted: Updating reference documentation. diff --git a/changelog/14343.bugfix.rst b/changelog/14343.bugfix.rst deleted file mode 100644 index a52028d9f86..00000000000 --- a/changelog/14343.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed use of insecure temporary directory (CVE-2025-71176). diff --git a/doc/en/announce/index.rst b/doc/en/announce/index.rst index b92b8d4a56b..4a5e8b86544 100644 --- a/doc/en/announce/index.rst +++ b/doc/en/announce/index.rst @@ -6,6 +6,7 @@ Release announcements :maxdepth: 2 + release-9.0.3 release-9.0.2 release-9.0.1 release-9.0.0 diff --git a/doc/en/announce/release-9.0.3.rst b/doc/en/announce/release-9.0.3.rst new file mode 100644 index 00000000000..c9540218764 --- /dev/null +++ b/doc/en/announce/release-9.0.3.rst @@ -0,0 +1,38 @@ +pytest-9.0.3 +======================================= + +pytest 9.0.3 has just been released to PyPI. + +This is a bug-fix release, being a drop-in replacement. + +The full changelog is available at https://docs.pytest.org/en/stable/changelog.html. + +Thanks to all of the contributors to this release: + +* Aditya Giri +* Alejandro Villate +* Bruno Oliveira +* Bubble-Interface +* Charles-Meldhine Madi Mnemoi +* DavidAG +* Denis Cherednichenko +* Dr Alex Mitre +* Freya +* Freya Bruhin +* Hugo van Kemenade +* John Litborn +* Liam DeVoe +* Lily Wu +* Maxime Grenu +* Ran Benita +* Randy Döring +* Ronald Eddy Jr +* Samuel Newbold +* Tejas Verma +* Vladimir +* jxramos +* 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) + + +Happy testing, +The pytest Development Team diff --git a/doc/en/builtin.rst b/doc/en/builtin.rst index 6a96bb0a304..9d38b329454 100644 --- a/doc/en/builtin.rst +++ b/doc/en/builtin.rst @@ -257,10 +257,10 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a subtests -- .../_pytest/subtests.py:129 Provides subtests functionality. - tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:243 + tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:265 Return a :class:`pytest.TempPathFactory` instance for the test session. - tmp_path -- .../_pytest/tmpdir.py:258 + tmp_path -- .../_pytest/tmpdir.py:280 Return a temporary directory (as :class:`pathlib.Path` object) which is unique to each test function invocation. The temporary directory is created as a subdirectory diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index bcae26aa09b..5bcd44c4226 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -31,6 +31,58 @@ with advance notice in the **Deprecations** section of releases. .. towncrier release notes start +pytest 9.0.3 (2026-04-07) +========================= + +Bug fixes +--------- + +- `#12444 `_: Fixed :func:`pytest.approx` which now correctly takes into account :class:`~collections.abc.Mapping` keys order to compare them. + + +- `#13634 `_: Blocking a ``conftest.py`` file using the ``-p no:`` option is now explicitly disallowed. + + Previously this resulted in an internal assertion failure during plugin loading. + + Pytest now raises a clear ``UsageError`` explaining that conftest files are not plugins and cannot be disabled via ``-p``. + + +- `#13734 `_: Fixed crash when a test raises an exceptiongroup with ``__tracebackhide__ = True``. + + +- `#14195 `_: Fixed an issue where non-string messages passed to `unittest.TestCase.subTest()` were not printed. + + +- `#14343 `_: Fixed use of insecure temporary directory (CVE-2025-71176). + + + +Improved documentation +---------------------- + +- `#13388 `_: Clarified documentation for ``-p`` vs ``PYTEST_PLUGINS`` plugin loading and fixed an incorrect ``-p`` example. + + +- `#13731 `_: Clarified that capture fixtures (e.g. ``capsys`` and ``capfd``) take precedence over the ``-s`` / ``--capture=no`` command-line options in :ref:`Accessing captured output from a test function `. + + +- `#14088 `_: Clarified that the default :hook:`pytest_collection` hook sets ``session.items`` before it calls :hook:`pytest_collection_finish`, not after. + + +- `#14255 `_: TOML integer log levels must be quoted: Updating reference documentation. + + + +Contributor-facing changes +-------------------------- + +- `#12689 `_: The test reports are now published to Codecov from GitHub Actions. + The test statistics is visible `on the web interface + `__. + + -- by :user:`aleguy02` + + pytest 9.0.2 (2025-12-06) ========================= diff --git a/doc/en/example/parametrize.rst b/doc/en/example/parametrize.rst index b25b822618a..ae64a7c62d5 100644 --- a/doc/en/example/parametrize.rst +++ b/doc/en/example/parametrize.rst @@ -162,7 +162,7 @@ objects, they are still using the default pytest representation: rootdir: /home/sweet/project collected 8 items - + @@ -239,7 +239,7 @@ If you just collect tests you'll also nicely see 'advanced' and 'basic' as varia rootdir: /home/sweet/project collected 4 items - + @@ -318,7 +318,7 @@ Let's first see how it looks like at collection time: rootdir: /home/sweet/project collected 2 items - + diff --git a/doc/en/example/pythoncollection.rst b/doc/en/example/pythoncollection.rst index 26fdb68b08f..48ee2c8533f 100644 --- a/doc/en/example/pythoncollection.rst +++ b/doc/en/example/pythoncollection.rst @@ -142,7 +142,7 @@ The test collection would look like this: configfile: pytest.toml collected 2 items - + @@ -205,7 +205,7 @@ You can always peek at the collection tree without running tests like this: configfile: pytest.toml collected 3 items - + diff --git a/doc/en/getting-started.rst b/doc/en/getting-started.rst index 3ba30a90b34..76a4428c163 100644 --- a/doc/en/getting-started.rst +++ b/doc/en/getting-started.rst @@ -20,7 +20,7 @@ Install ``pytest`` .. code-block:: bash $ pytest --version - pytest 9.0.2 + pytest 9.0.3 .. _`simpletest`: diff --git a/doc/en/how-to/fixtures.rst b/doc/en/how-to/fixtures.rst index b37386525c6..2f554fb8c60 100644 --- a/doc/en/how-to/fixtures.rst +++ b/doc/en/how-to/fixtures.rst @@ -1423,7 +1423,7 @@ Running the above tests results in the following test IDs being used: rootdir: /home/sweet/project collected 12 items - +