Skip to content

Commit 7d4d1ec

Browse files
authored
Merge pull request #9758 from pytest-dev/release-7.1.0
Prepare release 7.1.0
2 parents d306ec0 + 1dbffcc commit 7d4d1ec

22 files changed

+150
-59
lines changed

changelog/5192.improvement.rst

-3
This file was deleted.

changelog/8242.bugfix.rst

-3
This file was deleted.

changelog/8838.breaking.rst

-15
This file was deleted.

changelog/9362.improvement.rst

-1
This file was deleted.

changelog/9437.breaking.rst

-1
This file was deleted.

changelog/9493.bugfix.rst

-10
This file was deleted.

changelog/9536.improvement.rst

-1
This file was deleted.

changelog/9626.bugfix.rst

-3
This file was deleted.

changelog/9644.improvement.rst

-4
This file was deleted.

changelog/9645.bugfix.rst

-1
This file was deleted.

changelog/9678.improvement.rst

-3
This file was deleted.

changelog/9692.improvement.rst

-3
This file was deleted.

changelog/9708.bugfix.rst

-1
This file was deleted.

changelog/9730.bugfix.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.1.0
910
release-7.0.1
1011
release-7.0.0
1112
release-7.0.0rc1

doc/en/announce/release-7.1.0.rst

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
pytest-7.1.0
2+
=======================================
3+
4+
The pytest team is proud to announce the 7.1.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+
* Akuli
22+
* Andrew Svetlov
23+
* Anthony Sottile
24+
* Brett Holman
25+
* Bruno Oliveira
26+
* Chris NeJame
27+
* Dan Alvizu
28+
* Elijah DeLee
29+
* Emmanuel Arias
30+
* Fabian Egli
31+
* Florian Bruhin
32+
* Gabor Szabo
33+
* Hasan Ramezani
34+
* Hugo van Kemenade
35+
* Kian Meng, Ang
36+
* Kojo Idrissa
37+
* Masaru Tsuchiyama
38+
* Olga Matoula
39+
* P. L. Lim
40+
* Ran Benita
41+
* Tobias Deiminger
42+
* Yuval Shimon
43+
* eduardo naufel schettino
44+
* Éric
45+
46+
47+
Happy testing,
48+
The pytest Development Team

doc/en/builtin.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
6565
Fixture that returns a :py:class:`dict` that will be injected into the
6666
namespace of doctests.
6767
68-
pytestconfig [session scope] -- .../_pytest/fixtures.py:1365
68+
pytestconfig [session scope] -- .../_pytest/fixtures.py:1334
6969
Session-scoped fixture that returns the session's :class:`pytest.Config`
7070
object.
7171
@@ -134,7 +134,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
134134
135135
.. _legacy_path: https://py.readthedocs.io/en/latest/path.html
136136
137-
caplog -- .../_pytest/logging.py:483
137+
caplog -- .../_pytest/logging.py:487
138138
Access and control log capturing.
139139
140140
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.1.0 (2022-03-13)
32+
=========================
33+
34+
Breaking Changes
35+
----------------
36+
37+
- `#8838 <https://github.com/pytest-dev/pytest/issues/8838>`_: As per our policy, the following features have been deprecated in the 6.X series and are now
38+
removed:
39+
40+
* ``pytest._fillfuncargs`` function.
41+
42+
* ``pytest_warning_captured`` hook - use ``pytest_warning_recorded`` instead.
43+
44+
* ``-k -foobar`` syntax - use ``-k 'not foobar'`` instead.
45+
46+
* ``-k foobar:`` syntax.
47+
48+
* ``pytest.collect`` module - import from ``pytest`` directly.
49+
50+
For more information consult
51+
`Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`__ in the docs.
52+
53+
54+
- `#9437 <https://github.com/pytest-dev/pytest/issues/9437>`_: Dropped support for Python 3.6, which reached `end-of-life <https://devguide.python.org/#status-of-python-branches>`__ at 2021-12-23.
55+
56+
57+
58+
Improvements
59+
------------
60+
61+
- `#5192 <https://github.com/pytest-dev/pytest/issues/5192>`_: Fixed test output for some data types where ``-v`` would show less information.
62+
63+
Also, when showing diffs for sequences, ``-q`` would produce full diffs instead of the expected diff.
64+
65+
66+
- `#9362 <https://github.com/pytest-dev/pytest/issues/9362>`_: pytest now avoids specialized assert formatting when it is detected that the default ``__eq__`` is overridden in ``attrs`` or ``dataclasses``.
67+
68+
69+
- `#9536 <https://github.com/pytest-dev/pytest/issues/9536>`_: When ``-vv`` is given on command line, show skipping and xfail reasons in full instead of truncating them to fit the terminal width.
70+
71+
72+
- `#9644 <https://github.com/pytest-dev/pytest/issues/9644>`_: More information about the location of resources that led Python to raise :class:`ResourceWarning` can now
73+
be obtained by enabling :mod:`tracemalloc`.
74+
75+
See :ref:`resource-warnings` for more information.
76+
77+
78+
- `#9678 <https://github.com/pytest-dev/pytest/issues/9678>`_: More types are now accepted in the ``ids`` argument to ``@pytest.mark.parametrize``.
79+
Previously only `str`, `float`, `int` and `bool` were accepted;
80+
now `bytes`, `complex`, `re.Pattern`, `Enum` and anything with a `__name__` are also accepted.
81+
82+
83+
- `#9692 <https://github.com/pytest-dev/pytest/issues/9692>`_: :func:`pytest.approx` now raises a :class:`TypeError` when given an unordered sequence (such as :class:`set`).
84+
85+
Note that this implies that custom classes which only implement ``__iter__`` and ``__len__`` are no longer supported as they don't guarantee order.
86+
87+
88+
89+
Bug Fixes
90+
---------
91+
92+
- `#8242 <https://github.com/pytest-dev/pytest/issues/8242>`_: The deprecation of raising :class:`unittest.SkipTest` to skip collection of
93+
tests during the pytest collection phase is reverted - this is now a supported
94+
feature again.
95+
96+
97+
- `#9493 <https://github.com/pytest-dev/pytest/issues/9493>`_: Symbolic link components are no longer resolved in conftest paths.
98+
This means that if a conftest appears twice in collection tree, using symlinks, it will be executed twice.
99+
For example, given
100+
101+
tests/real/conftest.py
102+
tests/real/test_it.py
103+
tests/link -> tests/real
104+
105+
running ``pytest tests`` now imports the conftest twice, once as ``tests/real/conftest.py`` and once as ``tests/link/conftest.py``.
106+
This is a fix to match a similar change made to test collection itself in pytest 6.0 (see :pull:`6523` for details).
107+
108+
109+
- `#9626 <https://github.com/pytest-dev/pytest/issues/9626>`_: Fixed count of selected tests on terminal collection summary when there were errors or skipped modules.
110+
111+
If there were errors or skipped modules on collection, pytest would mistakenly subtract those from the selected count.
112+
113+
114+
- `#9645 <https://github.com/pytest-dev/pytest/issues/9645>`_: Fixed regression where ``--import-mode=importlib`` used together with :envvar:`PYTHONPATH` or :confval:`pythonpath` would cause import errors in test suites.
115+
116+
117+
- `#9708 <https://github.com/pytest-dev/pytest/issues/9708>`_: :fixture:`pytester` now requests a :fixture:`monkeypatch` fixture instead of creating one internally. This solves some issues with tests that involve pytest environment variables.
118+
119+
120+
- `#9730 <https://github.com/pytest-dev/pytest/issues/9730>`_: Malformed ``pyproject.toml`` files now produce a clearer error message.
121+
122+
31123
pytest 7.0.1 (2022-02-11)
32124
=========================
33125

