Skip to content

Commit df09a31

Browse files
authored
Merge pull request #7556 from nicoddemus/cherry-pick-release
Merge pull request #7550 from pytest-dev/release-6.0.0
2 parents 3802982 + 70764be commit df09a31

File tree

7 files changed

+140
-14
lines changed

7 files changed

+140
-14
lines changed

doc/en/announce/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Release announcements
66
:maxdepth: 2
77

88

9+
release-6.0.0
910
release-6.0.0rc1
1011
release-5.4.3
1112
release-5.4.2

doc/en/announce/release-6.0.0.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
pytest-6.0.0
2+
=======================================
3+
4+
The pytest team is proud to announce the 6.0.0 release!
5+
6+
pytest is a mature Python testing tool with more than 2000 tests
7+
against itself, passing on many different interpreters and platforms.
8+
9+
This release contains a number of bug fixes and improvements, so users are encouraged
10+
to take a look at the CHANGELOG:
11+
12+
https://docs.pytest.org/en/latest/changelog.html
13+
14+
For complete documentation, please visit:
15+
16+
https://docs.pytest.org/en/latest/
17+
18+
As usual, you can upgrade from PyPI via:
19+
20+
pip install -U pytest
21+
22+
Thanks to all who contributed to this release, among them:
23+
24+
* Anthony Sottile
25+
* Arvin Firouzi
26+
* Bruno Oliveira
27+
* Debi Mishra
28+
* Garrett Thomas
29+
* Hugo van Kemenade
30+
* Kelton Bassingthwaite
31+
* Kostis Anagnostopoulos
32+
* Lewis Cowles
33+
* Miro Hrončok
34+
* Ran Benita
35+
* Simon K
36+
* Zac Hatfield-Dodds
37+
38+
39+
Happy testing,
40+
The pytest Development Team

doc/en/builtin.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
6969
...
7070
7171
record_property
72-
Add an extra properties the calling test.
72+
Add extra properties to the calling test.
73+
7374
User properties become part of the test report and are available to the
7475
configured reporters, like JUnit XML.
75-
The fixture is callable with ``(name, value)``, with value being automatically
76-
xml-encoded.
76+
77+
The fixture is callable with ``name, value``. The value is automatically
78+
XML-encoded.
7779
7880
Example::
7981
@@ -82,8 +84,9 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
8284
8385
record_xml_attribute
8486
Add extra xml attributes to the tag for the calling test.
85-
The fixture is callable with ``(name, value)``, with value being
86-
automatically xml-encoded
87+
88+
The fixture is callable with ``name, value``. The value is
89+
automatically XML-encoded.
8790
8891
record_testsuite_property [session scope]
8992
Records a new ``<property>`` tag as child of the root ``<testsuite>``. This is suitable to

doc/en/changelog.rst

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,93 @@ with advance notice in the **Deprecations** section of releases.
2828

