You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/en/changelog.rst
+92
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,98 @@ with advance notice in the **Deprecations** section of releases.
28
28
29
29
.. towncrier release notes start
30
30
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.
0 commit comments