Skip to content

Commit c2d6b35

Browse files
committed
Preparing release version 4.0.0
1 parent e025974 commit c2d6b35

11 files changed

+149
-105
lines changed

CHANGELOG.rst

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,73 @@ with advance notice in the **Deprecations** section of releases.
1818
1919
.. towncrier release notes start
2020
21+
pytest 4.0.0 (2018-11-13)
22+
=========================
23+
24+
Removals
25+
--------
26+
27+
- `#3737 <https://github.com/pytest-dev/pytest/issues/3737>`_: **RemovedInPytest4Warnings are now errors by default.**
28+
29+
Following our plan to remove deprecated features with as little disruption as
30+
possible, all warnings of type ``RemovedInPytest4Warnings`` now generate errors
31+
instead of warning messages.
32+
33+
**The affected features will be effectively removed in pytest 4.1**, so please consult the
34+
`Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`__
35+
section in the docs for directions on how to update existing code.
36+
37+
In the pytest ``4.0.X`` series, it is possible to change the errors back into warnings as a stop
38+
gap measure by adding this to your ``pytest.ini`` file:
39+
40+
.. code-block:: ini
41+
42+
[pytest]
43+
filterwarnings =
44+
ignore::pytest.RemovedInPytest4Warning
45+
46+
But this will stop working when pytest ``4.1`` is released.
47+
48+
**If you have concerns** about the removal of a specific feature, please add a
49+
comment to `#4348 <https://github.com/pytest-dev/pytest/issues/4348>`__.
50+
51+
52+
- `#4358 <https://github.com/pytest-dev/pytest/issues/4358>`_: Remove the ``::()`` notation to denote a test class instance in node ids.
53+
54+
Previously, node ids that contain test instances would use ``::()`` to denote the instance like this::
55+
56+
test_foo.py::Test::()::test_bar
57+
58+
The extra ``::()`` was puzzling to most users and has been removed, so that the test id becomes now::
59+
60+
test_foo.py::Test::test_bar
61+
62+
This change could not accompany a deprecation period as is usual when user-facing functionality changes because
63+
it was not really possible to detect when the functionality was being used explicitly.
64+
65+
The extra ``::()`` might have been removed in some places internally already,
66+
which then led to confusion in places where it was expected, e.g. with
67+
``--deselect`` (`#4127 <https://github.com/pytest-dev/pytest/issues/4127>`_).
68+
69+
Test class instances are also not listed with ``--collect-only`` anymore.
70+
71+
72+
73+
Features
74+
--------
75+
76+
- `#4270 <https://github.com/pytest-dev/pytest/issues/4270>`_: The ``cache_dir`` option uses ``$TOX_ENV_DIR`` as prefix (if set in the environment).
77+
78+
This uses a different cache per tox environment by default.
79+
80+
81+
82+
Bug Fixes
83+
---------
84+
85+
- `#3554 <https://github.com/pytest-dev/pytest/issues/3554>`_: Fix ``CallInfo.__repr__`` for when the call is not finished yet.
86+
87+
2188
pytest 3.10.1 (2018-11-11)
2289
==========================
2390

changelog/3554.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/3737.removal.rst

Lines changed: 0 additions & 23 deletions
This file was deleted.

changelog/4270.feature.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

changelog/4358.removal.rst

Lines changed: 0 additions & 18 deletions
This file was deleted.

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-4.0.0
910
release-3.10.1
1011
release-3.10.0
1112
release-3.9.3

doc/en/announce/release-4.0.0.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
pytest-4.0.0
2+
=======================================
3+
4+
The pytest team is proud to announce the 4.0.0 release!
5+
6+
pytest is a mature Python testing tool with more than a 2000 tests
7+
against itself, passing on many different interpreters and platforms.
8+
9+
This release contains a number of bugs 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+
* Bruno Oliveira
25+
* Daniel Hahler
26+
* Ronny Pfannschmidt
27+
28+
29+
Happy testing,
30+
The Pytest Development Team

doc/en/example/parametrize.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ If you just collect tests you'll also nicely see 'advanced' and 'basic' as varia
213213
collected 4 items
214214
<Module 'test_scenarios.py'>
215215
<Class 'TestSampleWithScenarios'>
216-
<Instance '()'>
217216
<Function 'test_demo1[basic]'>
218217
<Function 'test_demo2[basic]'>
219218
<Function 'test_demo1[advanced]'>

doc/en/example/pythoncollection.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ The test collection would look like this::
132132
collected 2 items
133133
<Module 'check_myapp.py'>
134134
<Class 'CheckMyApp'>
135-
<Instance '()'>
136135
<Function 'simple_check'>
137136
<Function 'complex_check'>
138137

@@ -187,7 +186,6 @@ You can always peek at the collection tree without running tests like this::
187186
<Module 'CWD/pythoncollection.py'>
188187
<Function 'test_function'>
189188
<Class 'TestClass'>
190-
<Instance '()'>
191189
<Function 'test_method'>
192190
<Function 'test_anothermethod'>
193191

0 commit comments

Comments
 (0)