Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into raisesgroup
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Mar 3, 2025
2 parents 4e97652 + e18b245 commit 5186f36
Show file tree
Hide file tree
Showing 55 changed files with 903 additions and 199 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.6"
rev: "v0.9.7"
hooks:
- id: ruff
args: ["--fix"]
Expand Down
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Andras Tim
Andrea Cimatoribus
Andreas Motl
Andreas Zeidler
Andrew Pikul
Andrew Shapton
Andrey Paramonov
Andrzej Klajnert
Expand All @@ -43,6 +44,7 @@ Anthony Shaw
Anthony Sottile
Anton Grinevich
Anton Lodder
Anton Zhilin
Antony Lee
Arel Cordero
Arias Emmanuel
Expand Down Expand Up @@ -263,6 +265,7 @@ lovetheguitar
Lukas Bednar
Luke Murphy
Maciek Fijalkowski
Maggie Chung
Maho
Maik Figura
Mandeep Bhutani
Expand Down
1 change: 0 additions & 1 deletion changelog/10558.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/10829.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/11777.bugfix.rst

This file was deleted.

1 change: 1 addition & 0 deletions changelog/12081.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added :fixture:`capteesys` to capture AND pass output to next handler set by ``--capture=``.
1 change: 0 additions & 1 deletion changelog/12497.contrib.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/12592.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/12818.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/12849.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/12866.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/12888.bugfix.rst

This file was deleted.

1 change: 1 addition & 0 deletions changelog/12946.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed missing help for :mod:`pdb` commands wrapped by pytest -- by :user:`adamchainz`.
1 change: 0 additions & 1 deletion changelog/12966.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/13026.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/13053.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/13083.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/13112.contrib.rst

This file was deleted.

