Skip to content

Release 3.1.1 #2450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,33 @@
https://pip.pypa.io/en/latest/development/#adding-a-news-entry
we named the news folder changelog


.. towncrier release notes start

Pytest 3.1.1 (2017-05-30)
=========================

Bug Fixes
---------

- pytest warning capture no longer overrides existing warning filters. The
previous behaviour would override all filters and caused regressions in test
suites which configure warning filters to match their needs. Note that as a
side-effect of this is that ``DeprecationWarning`` and
``PendingDeprecationWarning`` are no longer shown by default. (#2430)

- Fix issue with non-ascii contents in doctest text files. (#2434)

- Fix encoding errors for unicode warnings in Python 2. (#2436)

- ``pytest.deprecated_call`` now captures ``PendingDeprecationWarning`` in
context manager form. (#2441)


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

- Addition of towncrier for changelog management. (#2390)


3.1.0 (2017-05-22)
==================
Expand Down
1 change: 0 additions & 1 deletion changelog/2390.doc

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/2430.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog/2434.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog/2436.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog/2441.bugfix

This file was deleted.

1 change: 1 addition & 0 deletions changelog/_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{% for text, values in sections[section][category]|dictsort(by='value') %}
- {{ text }}{% if category != 'vendor' %} ({{ values|sort|join(', ') }}){% endif %}


{% endfor %}
{% else %}
- {{ sections[section][category]['']|sort|join(', ') }}
Expand Down
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.1.1
release-3.1.0
release-3.0.7
release-3.0.6
Expand Down
23 changes: 23 additions & 0 deletions doc/en/announce/release-3.1.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pytest-3.1.1
=======================================

pytest 3.1.1 has just been released to PyPI.

This is a bug-fix release, being a drop-in replacement. To upgrade::

pip install --upgrade pytest

The full changelog is available at http://doc.pytest.org/en/latest/changelog.html.

Thanks to all who contributed to this release, among them:

* Bruno Oliveira
* Florian Bruhin
* Floris Bruynooghe
* Jason R. Coombs
* Ronny Pfannschmidt
* wanghui


Happy testing,
The pytest Development Team
32 changes: 16 additions & 16 deletions doc/en/warnings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ Running pytest now produces this output::
platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y
rootdir: $REGENDOC_TMPDIR, inifile:
collected 1 items

test_show_warnings.py .

======= warnings summary ========
test_show_warnings.py::test_one
$REGENDOC_TMPDIR/test_show_warnings.py:4: DeprecationWarning: this function is deprecated, use another_function()
warnings.warn("this function is deprecated, use another_function()", DeprecationWarning)

$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: http://doc.pytest.org/en/latest/warnings.html
======= 1 passed, 1 warnings in 0.12 seconds ========

Expand All @@ -45,18 +45,18 @@ them into errors::
F
======= FAILURES ========
_______ test_one ________

def test_one():
> assert deprecated_function() == 1

test_show_warnings.py:8:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

def deprecated_function():
> warnings.warn("this function is deprecated, use another_function()", DeprecationWarning)
E DeprecationWarning: this function is deprecated, use another_function()

test_show_warnings.py:4: DeprecationWarning
> assert api_v1() == 1
test_show_warnings.py:8:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def api_v1():
> warnings.warn(UserWarning("api v1, should use functions from v2"))
E UserWarning: api v1, should use functions from v2
test_show_warnings.py:4: UserWarning
1 failed in 0.12 seconds

The same option can be set in the ``pytest.ini`` file using the ``filterwarnings`` ini option.
Expand Down