From 70764bef4f0915c192213fc8c080a50221679982 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 28 Jul 2020 17:01:27 -0300 Subject: [PATCH] Merge pull request #7550 from pytest-dev/release-6.0.0 --- doc/en/announce/index.rst | 1 + doc/en/announce/release-6.0.0.rst | 40 ++++++++++++++ doc/en/builtin.rst | 13 +++-- doc/en/changelog.rst | 87 +++++++++++++++++++++++++++++++ doc/en/example/parametrize.rst | 4 +- doc/en/getting-started.rst | 2 +- doc/en/writing_plugins.rst | 7 +-- 7 files changed, 140 insertions(+), 14 deletions(-) create mode 100644 doc/en/announce/release-6.0.0.rst diff --git a/doc/en/announce/index.rst b/doc/en/announce/index.rst index 31deaad71..7d176aa06 100644 --- a/doc/en/announce/index.rst +++ b/doc/en/announce/index.rst @@ -6,6 +6,7 @@ Release announcements :maxdepth: 2 + release-6.0.0 release-6.0.0rc1 release-5.4.3 release-5.4.2 diff --git a/doc/en/announce/release-6.0.0.rst b/doc/en/announce/release-6.0.0.rst new file mode 100644 index 000000000..9706fe59b --- /dev/null +++ b/doc/en/announce/release-6.0.0.rst @@ -0,0 +1,40 @@ +pytest-6.0.0 +======================================= + +The pytest team is proud to announce the 6.0.0 release! + +pytest is a mature Python testing tool with more than 2000 tests +against itself, passing on many different interpreters and platforms. + +This release contains a number of bug fixes and improvements, so users are encouraged +to take a look at the CHANGELOG: + + https://docs.pytest.org/en/latest/changelog.html + +For complete documentation, please visit: + + https://docs.pytest.org/en/latest/ + +As usual, you can upgrade from PyPI via: + + pip install -U pytest + +Thanks to all who contributed to this release, among them: + +* Anthony Sottile +* Arvin Firouzi +* Bruno Oliveira +* Debi Mishra +* Garrett Thomas +* Hugo van Kemenade +* Kelton Bassingthwaite +* Kostis Anagnostopoulos +* Lewis Cowles +* Miro HronĨok +* Ran Benita +* Simon K +* Zac Hatfield-Dodds + + +Happy testing, +The pytest Development Team diff --git a/doc/en/builtin.rst b/doc/en/builtin.rst index 7864233fc..b33ee041d 100644 --- a/doc/en/builtin.rst +++ b/doc/en/builtin.rst @@ -69,11 +69,13 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a ... record_property - Add an extra properties the calling test. + Add extra properties to the calling test. + User properties become part of the test report and are available to the configured reporters, like JUnit XML. - The fixture is callable with ``(name, value)``, with value being automatically - xml-encoded. + + The fixture is callable with ``name, value``. The value is automatically + XML-encoded. Example:: @@ -82,8 +84,9 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a record_xml_attribute Add extra xml attributes to the tag for the calling test. - The fixture is callable with ``(name, value)``, with value being - automatically xml-encoded + + The fixture is callable with ``name, value``. The value is + automatically XML-encoded. record_testsuite_property [session scope] Records a new ```` tag as child of the root ````. This is suitable to diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 859dfea79..2ad8de212 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -28,6 +28,93 @@ with advance notice in the **Deprecations** section of releases. .. towncrier release notes start +pytest 6.0.0 (2020-07-28) +========================= + +(**Please see the full set of changes for this release also in the 6.0.0rc1 notes below**) + +Breaking Changes +---------------- + +- `#5584 `_: **PytestDeprecationWarning are now errors by default.** + + Following our plan to remove deprecated features with as little disruption as + possible, all warnings of type ``PytestDeprecationWarning`` now generate errors + instead of warning messages. + + **The affected features will be effectively removed in pytest 6.1**, so please consult the + `Deprecations and Removals `__ + section in the docs for directions on how to update existing code. + + In the pytest ``6.0.X`` series, it is possible to change the errors back into warnings as a + stopgap measure by adding this to your ``pytest.ini`` file: + + .. code-block:: ini + + [pytest] + filterwarnings = + ignore::pytest.PytestDeprecationWarning + + But this will stop working when pytest ``6.1`` is released. + + **If you have concerns** about the removal of a specific feature, please add a + comment to `#5584 `__. + + +- `#7472 `_: The ``exec_()`` and ``is_true()`` methods of ``_pytest._code.Frame`` have been removed. + + + +Features +-------- + +- `#7464 `_: Added support for :envvar:`NO_COLOR` and :envvar:`FORCE_COLOR` environment variables to control colored output. + + + +Improvements +------------ + +- `#7467 `_: ``--log-file`` CLI option and ``log_file`` ini marker now create subdirectories if needed. + + +- `#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. + + + +Bug Fixes +--------- + +- `#7392 `_: Fix the reported location of tests skipped with ``@pytest.mark.skip`` when ``--runxfail`` is used. + + +- `#7491 `_: :fixture:`tmpdir` and :fixture:`tmp_path` no longer raise an error if the lock to check for + stale temporary directories is not accessible. + + +- `#7517 `_: Preserve line endings when captured via ``capfd``. + + +- `#7534 `_: Restored the previous formatting of ``TracebackEntry.__str__`` which was changed by accident. + + + +Improved Documentation +---------------------- + +- `#7422 `_: Clarified when the ``usefixtures`` mark can apply fixtures to test. + + +- `#7441 `_: Add a note about ``-q`` option used in getting started guide. + + + +Trivial/Internal Changes +------------------------ + +- `#7389 `_: Fixture scope ``package`` is no longer considered experimental. + + pytest 6.0.0rc1 (2020-07-08) ============================ diff --git a/doc/en/example/parametrize.rst b/doc/en/example/parametrize.rst index 8fa48bfe3..f1c98d449 100644 --- a/doc/en/example/parametrize.rst +++ b/doc/en/example/parametrize.rst @@ -508,10 +508,10 @@ Running it results in some skips if we don't have all the python interpreters in .. code-block:: pytest . $ pytest -rs -q multipython.py - ssssssssssssssssssssssss... [100%] + ssssssssssss...ssssssssssss [100%] ========================= short test summary info ========================== SKIPPED [12] multipython.py:29: 'python3.5' not found - SKIPPED [12] multipython.py:29: 'python3.6' not found + SKIPPED [12] multipython.py:29: 'python3.7' not found 3 passed, 24 skipped in 0.12s Indirect parametrization of optional implementations/imports diff --git a/doc/en/getting-started.rst b/doc/en/getting-started.rst index 38adf68e0..a2f6daa39 100644 --- a/doc/en/getting-started.rst +++ b/doc/en/getting-started.rst @@ -28,7 +28,7 @@ Install ``pytest`` .. code-block:: bash $ pytest --version - pytest 6.0.0rc1 + pytest 6.0.0 .. _`simpletest`: diff --git a/doc/en/writing_plugins.rst b/doc/en/writing_plugins.rst index 27ef40e5b..cf4dbf99f 100644 --- a/doc/en/writing_plugins.rst +++ b/doc/en/writing_plugins.rst @@ -442,13 +442,8 @@ additionally it is possible to copy examples for an example folder before runnin $REGENDOC_TMPDIR/test_example.py:4: PytestExperimentalApiWarning: testdir.copy_example is an experimental api that may change over time testdir.copy_example("test_example.py") - test_example.py::test_plugin - $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. - See https://docs.pytest.org/en/stable/deprecations.html#terminalreporter-writer for more information. - return getattr(object, name, default) - -- Docs: https://docs.pytest.org/en/stable/warnings.html - ====================== 2 passed, 2 warnings in 0.12s ======================= + ======================= 2 passed, 1 warning in 0.12s ======================= For more information about the result object that ``runpytest()`` returns, and the methods that it provides please check out the :py:class:`RunResult