3 changes: 3 additions & 0 deletions changelog/13228.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:ref:`hidden-param` can now be used in ``id`` of :func:`pytest.param` or in
``ids`` of :py:func:`Metafunc.parametrize <pytest.Metafunc.parametrize>`.
It hides the parameter set from the test name.
1 change: 1 addition & 0 deletions changelog/13253.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +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`.
1 change: 0 additions & 1 deletion changelog/9353.bugfix.rst

This file was deleted.

2 changes: 2 additions & 0 deletions doc/en/announce/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Release announcements
:maxdepth: 2


release-8.3.5
release-8.3.4
release-8.3.3
release-8.3.2
release-8.3.1
Expand Down
30 changes: 30 additions & 0 deletions doc/en/announce/release-8.3.4.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pytest-8.3.4
=======================================

pytest 8.3.4 has just been released to PyPI.

This is a bug-fix release, being a drop-in replacement. To upgrade::

pip install --upgrade pytest

The full changelog is available at https://docs.pytest.org/en/stable/changelog.html.

Thanks to all of the contributors to this release:

* Bruno Oliveira
* Florian Bruhin
* Frank Hoffmann
* Jakob van Santen
* Leonardus Chen
* Pierre Sassoulas
* Pradeep Kumar
* Ran Benita
* Serge Smertin
* Stefaan Lippens
* Sviatoslav Sydorenko (Святослав Сидоренко)
* dongfangtianyu
* suspe


Happy testing,
The pytest Development Team
26 changes: 26 additions & 0 deletions doc/en/announce/release-8.3.5.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pytest-8.3.5
=======================================

pytest 8.3.5 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:

* Bruno Oliveira
* Florian Bruhin
* John Litborn
* Kenny Y
* Ran Benita
* Sadra Barikbin
* Vincent (Wen Yu) Ge
* delta87
* dongfangtianyu
* mwychung
* 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)


Happy testing,
The pytest Development Team
4 changes: 0 additions & 4 deletions doc/en/broken-dep-constraints.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# This file contains transitive dependencies that need to be pinned for some reason.
# Eventually this file will be empty, but in this case keep it around for future use.

# Pin towncrier temporarily due to incompatibility with sphinxcontrib-towncrier:
# https://github.com/sphinx-contrib/sphinxcontrib-towncrier/issues/92
towncrier<24.7
44 changes: 16 additions & 28 deletions doc/en/builtin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
Values can be any object handled by the json stdlib module.
capsysbinary -- .../_pytest/capture.py:1006
capsysbinary -- .../_pytest/capture.py:1024
Enable bytes capturing of writes to ``sys.stdout`` and ``sys.stderr``.
The captured output is made available via ``capsysbinary.readouterr()``
Expand All @@ -51,7 +51,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
captured = capsysbinary.readouterr()
assert captured.out == b"hello\n"
capfd -- .../_pytest/capture.py:1034
capfd -- .../_pytest/capture.py:1052
Enable text capturing of writes to file descriptors ``1`` and ``2``.
The captured output is made available via ``capfd.readouterr()`` method
Expand All @@ -69,7 +69,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
captured = capfd.readouterr()
assert captured.out == "hello\n"
capfdbinary -- .../_pytest/capture.py:1062
capfdbinary -- .../_pytest/capture.py:1080
Enable bytes capturing of writes to file descriptors ``1`` and ``2``.
The captured output is made available via ``capfd.readouterr()`` method
Expand All @@ -87,7 +87,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
captured = capfdbinary.readouterr()
assert captured.out == b"hello\n"
capsys -- .../_pytest/capture.py:978
capsys -- .../_pytest/capture.py:996
Enable text capturing of writes to ``sys.stdout`` and ``sys.stderr``.
The captured output is made available via ``capsys.readouterr()`` method
Expand Down Expand Up @@ -178,16 +178,11 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
Return a :class:`pytest.TempdirFactory` instance for the test session.
tmpdir -- .../_pytest/legacypath.py:305
Return a temporary directory path object which is unique to each test
function invocation, created as a sub directory of the base temporary
directory.
By default, a new base temporary directory is created each test session,
and old bases are removed after 3 sessions, to aid in debugging. If
``--basetemp`` is used then it is cleared each session. See
:ref:`temporary directory location and retention`.
The returned object is a `legacy_path`_ object.
Return a temporary directory (as `legacy_path`_ object)
which is unique to each test function invocation.
The temporary directory is created as a subdirectory
of the base temporary directory, with configurable retention,
as discussed in :ref:`temporary directory location and retention`.
.. note::
These days, it is preferred to use ``tmp_path``.
Expand Down Expand Up @@ -236,22 +231,15 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
See :ref:`warnings` for information on warning categories.
tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:242
tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:241
Return a :class:`pytest.TempPathFactory` instance for the test session.
tmp_path -- .../_pytest/tmpdir.py:257
Return a temporary directory path object which is unique to each test
function invocation, created as a sub directory of the base temporary
directory.
By default, a new base temporary directory is created each test session,
and old bases are removed after 3 sessions, to aid in debugging.
This behavior can be configured with :confval:`tmp_path_retention_count` and
:confval:`tmp_path_retention_policy`.
If ``--basetemp`` is used then it is cleared each session. See
:ref:`temporary directory location and retention`.
The returned object is a :class:`pathlib.Path` object.
tmp_path -- .../_pytest/tmpdir.py:256
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
of the base temporary directory, with configurable retention,
as discussed in :ref:`temporary directory location and retention`.
========================== no tests ran in 0.12s ===========================
Expand Down
82 changes: 82 additions & 0 deletions doc/en/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,88 @@ with advance notice in the **Deprecations** section of releases.

.. towncrier release notes start
pytest 8.3.5 (2025-03-02)
=========================

Bug fixes
---------

- `#11777 <https://github.com/pytest-dev/pytest/issues/11777>`_: Fixed issue where sequences were still being shortened even with ``-vv`` verbosity.


- `#12888 <https://github.com/pytest-dev/pytest/issues/12888>`_: Fixed broken input when using Python 3.13+ and a ``libedit`` build of Python, such as on macOS or with uv-managed Python binaries from the ``python-build-standalone`` project. This could manifest e.g. by a broken prompt when using ``Pdb``, or seeing empty inputs with manual usage of ``input()`` and suspended capturing.


- `#13026 <https://github.com/pytest-dev/pytest/issues/13026>`_: Fixed :class:`AttributeError` crash when using ``--import-mode=importlib`` when top-level directory same name as another module of the standard library.


- `#13053 <https://github.com/pytest-dev/pytest/issues/13053>`_: Fixed a regression in pytest 8.3.4 where, when using ``--import-mode=importlib``, a directory containing py file with the same name would cause an ``ImportError``


- `#13083 <https://github.com/pytest-dev/pytest/issues/13083>`_: Fixed issue where pytest could crash if one of the collected directories got removed during collection.



Improved documentation
----------------------

- `#12842 <https://github.com/pytest-dev/pytest/issues/12842>`_: Added dedicated page about using types with pytest.

See :ref:`types` for detailed usage.



Contributor-facing changes
--------------------------

- `#13112 <https://github.com/pytest-dev/pytest/issues/13112>`_: Fixed selftest failures in ``test_terminal.py`` with Pygments >= 2.19.0


