Skip to content

Commit

Permalink
Preparing release version 3.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Sep 5, 2018
1 parent 69b34f7 commit 1f20626
Show file tree
Hide file tree
Showing 20 changed files with 145 additions and 61 deletions.
84 changes: 84 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,90 @@ with advance notice in the **Deprecations** section of releases.
.. towncrier release notes start
pytest 3.8.0 (2018-09-05)
=========================

Deprecations and Removals
-------------------------

- `#2452 <https://github.com/pytest-dev/pytest/issues/2452>`_: ``Config.warn`` has been deprecated, it should be replaced by calls to the standard ``warnings.warn``.

``Node.warn`` now supports two signatures:

* ``node.warn(PytestWarning("some message"))``: is now the recommended way to call this function. The warning
instance must be a ``PytestWarning`` or subclass instance.

* ``node.warn("CI", "some message")``: this code/message form is now deprecated and should be converted to
the warning instance form above.

``RemovedInPytest4Warning`` and ``PytestExperimentalApiWarning`` are now part of the public API and should be accessed
using ``pytest.RemovedInPytest4Warning`` and ``pytest.PytestExperimentalApiWarning``.


- `#3936 <https://github.com/pytest-dev/pytest/issues/3936>`_: ``@pytest.mark.filterwarnings`` second parameter is no longer regex-escaped,
making it possible to actually use regular expressions to check the warning message.

**Note**: regex-escaping the match string was an implementation oversight that might break test suites which depend
on the old behavior.



Features
--------

- `#2452 <https://github.com/pytest-dev/pytest/issues/2452>`_: Internal pytest warnings are now issued using the standard ``warnings`` module, making it possible to use
the standard warnings filters to manage those warnings. This introduces ``PytestWarning``,
``PytestDeprecationWarning`` and ``RemovedInPytest4Warning`` warning types as part of the public API.

Consult `the documentation <https://docs.pytest.org/en/latest/warnings.html#internal-pytest-warnings>`_ for more info.


- `#2908 <https://github.com/pytest-dev/pytest/issues/2908>`_: ``DeprecationWarning`` and ``PendingDeprecationWarning`` are now shown by default if no other warning filter is
configured. This makes pytest more compliant with
`PEP-0506 <https://www.python.org/dev/peps/pep-0565/#recommended-filter-settings-for-test-runners>`_. See
`the docs <https://docs.pytest.org/en/latest/warnings.html#deprecationwarning-and-pendingdeprecationwarning>`_ for
more info.


- `#3784 <https://github.com/pytest-dev/pytest/issues/3784>`_: Add option to disable plugin auto-loading.


- `#3829 <https://github.com/pytest-dev/pytest/issues/3829>`_: Added the ``count`` option to ``console_output_style`` to enable displaying the progress as a count instead of a percentage.


- `#3837 <https://github.com/pytest-dev/pytest/issues/3837>`_: Added support for 'xfailed' and 'xpassed' outcomes to the ``pytester.RunResult.assert_outcomes`` signature.



Bug Fixes
---------

- `#3911 <https://github.com/pytest-dev/pytest/issues/3911>`_: Terminal writer now takes into account unicode character width when writing out progress.


- `#3913 <https://github.com/pytest-dev/pytest/issues/3913>`_: Pytest now returns with correct exit code (EXIT_USAGEERROR, 4) when called with unknown arguments.


- `#3918 <https://github.com/pytest-dev/pytest/issues/3918>`_: Improve performance of assertion rewriting.



Improved Documentation
----------------------

- `#3566 <https://github.com/pytest-dev/pytest/issues/3566>`_: Added a blurb in usage.rst for the usage of -r flag which is used to show an extra test summary info.


- `#3907 <https://github.com/pytest-dev/pytest/issues/3907>`_: Corrected type of the exceptions collection passed to ``xfail``: ``raises`` argument accepts a ``tuple`` instead of ``list``.



Trivial/Internal Changes
------------------------

- `#3853 <https://github.com/pytest-dev/pytest/issues/3853>`_: Removed ``"run all (no recorded failures)"`` message printed with ``--failed-first`` and ``--last-failed`` when there are no failed tests.


pytest 3.7.4 (2018-08-29)
=========================

Expand Down
5 changes: 0 additions & 5 deletions changelog/2452.feature.rst

This file was deleted.

12 changes: 0 additions & 12 deletions changelog/2452.removal.rst

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/2908.feature.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3566.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3784.feature.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3829.feature.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3837.feature.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3853.trivial.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3907.doc.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3911.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3913.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/3918.bugfix.rst

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/3936.removal.rst

This file was deleted.

1 change: 1 addition & 0 deletions doc/en/announce/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Release announcements
:maxdepth: 2


