diff --git a/changelog/13478.bugfix.rst b/changelog/13478.bugfix.rst deleted file mode 100644 index 1147ee54c9e..00000000000 --- a/changelog/13478.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed a crash when using :confval:`console_output_style` with ``times`` and a module is skipped. diff --git a/changelog/13480.contrib.rst b/changelog/13480.contrib.rst deleted file mode 100644 index 9079c6f6b5a..00000000000 --- a/changelog/13480.contrib.rst +++ /dev/null @@ -1 +0,0 @@ -Self-testing: fixed a few test failures when run with ``-Wdefault`` or a similar override. diff --git a/changelog/13530.bugfix.rst b/changelog/13530.bugfix.rst deleted file mode 100644 index 1a5ab365f12..00000000000 --- a/changelog/13530.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed a crash when using :func:`pytest.approx` and :class:`decimal.Decimal` instances with the :class:`decimal.FloatOperation` trap set. diff --git a/changelog/13547.contrib.rst b/changelog/13547.contrib.rst deleted file mode 100644 index d8a240c0506..00000000000 --- a/changelog/13547.contrib.rst +++ /dev/null @@ -1 +0,0 @@ -Self-testing: corrected expected message for ``test_doctest_unexpected_exception`` in Python ``3.14``. diff --git a/changelog/13549.bugfix.rst b/changelog/13549.bugfix.rst deleted file mode 100644 index e69f6a4d6cf..00000000000 --- a/changelog/13549.bugfix.rst +++ /dev/null @@ -1,3 +0,0 @@ -No longer evaluate type annotations in Python ``3.14`` when inspecting function signatures. - -This prevents crashes during module collection when modules do not explicitly use ``from __future__ import annotations`` and import types for annotations within a ``if TYPE_CHECKING:`` block. diff --git a/changelog/13559.bugfix.rst b/changelog/13559.bugfix.rst deleted file mode 100644 index 69036f784ac..00000000000 --- a/changelog/13559.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Added missing `int` and `float` variants to the `Literal` type annotation of the `type` parameter in :meth:`pytest.Parser.addini`. diff --git a/changelog/13563.bugfix.rst b/changelog/13563.bugfix.rst deleted file mode 100644 index 543552e20cf..00000000000 --- a/changelog/13563.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -:func:`pytest.approx` now only imports ``numpy`` if NumPy is already in ``sys.modules``. This fixes unconditional import behavior introduced in `8.4.0`. diff --git a/changelog/13577.doc.rst b/changelog/13577.doc.rst deleted file mode 100644 index 8d6db9ea983..00000000000 --- a/changelog/13577.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Clarify that ``pytest_generate_tests`` is discovered in test modules/classes; other hooks must be in ``conftest.py`` or plugins. diff --git a/changelog/13684.contrib.rst b/changelog/13684.contrib.rst deleted file mode 100644 index bb2f87f1710..00000000000 --- a/changelog/13684.contrib.rst +++ /dev/null @@ -1 +0,0 @@ -Make pytest's own testsuite insensitive to the presence of the ``CI`` environment variable -- by :user:`ogrisel`. diff --git a/doc/en/announce/index.rst b/doc/en/announce/index.rst index 2ed23eb1fbb..1cc8fbaf7c0 100644 --- a/doc/en/announce/index.rst +++ b/doc/en/announce/index.rst @@ -6,6 +6,7 @@ Release announcements :maxdepth: 2 + release-8.4.2 release-8.4.1 release-8.4.0 release-8.3.5 diff --git a/doc/en/announce/release-8.4.2.rst b/doc/en/announce/release-8.4.2.rst new file mode 100644 index 00000000000..58a842c4d4b --- /dev/null +++ b/doc/en/announce/release-8.4.2.rst @@ -0,0 +1,27 @@ +pytest-8.4.2 +======================================= + +pytest 8.4.2 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: + +* AD +* Aditi De +* Bruno Oliveira +* Florian Bruhin +* John Litborn +* Liam DeVoe +* Marc Mueller +* NayeemJohn +* Olivier Grisel +* Ran Benita +* bengartner +* 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) + + +Happy testing, +The pytest Development Team diff --git a/doc/en/builtin.rst b/doc/en/builtin.rst index 31c2fa9df06..ca350c5f3dd 100644 --- a/doc/en/builtin.rst +++ b/doc/en/builtin.rst @@ -142,7 +142,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a For more details: :ref:`doctest_namespace`. - pytestconfig [session scope] -- .../_pytest/fixtures.py:1424 + pytestconfig [session scope] -- .../_pytest/fixtures.py:1425 Session-scoped fixture that returns the session's :class:`pytest.Config` object. diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 63623de8aad..89f1c4e61b3 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -31,6 +31,49 @@ with advance notice in the **Deprecations** section of releases. .. towncrier release notes start +pytest 8.4.2 (2025-09-03) +========================= + +Bug fixes +--------- + +- `#13478 `_: Fixed a crash when using :confval:`console_output_style` with ``times`` and a module is skipped. + + +- `#13530 `_: Fixed a crash when using :func:`pytest.approx` and :class:`decimal.Decimal` instances with the :class:`decimal.FloatOperation` trap set. + + +- `#13549 `_: No longer evaluate type annotations in Python ``3.14`` when inspecting function signatures. + + This prevents crashes during module collection when modules do not explicitly use ``from __future__ import annotations`` and import types for annotations within a ``if TYPE_CHECKING:`` block. + + +- `#13559 `_: Added missing `int` and `float` variants to the `Literal` type annotation of the `type` parameter in :meth:`pytest.Parser.addini`. + + +- `#13563 `_: :func:`pytest.approx` now only imports ``numpy`` if NumPy is already in ``sys.modules``. This fixes unconditional import behavior introduced in `8.4.0`. + + + +Improved documentation +---------------------- + +- `#13577 `_: Clarify that ``pytest_generate_tests`` is discovered in test modules/classes; other hooks must be in ``conftest.py`` or plugins. + + + +Contributor-facing changes +-------------------------- + +- `#13480 `_: Self-testing: fixed a few test failures when run with ``-Wdefault`` or a similar override. + + +- `#13547 `_: Self-testing: corrected expected message for ``test_doctest_unexpected_exception`` in Python ``3.14``. + + +- `#13684 `_: Make pytest's own testsuite insensitive to the presence of the ``CI`` environment variable -- by :user:`ogrisel`. + + pytest 8.4.1 (2025-06-17) ========================= diff --git a/doc/en/example/parametrize.rst b/doc/en/example/parametrize.rst index 8e6479254bb..6374e0edb3d 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 01a8f48fdbf..2487e7b9d19 100644 --- a/doc/en/example/pythoncollection.rst +++ b/doc/en/example/pythoncollection.rst @@ -152,7 +152,7 @@ The test collection would look like this: configfile: pytest.ini collected 2 items - + @@ -215,7 +215,7 @@ You can always peek at the collection tree without running tests like this: configfile: pytest.ini collected 3 items - + diff --git a/doc/en/getting-started.rst b/doc/en/getting-started.rst index c5e9f708828..349711faaf4 100644 --- a/doc/en/getting-started.rst +++ b/doc/en/getting-started.rst @@ -22,7 +22,7 @@ Install ``pytest`` .. code-block:: bash $ pytest --version - pytest 8.4.1 + pytest 8.4.2 .. _`simpletest`: diff --git a/doc/en/how-to/fixtures.rst b/doc/en/how-to/fixtures.rst index 62ace745d43..7f1a7610bb8 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 - +