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: CHANGELOG.rst
+167Lines changed: 167 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,173 @@ with advance notice in the **Deprecations** section of releases.
18
18
19
19
.. towncrier release notes start
20
20
21
+
pytest 5.1.1 (2019-08-20)
22
+
=========================
23
+
24
+
Bug Fixes
25
+
---------
26
+
27
+
- `#5751 <https://github.com/pytest-dev/pytest/issues/5751>`_: Fixed ``TypeError`` when importing pytest on Python 3.5.0 and 3.5.1.
28
+
29
+
30
+
pytest 5.1.0 (2019-08-15)
31
+
=========================
32
+
33
+
Removals
34
+
--------
35
+
36
+
- `#5180 <https://github.com/pytest-dev/pytest/issues/5180>`_: As per our policy, the following features have been deprecated in the 4.X series and are now
37
+
removed:
38
+
39
+
* ``Request.getfuncargvalue``: use ``Request.getfixturevalue`` instead.
40
+
41
+
* ``pytest.raises`` and ``pytest.warns`` no longer support strings as the second argument.
42
+
43
+
* ``message`` parameter of ``pytest.raises``.
44
+
45
+
* ``pytest.raises``, ``pytest.warns`` and ``ParameterSet.param`` now use native keyword-only
46
+
syntax. This might change the exception message from previous versions, but they still raise
47
+
``TypeError`` on unknown keyword arguments as before.
48
+
49
+
* ``pytest.config`` global variable.
50
+
51
+
* ``tmpdir_factory.ensuretemp`` method.
52
+
53
+
* ``pytest_logwarning`` hook.
54
+
55
+
* ``RemovedInPytest4Warning`` warning type.
56
+
57
+
* ``request`` is now a reserved name for fixtures.
58
+
59
+
60
+
For more information consult
61
+
`Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`__ in the docs.
62
+
63
+
64
+
- `#5565 <https://github.com/pytest-dev/pytest/issues/5565>`_: Removed unused support code for `unittest2 <https://pypi.org/project/unittest2/>`__.
65
+
66
+
The ``unittest2`` backport module is no longer
67
+
necessary since Python 3.3+, and the small amount of code in pytest to support it also doesn't seem
68
+
to be used: after removed, all tests still pass unchanged.
69
+
70
+
Although our policy is to introduce a deprecation period before removing any features or support
71
+
for third party libraries, because this code is apparently not used
72
+
at all (even if ``unittest2`` is used by a test suite executed by pytest), it was decided to
73
+
remove it in this release.
74
+
75
+
If you experience a regression because of this, please
76
+
`file an issue <https://github.com/pytest-dev/pytest/issues/new>`__.
77
+
78
+
79
+
- `#5615 <https://github.com/pytest-dev/pytest/issues/5615>`_: ``pytest.fail``, ``pytest.xfail`` and ``pytest.skip`` no longer support bytes for the message argument.
80
+
81
+
This was supported for Python 2 where it was tempting to use ``"message"``
82
+
instead of ``u"message"``.
83
+
84
+
Python 3 code is unlikely to pass ``bytes`` to these functions. If you do,
85
+
please decode it to an ``str`` beforehand.
86
+
87
+
88
+
89
+
Features
90
+
--------
91
+
92
+
- `#5564 <https://github.com/pytest-dev/pytest/issues/5564>`_: New ``Config.invocation_args`` attribute containing the unchanged arguments passed to ``pytest.main()``.
93
+
94
+
95
+
- `#5576 <https://github.com/pytest-dev/pytest/issues/5576>`_: New `NUMBER <https://docs.pytest.org/en/latest/doctest.html#using-doctest-options>`__
96
+
option for doctests to ignore irrelevant differences in floating-point numbers.
97
+
Inspired by Sébastien Boisgérault's `numtest <https://github.com/boisgera/numtest>`__
98
+
extension for doctest.
99
+
100
+
101
+
102
+
Improvements
103
+
------------
104
+
105
+
- `#5471 <https://github.com/pytest-dev/pytest/issues/5471>`_: JUnit XML now includes a timestamp and hostname in the testsuite tag.
106
+
107
+
108
+
- `#5707 <https://github.com/pytest-dev/pytest/issues/5707>`_: Time taken to run the test suite now includes a human-readable representation when it takes over
109
+
60 seconds, for example::
110
+
111
+
===== 2 failed in 102.70s (0:01:42) =====
112
+
113
+
114
+
115
+
Bug Fixes
116
+
---------
117
+
118
+
- `#4344 <https://github.com/pytest-dev/pytest/issues/4344>`_: Fix RuntimeError/StopIteration when trying to collect package with "__init__.py" only.
119
+
120
+
121
+
- `#5115 <https://github.com/pytest-dev/pytest/issues/5115>`_: Warnings issued during ``pytest_configure`` are explicitly not treated as errors, even if configured as such, because it otherwise completely breaks pytest.
122
+
123
+
124
+
- `#5477 <https://github.com/pytest-dev/pytest/issues/5477>`_: The XML file produced by ``--junitxml`` now correctly contain a ``<testsuites>`` root element.
125
+
126
+
127
+
- `#5523 <https://github.com/pytest-dev/pytest/issues/5523>`_: Fixed using multiple short options together in the command-line (for example ``-vs``) in Python 3.8+.
128
+
129
+
130
+
- `#5524 <https://github.com/pytest-dev/pytest/issues/5524>`_: Fix issue where ``tmp_path`` and ``tmpdir`` would not remove directories containing files marked as read-only,
131
+
which could lead to pytest crashing when executed a second time with the ``--basetemp`` option.
132
+
133
+
134
+
- `#5537 <https://github.com/pytest-dev/pytest/issues/5537>`_: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the
135
+
standard library on Python 3.8+.
136
+
137
+
138
+
- `#5578 <https://github.com/pytest-dev/pytest/issues/5578>`_: Improve type checking for some exception-raising functions (``pytest.xfail``, ``pytest.skip``, etc)
139
+
so they provide better error messages when users meant to use marks (for example ``@pytest.xfail``
140
+
instead of ``@pytest.mark.xfail``).
141
+
142
+
143
+
- `#5606 <https://github.com/pytest-dev/pytest/issues/5606>`_: Fixed internal error when test functions were patched with objects that cannot be compared
144
+
for truth values against others, like ``numpy`` arrays.
145
+
146
+
147
+
- `#5634 <https://github.com/pytest-dev/pytest/issues/5634>`_: ``pytest.exit`` is now correctly handled in ``unittest`` cases.
148
+
This makes ``unittest`` cases handle ``quit`` from pytest's pdb correctly.
149
+
150
+
151
+
- `#5650 <https://github.com/pytest-dev/pytest/issues/5650>`_: Improved output when parsing an ini configuration file fails.
152
+
153
+
154
+
- `#5701 <https://github.com/pytest-dev/pytest/issues/5701>`_: Fix collection of ``staticmethod`` objects defined with ``functools.partial``.
155
+
156
+
157
+
- `#5734 <https://github.com/pytest-dev/pytest/issues/5734>`_: Skip async generator test functions, and update the warning message to refer to ``async def`` functions.
158
+
159
+
160
+
161
+
Improved Documentation
162
+
----------------------
163
+
164
+
- `#5669 <https://github.com/pytest-dev/pytest/issues/5669>`_: Add docstring for ``Testdir.copy_example``.
165
+
166
+
167
+
168
+
Trivial/Internal Changes
169
+
------------------------
170
+
171
+
- `#5095 <https://github.com/pytest-dev/pytest/issues/5095>`_: XML files of the ``xunit2`` family are now validated against the schema by pytest's own test suite
172
+
to avoid future regressions.
173
+
174
+
175
+
- `#5516 <https://github.com/pytest-dev/pytest/issues/5516>`_: Cache node splitting function which can improve collection performance in very large test suites.
176
+
177
+
178
+
- `#5603 <https://github.com/pytest-dev/pytest/issues/5603>`_: Simplified internal ``SafeRepr`` class and removed some dead code.
179
+
180
+
181
+
- `#5664 <https://github.com/pytest-dev/pytest/issues/5664>`_: When invoking pytest's own testsuite with ``PYTHONDONTWRITEBYTECODE=1``,
182
+
the ``test_xfail_handling`` test no longer fails.
183
+
184
+
185
+
- `#5684 <https://github.com/pytest-dev/pytest/issues/5684>`_: Replace manual handling of ``OSError.errno`` in the codebase by new ``OSError`` subclasses (``PermissionError``, ``FileNotFoundError``, etc.).
0 commit comments