doc/en/example/reportingdemo.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
155155
> assert [0, 1, 2] == [0, 1, 3]
156156
E assert [0, 1, 2] == [0, 1, 3]
157157
E At index 2 diff: 2 != 3
158-
E Use -v to get the full diff
158+
E Use -v to get more diff
159159
160160
failure_demo.py:63: AssertionError
161161
______________ TestSpecialisedExplanations.test_eq_list_long _______________
@@ -168,7 +168,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
168168
> assert a == b
169169
E assert [0, 0, 0, 0, 0, 0, ...] == [0, 0, 0, 0, 0, 0, ...]
170170
E At index 100 diff: 1 != 2
171-
E Use -v to get the full diff
171+
E Use -v to get more diff
172172
173173
failure_demo.py:68: AssertionError
174174
_________________ TestSpecialisedExplanations.test_eq_dict _________________
@@ -215,7 +215,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
215215
> assert [1, 2] == [1, 2, 3]
216216
E assert [1, 2] == [1, 2, 3]
217217
E Right contains one more item: 3
218-
E Use -v to get the full diff
218+
E Use -v to get more diff
219219
220220
failure_demo.py:77: AssertionError
221221
_________________ TestSpecialisedExplanations.test_in_list _________________

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.0.1
25+
pytest 7.1.0
2626
2727
.. _`simpletest`:
2828

doc/en/how-to/assert.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ if you run this module:
201201
E '1'
202202
E Extra items in the right set:
203203
E '5'
204-
E Use -v to get the full diff
204+
E Use -v to get more diff
205205
206206
test_assert2.py:4: AssertionError
207207
========================= short test summary info ==========================

doc/en/how-to/output.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Executing pytest normally gives us this output (we are skipping the header to fo
8484
> assert fruits1 == fruits2
8585
E AssertionError: assert ['banana', 'a...elon', 'kiwi'] == ['banana', 'a...elon', 'kiwi']
8686
E At index 2 diff: 'grapes' != 'orange'
87-
E Use -v to get the full diff
87+
E Use -v to get more diff
8888
8989
test_verbosity_example.py:8: AssertionError
9090
____________________________ test_numbers_fail _____________________________
@@ -99,7 +99,7 @@ Executing pytest normally gives us this output (we are skipping the header to fo
9999
E {'1': 1, '2': 2, '3': 3, '4': 4}
100100
E Right contains 4 more items:
101101
E {'10': 10, '20': 20, '30': 30, '40': 40}
102-
E Use -v to get the full diff
102+
E Use -v to get more diff
103103
104104
test_verbosity_example.py:14: AssertionError
105105
___________________________ test_long_text_fail ____________________________

0 commit comments

Comments
 (0)