release-3.8.0
release-3.7.4
release-3.7.3
release-3.7.2
Expand Down
38 changes: 38 additions & 0 deletions doc/en/announce/release-3.8.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
pytest-3.8.0
=======================================

The pytest team is proud to announce the 3.8.0 release!

pytest is a mature Python testing tool with more than a 2000 tests
against itself, passing on many different interpreters and platforms.

This release contains a number of bugs 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
* Bruno Oliveira
* CrazyMerlyn
* Daniel Hahler
* Fabio Zadrozny
* Jeffrey Rackauckas
* Ronny Pfannschmidt
* Virgil Dupras
* dhirensr
* hoefling
* wim glenn


Happy testing,
The Pytest Development Team
6 changes: 3 additions & 3 deletions doc/en/example/reportingdemo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,9 @@ get on the terminal - we are working on that)::

failure_demo.py:261: AssertionError
============================= warnings summary =============================
<undetermined location>
Metafunc.addcall is deprecated and scheduled to be removed in pytest 4.0.
Please use Metafunc.parametrize instead.
$REGENDOC_TMPDIR/assertion/failure_demo.py:24: RemovedInPytest4Warning: Metafunc.addcall is deprecated and scheduled to be removed in pytest 4.0.
Please use Metafunc.parametrize instead.
metafunc.addcall(funcargs=dict(param1=3, param2=6))

-- Docs: https://docs.pytest.org/en/latest/warnings.html
================== 42 failed, 1 warnings in 0.12 seconds ===================
19 changes: 10 additions & 9 deletions doc/en/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,12 @@ making it easy in large test suites to get a clear picture of all failures, skip
Example::

$ pytest -ra
======================== test session starts ========================
...
====================== short test summary info ======================
FAIL summary\test_foo.py::test_1
SKIP [1] summary\test_foo.py:12: not supported in this platform
XPASS summary\test_bar.py::test_4 flaky

===== 1 failed, 1 passed, 1 skipped, 1 xpassed in 0.08 seconds ======
=========================== test session starts ============================
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y
rootdir: $REGENDOC_TMPDIR, inifile:
collected 0 items

======================= no tests ran in 0.12 seconds =======================

The ``-r`` options accepts a number of characters after it, with ``a`` used above meaning "all except passes".

Expand All @@ -179,8 +176,12 @@ Here is the full list of available characters that can be used:
More than one character can be used, so for example to only see failed and skipped tests, you can execute::

$ pytest -rfs
=========================== test session starts ============================
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y
rootdir: $REGENDOC_TMPDIR, inifile:
collected 0 items


======================= no tests ran in 0.12 seconds =======================

.. _pdb-option:

Expand Down
17 changes: 7 additions & 10 deletions doc/en/warnings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ Running pytest now produces this output::
test_show_warnings.py . [100%]

============================= warnings summary =============================
test_show_warnings.py::test_one
$REGENDOC_TMPDIR/test_show_warnings.py:4: UserWarning: api v1, should use functions from v2
warnings.warn(UserWarning("api v1, should use functions from v2"))
$REGENDOC_TMPDIR/test_show_warnings.py:4: UserWarning: api v1, should use functions from v2
warnings.warn(UserWarning("api v1, should use functions from v2"))

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=================== 1 passed, 1 warnings in 0.12 seconds ===================
Expand Down Expand Up @@ -354,15 +353,13 @@ defines an ``__init__`` constructor, as this prevents the class from being insta
::

$ pytest test_pytest_warnings.py -q
======================================== warnings summary =========================================
test_pytest_warnings.py:1
$REGENDOC_TMPDIR/test_pytest_warnings.py:1: PytestWarning: cannot collect test class 'Test' because it has a __init__ constructor
class Test:

-- Docs: http://doc.pytest.org/en/latest/warnings.html
1 warnings in 0.01 seconds

============================= warnings summary =============================
$REGENDOC_TMPDIR/test_pytest_warnings.py:1: PytestWarning: cannot collect test class 'Test' because it has a __init__ constructor
class Test:

-- Docs: https://docs.pytest.org/en/latest/warnings.html
1 warnings in 0.12 seconds

These warnings might be filtered using the same builtin mechanisms used to filter other types of warnings.

Expand Down
5 changes: 2 additions & 3 deletions doc/en/writing_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,8 @@ additionally it is possible to copy examples for a example folder before running
test_example.py .. [100%]
============================= warnings summary =============================
test_example.py::test_plugin
$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")
$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")
-- Docs: https://docs.pytest.org/en/latest/warnings.html
=================== 2 passed, 1 warnings in 0.12 seconds ===================
Expand Down

0 comments on commit 1f20626

Please sign in to comment.