Skip to content

Commit d9bf9db

Browse files
pytestbotbluetech
authored andcommitted
Prepare release version 7.4.0
[ran: made some fixups]
1 parent 64319db commit d9bf9db

23 files changed

+148
-42
lines changed

changelog/10831.bugfix.rst

-1
This file was deleted.

changelog/10872.improvement.rst

-1
This file was deleted.

changelog/10901.feature.rst

-2
This file was deleted.

changelog/10907.improvement.rst

-5
This file was deleted.

changelog/10940.improvement.rst

-3
This file was deleted.

changelog/10991.improvement.rst

-1
This file was deleted.

changelog/11005.improvement.rst

-1
This file was deleted.

changelog/11013.improvement.rst

-1
This file was deleted.

changelog/11031.trivial.rst

-1
This file was deleted.

changelog/11043.improvement.rst

-3
This file was deleted.

changelog/11068.bugfix.rst

-1
This file was deleted.

changelog/11081.improvement.rst

-7
This file was deleted.

changelog/11104.bugfix.rst

-3
This file was deleted.

changelog/1904.bugfix.rst

-1
This file was deleted.

changelog/7781.bugfix.rst

-1
This file was deleted.

changelog/8711.improvement.rst

-3
This file was deleted.

changelog/9146.doc.rst

-1
This file was deleted.

doc/en/announce/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Release announcements
66
:maxdepth: 2
77

88

9+
release-7.4.0
910
release-7.3.2
1011
release-7.3.1
1112
release-7.3.0

doc/en/announce/release-7.4.0.rst

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
pytest-7.4.0
2+
=======================================
3+
4+
The pytest team is proud to announce the 7.4.0 release!
5+
6+
This release contains new features, improvements, and bug fixes,
7+
the full list of changes is available in the changelog:
8+
9+
https://docs.pytest.org/en/stable/changelog.html
10+
11+
For complete documentation, please visit:
12+
13+
https://docs.pytest.org/en/stable/
14+
15+
As usual, you can upgrade from PyPI via:
16+
17+
pip install -U pytest
18+
19+
Thanks to all of the contributors to this release:
20+
21+
* Adam J. Stewart
22+
* Alessio Izzo
23+
* Alex
24+
* Alex Lambson
25+
* Brian Larsen
26+
* Bruno Oliveira
27+
* Bryan Ricker
28+
* Chris Mahoney
29+
* Facundo Batista
30+
* Florian Bruhin
31+
* Jarrett Keifer
32+
* Kenny Y
33+
* Miro Hrončok
34+
* Ran Benita
35+
* Roberto Aldera
36+
* Ronny Pfannschmidt
37+
* Sergey Kim
38+
* Stefanie Molin
39+
* Vijay Arora
40+
* Ville Skyttä
41+
* Zac Hatfield-Dodds
42+
* bzoracler
43+
* leeyueh
44+
* nondescryptid
45+
* theirix
46+
47+
48+
Happy testing,
49+
The pytest Development Team

doc/en/builtin.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
2222
cachedir: .pytest_cache
2323
rootdir: /home/sweet/project
2424
collected 0 items
25-
cache -- .../_pytest/cacheprovider.py:510
25+
cache -- .../_pytest/cacheprovider.py:528
2626
Return a cache object that can persist state between testing sessions.
2727
2828
cache.get(key, default)
@@ -119,7 +119,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
119119
120120
For more details: :ref:`doctest_namespace`.
121121
122-
pytestconfig [session scope] -- .../_pytest/fixtures.py:1360
122+
pytestconfig [session scope] -- .../_pytest/fixtures.py:1353
123123
Session-scoped fixture that returns the session's :class:`pytest.Config`
124124
object.
125125
@@ -196,7 +196,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
196196
197197
.. _legacy_path: https://py.readthedocs.io/en/latest/path.html
198198
199-
caplog -- .../_pytest/logging.py:498
199+
caplog -- .../_pytest/logging.py:570
200200
Access and control log capturing.
201201
202202
Captured logs are available through the following properties/methods::

doc/en/changelog.rst

+92
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,98 @@ with advance notice in the **Deprecations** section of releases.
2828