- `#13256 <https://github.com/pytest-dev/pytest/issues/13256>`_: Support for Towncrier versions released in 2024 has been re-enabled
when building Sphinx docs -- by :user:`webknjaz`.


pytest 8.3.4 (2024-12-01)
=========================

Bug fixes
---------

- `#12592 <https://github.com/pytest-dev/pytest/issues/12592>`_: Fixed :class:`KeyError` crash when using ``--import-mode=importlib`` in a directory layout where a directory contains a child directory with the same name.


- `#12818 <https://github.com/pytest-dev/pytest/issues/12818>`_: Assertion rewriting now preserves the source ranges of the original instructions, making it play well with tools that deal with the ``AST``, like `executing <https://github.com/alexmojaki/executing>`__.


- `#12849 <https://github.com/pytest-dev/pytest/issues/12849>`_: ANSI escape codes for colored output now handled correctly in :func:`pytest.fail` with `pytrace=False`.


- `#9353 <https://github.com/pytest-dev/pytest/issues/9353>`_: :func:`pytest.approx` now uses strict equality when given booleans.



Improved documentation
----------------------

- `#10558 <https://github.com/pytest-dev/pytest/issues/10558>`_: Fix ambiguous docstring of :func:`pytest.Config.getoption`.


- `#10829 <https://github.com/pytest-dev/pytest/issues/10829>`_: Improve documentation on the current handling of the ``--basetemp`` option and its lack of retention functionality (:ref:`temporary directory location and retention`).


- `#12866 <https://github.com/pytest-dev/pytest/issues/12866>`_: Improved cross-references concerning the :fixture:`recwarn` fixture.


- `#12966 <https://github.com/pytest-dev/pytest/issues/12966>`_: Clarify :ref:`filterwarnings` docs on filter precedence/order when using multiple :ref:`@pytest.mark.filterwarnings <pytest.mark.filterwarnings ref>` marks.



Contributor-facing changes
--------------------------

- `#12497 <https://github.com/pytest-dev/pytest/issues/12497>`_: Fixed two failing pdb-related tests on Python 3.13.


pytest 8.3.3 (2024-09-09)
=========================

Expand Down
15 changes: 8 additions & 7 deletions doc/en/example/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ objects, they are still using the default pytest representation:
rootdir: /home/sweet/project
collected 8 items
<Dir parametrize.rst-204>
<Dir parametrize.rst-206>
<Module test_time.py>
<Function test_timedistance_v0[a0-b0-expected0]>
<Function test_timedistance_v0[a1-b1-expected1]>
Expand Down Expand Up @@ -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
<Dir parametrize.rst-204>
<Dir parametrize.rst-206>
<Module test_scenarios.py>
<Class TestSampleWithScenarios>
<Function test_demo1[basic]>
Expand Down Expand Up @@ -318,7 +318,7 @@ Let's first see how it looks like at collection time:
rootdir: /home/sweet/project
collected 2 items
<Dir parametrize.rst-204>
<Dir parametrize.rst-206>
<Module test_backends.py>
<Function test_db_initialized[d1]>
<Function test_db_initialized[d2]>
Expand Down Expand Up @@ -503,11 +503,12 @@ Running it results in some skips if we don't have all the python interpreters in
.. code-block:: pytest
. $ pytest -rs -q multipython.py
ssssssssssss...ssssssssssss [100%]
sssssssssssssssssssssssssss [100%]
========================= short test summary info ==========================
SKIPPED [12] multipython.py:67: 'python3.9' not found
SKIPPED [12] multipython.py:67: 'python3.11' not found
3 passed, 24 skipped in 0.12s
SKIPPED [9] multipython.py:67: 'python3.9' not found
SKIPPED [9] multipython.py:67: 'python3.10' not found
SKIPPED [9] multipython.py:67: 'python3.11' not found
27 skipped in 0.12s
Parametrization of optional implementations/imports
---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions doc/en/example/pythoncollection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ The test collection would look like this:
configfile: pytest.ini
collected 2 items
<Dir pythoncollection.rst-205>
<Dir pythoncollection.rst-207>
<Module check_myapp.py>
<Class CheckMyApp>
<Function simple_check>
Expand Down Expand Up @@ -215,7 +215,7 @@ You can always peek at the collection tree without running tests like this:
configfile: pytest.ini
collected 3 items
<Dir pythoncollection.rst-205>
<Dir pythoncollection.rst-207>
<Dir CWD>
<Module pythoncollection.py>
<Function test_function>
Expand Down
Loading

0 comments on commit 5186f36

Please sign in to comment.