2929
.. towncrier release notes start
3030
31+
pytest 6.0.0 (2020-07-28)
32+
=========================
33+
34+
(**Please see the full set of changes for this release also in the 6.0.0rc1 notes below**)
35+
36+
Breaking Changes
37+
----------------
38+
39+
- `#5584 <https://github.com/pytest-dev/pytest/issues/5584>`_: **PytestDeprecationWarning are now errors by default.**
40+
41+
Following our plan to remove deprecated features with as little disruption as
42+
possible, all warnings of type ``PytestDeprecationWarning`` now generate errors
43+
instead of warning messages.
44+
45+
**The affected features will be effectively removed in pytest 6.1**, so please consult the
46+
`Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`__
47+
section in the docs for directions on how to update existing code.
48+
49+
In the pytest ``6.0.X`` series, it is possible to change the errors back into warnings as a
50+
stopgap measure by adding this to your ``pytest.ini`` file:
51+
52+
.. code-block:: ini
53+
54+
[pytest]
55+
filterwarnings =
56+
ignore::pytest.PytestDeprecationWarning
57+
58+
But this will stop working when pytest ``6.1`` is released.
59+
60+
**If you have concerns** about the removal of a specific feature, please add a
61+
comment to `#5584 <https://github.com/pytest-dev/pytest/issues/5584>`__.
62+
63+
64+
- `#7472 <https://github.com/pytest-dev/pytest/issues/7472>`_: The ``exec_()`` and ``is_true()`` methods of ``_pytest._code.Frame`` have been removed.
65+
66+
67+
68+
Features
69+
--------
70+
71+
- `#7464 <https://github.com/pytest-dev/pytest/issues/7464>`_: Added support for :envvar:`NO_COLOR` and :envvar:`FORCE_COLOR` environment variables to control colored output.
72+
73+
74+
75+
Improvements
76+
------------
77+
78+
- `#7467 <https://github.com/pytest-dev/pytest/issues/7467>`_: ``--log-file`` CLI option and ``log_file`` ini marker now create subdirectories if needed.
79+
80+
81+
- `#7489 <https://github.com/pytest-dev/pytest/issues/7489>`_: The :func:`pytest.raises` function has a clearer error message when ``match`` equals the obtained string but is not a regex match. In this case it is suggested to escape the regex.
82+
83+
84+
85+
Bug Fixes
86+
---------
87+
88+
- `#7392 <https://github.com/pytest-dev/pytest/issues/7392>`_: Fix the reported location of tests skipped with ``@pytest.mark.skip`` when ``--runxfail`` is used.
89+
90+
91+
- `#7491 <https://github.com/pytest-dev/pytest/issues/7491>`_: :fixture:`tmpdir` and :fixture:`tmp_path` no longer raise an error if the lock to check for
92+
stale temporary directories is not accessible.
93+
94+
95+
- `#7517 <https://github.com/pytest-dev/pytest/issues/7517>`_: Preserve line endings when captured via ``capfd``.
96+
97+
98+
- `#7534 <https://github.com/pytest-dev/pytest/issues/7534>`_: Restored the previous formatting of ``TracebackEntry.__str__`` which was changed by accident.
99+
100+
101+
102+
Improved Documentation
103+
----------------------
104+
105+
- `#7422 <https://github.com/pytest-dev/pytest/issues/7422>`_: Clarified when the ``usefixtures`` mark can apply fixtures to test.
106+
107+
108+
- `#7441 <https://github.com/pytest-dev/pytest/issues/7441>`_: Add a note about ``-q`` option used in getting started guide.
109+
110+
111+
112+
Trivial/Internal Changes
113+
------------------------
114+
115+
- `#7389 <https://github.com/pytest-dev/pytest/issues/7389>`_: Fixture scope ``package`` is no longer considered experimental.
116+
117+
31118
pytest 6.0.0rc1 (2020-07-08)
32119
============================
33120

doc/en/example/parametrize.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,10 @@ Running it results in some skips if we don't have all the python interpreters in
508508
.. code-block:: pytest
509509
510510
. $ pytest -rs -q multipython.py
511-
ssssssssssssssssssssssss... [100%]
511+
ssssssssssss...ssssssssssss [100%]
512512
========================= short test summary info ==========================
513513
SKIPPED [12] multipython.py:29: 'python3.5' not found
514-
SKIPPED [12] multipython.py:29: 'python3.6' not found
514+
SKIPPED [12] multipython.py:29: 'python3.7' not found
515515
3 passed, 24 skipped in 0.12s
516516
517517
Indirect parametrization of optional implementations/imports

doc/en/getting-started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Install ``pytest``
2828
.. code-block:: bash
2929
3030
$ pytest --version
31-
pytest 6.0.0rc1
31+
pytest 6.0.0
3232
3333
.. _`simpletest`:
3434

doc/en/writing_plugins.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,8 @@ additionally it is possible to copy examples for an example folder before runnin
442442
$REGENDOC_TMPDIR/test_example.py:4: PytestExperimentalApiWarning: testdir.copy_example is an experimental api that may change over time
443443
testdir.copy_example("test_example.py")
444444
445-
test_example.py::test_plugin
446-
$PYTHON_PREFIX/lib/python3.7/site-packages/_pytest/compat.py:340: PytestDeprecationWarning: The TerminalReporter.writer attribute is deprecated, use TerminalReporter._tw instead at your own risk.
447-
See https://docs.pytest.org/en/stable/deprecations.html#terminalreporter-writer for more information.
448-
return getattr(object, name, default)
449-
450445
-- Docs: https://docs.pytest.org/en/stable/warnings.html
451-
====================== 2 passed, 2 warnings in 0.12s =======================
446+
======================= 2 passed, 1 warning in 0.12s =======================
452447
453448
For more information about the result object that ``runpytest()`` returns, and
454449
the methods that it provides please check out the :py:class:`RunResult

0 commit comments

Comments
 (0)