2929
.. towncrier release notes start
3030
31+
pytest 7.4.0 (2023-06-23)
32+
=========================
33+
34+
Features
35+
--------
36+
37+
- `#10901 <https://github.com/pytest-dev/pytest/issues/10901>`_: Added :func:`ExceptionInfo.from_exception() <pytest.ExceptionInfo.from_exception>`, a simpler way to create an :class:`~pytest.ExceptionInfo` from an exception.
38+
This can replace :func:`ExceptionInfo.from_exc_info() <pytest.ExceptionInfo.from_exc_info()>` for most uses.
39+
40+
41+
42+
Improvements
43+
------------
44+
45+
- `#10872 <https://github.com/pytest-dev/pytest/issues/10872>`_: Update test log report annotation to named tuple and fixed inconsistency in docs for :hook:`pytest_report_teststatus` hook.
46+
47+
48+
- `#10907 <https://github.com/pytest-dev/pytest/issues/10907>`_: When an exception traceback to be displayed is completely filtered out (by mechanisms such as ``__tracebackhide__``, internal frames, and similar), now only the exception string and the following message are shown:
49+
50+
"All traceback entries are hidden. Pass `--full-trace` to see hidden and internal frames.".
51+
52+
Previously, the last frame of the traceback was shown, even though it was hidden.
53+
54+
55+
- `#10940 <https://github.com/pytest-dev/pytest/issues/10940>`_: Improved verbose output (``-vv``) of ``skip`` and ``xfail`` reasons by performing text wrapping while leaving a clear margin for progress output.
56+
57+
Added ``TerminalReporter.wrap_write()`` as a helper for that.
58+
59+
60+
- `#10991 <https://github.com/pytest-dev/pytest/issues/10991>`_: Added handling of ``%f`` directive to print microseconds in log format options, such as ``log-date-format``.
61+
62+
63+
- `#11005 <https://github.com/pytest-dev/pytest/issues/11005>`_: Added the underlying exception to the cache provider's path creation and write warning messages.
64+
65+
66+
- `#11013 <https://github.com/pytest-dev/pytest/issues/11013>`_: Added warning when :confval:`testpaths` is set, but paths are not found by glob. In this case, pytest will fall back to searching from the current directory.
67+
68+
69+
- `#11043 <https://github.com/pytest-dev/pytest/issues/11043>`_: When `--confcutdir` is not specified, and there is no config file present, the conftest cutoff directory (`--confcutdir`) is now set to the :ref:`rootdir <rootdir>`.
70+
Previously in such cases, `conftest.py` files would be probed all the way to the root directory of the filesystem.
71+
If you are badly affected by this change, consider adding an empty config file to your desired cutoff directory, or explicitly set `--confcutdir`.
72+
73+
74+
- `#11081 <https://github.com/pytest-dev/pytest/issues/11081>`_: The :confval:`norecursedirs` check is now performed in a :hook:`pytest_ignore_collect` implementation, so plugins can affect it.
75+
76+
If after updating to this version you see that your `norecursedirs` setting is not being respected,
77+
it means that a conftest or a plugin you use has a bad `pytest_ignore_collect` implementation.
78+
Most likely, your hook returns `False` for paths it does not want to ignore,
79+
which ends the processing and doesn't allow other plugins, including pytest itself, to ignore the path.
80+
The fix is to return `None` instead of `False` for paths your hook doesn't want to ignore.
81+
82+
83+
- `#8711 <https://github.com/pytest-dev/pytest/issues/8711>`_: :func:`caplog.set_level() <pytest.LogCaptureFixture.set_level>` and :func:`caplog.at_level() <pytest.LogCaptureFixture.at_level>`
84+
will temporarily enable the requested ``level`` if ``level`` was disabled globally via
85+
``logging.disable(LEVEL)``.
86+
87+
88+
89+
Bug Fixes
90+
---------
91+
92+
- `#10831 <https://github.com/pytest-dev/pytest/issues/10831>`_: Terminal Reporting: Fixed bug when running in ``--tb=line`` mode where ``pytest.fail(pytrace=False)`` tests report ``None``.
93+
94+
95+
- `#11068 <https://github.com/pytest-dev/pytest/issues/11068>`_: Fixed the ``--last-failed`` whole-file skipping functionality ("skipped N files") for :ref:`non-python test files <non-python tests>`.
96+
97+
98+
- `#11104 <https://github.com/pytest-dev/pytest/issues/11104>`_: Fixed a regression in pytest 7.3.2 which caused to :confval:`testpaths` to be considered for loading initial conftests,
99+
even when it was not utilized (e.g. when explicit paths were given on the command line).
100+
Now the ``testpaths`` are only considered when they are in use.
101+
102+
103+
- `#1904 <https://github.com/pytest-dev/pytest/issues/1904>`_: Fixed traceback entries hidden with ``__tracebackhide__ = True`` still being shown for chained exceptions (parts after "... the above exception ..." message).
104+
105+
106+
- `#7781 <https://github.com/pytest-dev/pytest/issues/7781>`_: Fix writing non-encodable text to log file when using ``--debug``.
107+
108+
109+
110+
Improved Documentation
111+
----------------------
112+
113+
- `#9146 <https://github.com/pytest-dev/pytest/issues/9146>`_: Improved documentation for :func:`caplog.set_level() <pytest.LogCaptureFixture.set_level>`.
114+
115+
116+
117+
Trivial/Internal Changes
118+
------------------------
119+
120+
- `#11031 <https://github.com/pytest-dev/pytest/issues/11031>`_: Enhanced the CLI flag for ``-c`` to now include ``--config-file`` to make it clear that this flag applies to the usage of a custom config file.
121+
122+
31123
pytest 7.3.2 (2023-06-10)
32124
=========================
33125

doc/en/getting-started.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Install ``pytest``
2222
.. code-block:: bash
2323
2424
$ pytest --version
25-
pytest 7.3.2
25+
pytest 7.4.0
2626
2727
.. _`simpletest`:
2828

doc/en/reference/reference.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1923,9 +1923,9 @@ All the command-line flags can be obtained by running ``pytest --help``::
19231923
--strict-markers Markers not registered in the `markers` section of
19241924
the configuration file raise errors
19251925
--strict (Deprecated) alias to --strict-markers
1926-
-c, --config-file FILE
1926+
-c FILE, --config-file=FILE
19271927
Load configuration from `FILE` instead of trying to
1928-
locate one of the implicit configuration files
1928+
locate one of the implicit configuration files.
19291929
--continue-on-collection-errors
19301930
Force test execution even if collection errors occur
19311931
--rootdir=ROOTDIR Define root directory for tests. Can be relative

0 commit comments

Comments
 (0)