Skip to content

Commit 43ac5f7

Browse files
committed
Improve overall CHANGELOG formatting and consistency for 3.0
1 parent c4f20a1 commit 43ac5f7

File tree

1 file changed

+82
-73
lines changed

1 file changed

+82
-73
lines changed

CHANGELOG.rst

Lines changed: 82 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,46 @@
33

44
**Incompatible changes**
55

6-
* Removed the following deprecated commandline options
6+
A number of incompatible changes were made in this release, with the intent of removing features deprecated for a long
7+
time or change existing behaviors in order to make them less surprising/more useful.
78

8-
* ``--genscript``
9-
* ``--no-assert``
10-
* ``--nomagic``
11-
* ``--report``
9+
* The following deprecated commandline options were removed:
1210

13-
Thanks to `@RedBeardCode`_ for the PR (`#1664`_)
11+
* ``--genscript``: no longer supported;
12+
* ``--no-assert``: use ``--assert=plain`` instead;
13+
* ``--nomagic``: use ``--assert=plain`` instead;
14+
* ``--report``: use ``-r`` instead;
15+
16+
Thanks to `@RedBeardCode`_ for the PR (`#1664`_).
1417

1518
* ImportErrors in plugins now are a fatal error instead of issuing a
1619
pytest warning (`#1479`_). Thanks to `@The-Compiler`_ for the PR.
1720

18-
* removed support code for python 3 < 3.3 addressing (`#1627`_)
21+
* Removed support code for Python versions < 3.3 addressing (`#1627`_).
1922

20-
* Remove all py.test-X* entry points. The versioned, suffixed entry points
23+
* Removed all ``py.test-X*`` entry points. The versioned, suffixed entry points
2124
were never documented and a leftover from a pre-virtualenv era. These entry
2225
points also created broken entry points in wheels, so removing them also
2326
removes a source of confusion for users (`#1632`_).
2427
Thanks `@obestwalter`_ for the PR.
2528

26-
* Fix `#607`_: pytest.skip() is no longer allowed at module level to
27-
prevent misleading use as test function decorator. When used at a module
28-
level an error will be raised during collection.
29+
* ``pytest.skip()`` now raises an error when used to decorate a test function,
30+
as opposed to its original intent (to imperatively skip a test inside a test function). Previously
31+
this usage would cause the entire module to be skipped (`#607`_).
2932
Thanks `@omarkohl`_ for the complete PR (`#1519`_).
3033

31-
* Fix `#1421`_: Exit tests if a collection error occurs and add
32-
``--continue-on-collection-errors`` option to restore previous behaviour.
34+
* Exit tests if a collection error occurs. A poll indicated most users will hit CTRL-C
35+
anyway as soon as they see collection errors, so pytest might as well make that the default behavior (`#1421`_).
36+
A ``--continue-on-collection-errors`` option has been added to restore the previous behaviour.
3337
Thanks `@olegpidsadnyi`_ and `@omarkohl`_ for the complete PR (`#1628`_).
3438

35-
* Renamed the pytest ``pdb`` module (plugin) into ``debugging``.
39+
* Renamed pytest ``pdb`` module (plugin) into ``debugging`` to avoid clashes with the builtin ``pdb`` module.
3640

37-
* Raise helpful failure message, when requesting parametrized fixture at runtime,
38-
e.g. with ``request.getfuncargvalue``. Previously these params were simply
39-
never defined. So a fixture decorated like ``@pytest.fixture(params=[0, 1,
40-
2])`` only ran once. Now a failure is raised. Fixes `#460`_. Thanks to
41-
`@nikratio`_ for bug report, `@RedBeardCode`_ and `@tomviner`_ for PR.
41+
* Raise a helpful failure message when requesting a parametrized fixture at runtime,
42+
e.g. with ``request.getfixturevalue``. Previously these parameters were simply
43+
never defined, so a fixture decorated like ``@pytest.fixture(params=[0, 1, 2])``
44+
only ran once (`#460`_).
45+
Thanks to `@nikratio`_ for bug report, `@RedBeardCode`_ and `@tomviner`_ for PR.
4246

4347
* ``_pytest.monkeypatch.monkeypatch`` class has been renamed to ``_pytest.monkeypatch.MonkeyPatch``
4448
so it doesn't conflict with the ``monkeypatch`` fixture.
@@ -54,71 +58,81 @@
5458
**New Features**
5559

5660
* Support nose-style ``__test__`` attribute on methods of classes,
57-
including unittest-style Classes. If set to False, the test will not be
61+
including unittest-style Classes. If set to ``False``, the test will not be
5862
collected.
5963

6064
* New ``doctest_namespace`` fixture for injecting names into the
61-
namespace in which your doctests run.
65+
namespace in which doctests run.
6266
Thanks `@milliams`_ for the complete PR (`#1428`_).
6367

64-
* New ``name`` argument to ``pytest.fixture`` mark, which allows a custom name
68+
* New ``name`` argument to ``pytest.fixture`` decorator which allows a custom name
6569
for a fixture (to solve the funcarg-shadowing-fixture problem).
6670
Thanks `@novas0x2a`_ for the complete PR (`#1444`_).
6771

6872
* New ``approx()`` function for easily comparing floating-point numbers in
6973
tests.
7074
Thanks `@kalekundert`_ for the complete PR (`#1441`_).
7175

72-
* New Add ability to add global properties in the final xunit output file.
76+
* Ability to add global properties in the final xunit output file by accessing
77+
the internal ``junitxml`` plugin (experimental).
7378
Thanks `@tareqalayan`_ for the complete PR `#1454`_).
7479

7580
* New ``ExceptionInfo.match()`` method to match a regular expression on the
76-
string representation of an exception. Closes proposal `#372`_.
81+
string representation of an exception (`#372`_).
7782
Thanks `@omarkohl`_ for the complete PR (`#1502`_) and `@nicoddemus`_ for the
7883
implementation tips.
7984

8085
* ``__tracebackhide__`` can now also be set to a callable which then can decide
8186
whether to filter the traceback based on the ``ExceptionInfo`` object passed
8287
to it. Thanks `@The-Compiler`_ for the complete PR (`#1526`_).
8388

84-
* New ``pytest_make_parametrize_id`` hook.
89+
* New ``pytest_make_parametrize_id(config, val)`` hook which can be used by plugins to provide
90+
friendly strings for custom types.
8591
Thanks `@palaviv`_ for the PR.
8692

87-
* ``capsys`` and ``capfd`` now have a ``disabled()`` method, which is a context manager
88-
that can be used to temporarily disable capture within a test.
93+
* ``capsys`` and ``capfd`` now have a ``disabled()`` context-manager method, which
94+
can be used to temporarily disable capture within a test.
8995
Thanks `@nicoddemus`_ for the PR.
9096

91-
* New cli flag ``--fixtures-per-test`` that shows which fixtures are being used
97+
* New cli flag ``--fixtures-per-test``: shows which fixtures are being used
9298
for each selected test item. Features doc strings of fixtures by default.
9399
Can also show where fixtures are defined if combined with ``-v``.
94100
Thanks `@hackebrot`_ for the PR.
95101

96-
* Introduce pytest command as recommended entry point. Closes proposal
102+
* Introduce ``pytest`` command as recommended entry point. Note that ``py.test``
103+
still works and is not scheduled for removal. Closes proposal
97104
`#1629`_. Thanks `@obestwalter`_ and `@davehunt`_ for the complete PR
98-
(`#1633`_)
105+
(`#1633`_).
106+
107+
* New cli flags:
108+
109+
+ ``--setup-plan``: performs normal collection and reports
110+
the potential setup and teardown and does not execute any fixtures and tests;
111+
+ ``--setup-only``: performs normal collection, executes setup and teardown of
112+
fixtures and reports them;
113+
+ ``--setup-show``: performs normal test execution and additionally shows
114+
setup and teardown of fixtures;
99115

100-
* New cli flags: (1) ``--setup-plan`` performs normal collection and reports
101-
the potential setup and teardown, does not execute any fixtures and tests (2)
102-
``--setup-only`` performs normal collection, executes setup and teardown of
103-
fixtures and reports them. (3) ``--setup-show`` performs normal test
104-
execution and additionally shows the setup and teardown of fixtures.
105116
Thanks `@d6e`_, `@kvas-it`_, `@sallner`_ and `@omarkohl`_ for the PRs.
106117

107-
* Added two new hooks: ``pytest_fixture_setup`` which executes the fixture
108-
setup and ``pytest_fixture_post_finalizer`` which is called after the fixture's
109-
finalizer and has access to the fixture's result cache.
110-
Thanks `@d6e`_, `@sallner`_
118+
* New cli flag ``--override-ini``/``-o``: overrides values from the ini file.
119+
For example: ``"-o xfail_strict=True"``'.
120+
Thanks `@blueyed`_ and `@fengxx`_ for the PR.
121+
122+
* New hooks:
111123

112-
* Issue a warning for asserts whose test is a tuple literal. Such asserts will
124+
+ ``pytest_fixture_setup(fixturedef, request)``: executes fixture setup;
125+
+ ``pytest_fixture_post_finalizer(fixturedef)``: called after the fixture's
126+
finalizer and has access to the fixture's result cache.
127+
128+
Thanks `@d6e`_, `@sallner`_.
129+
130+
* Issue warnings for asserts whose test is a tuple literal. Such asserts will
113131
never fail because tuples are always truthy and are usually a mistake
114132
(see `#1562`_). Thanks `@kvas-it`_, for the PR.
115133

116-
* New cli flag ``--override-ini`` or ``-o`` that overrides values from the ini file.
117-
Example '-o xfail_strict=True'. A complete ini-options can be viewed
118-
by py.test --help. Thanks `@blueyed`_ and `@fengxx`_ for the PR
119-
120-
* Allow passing a custom debugger class (e.g. ``IPython.core.debugger:Pdb``
121-
via ``--pdbcls``). Thanks to `@anntzer`_ for the PR.
134+
* Allow passing a custom debugger class (e.g. ``--pdbcls=IPython.core.debugger:Pdb``).
135+
Thanks to `@anntzer`_ for the PR.
122136

123137
*
124138

@@ -136,27 +150,26 @@
136150
the preferred way to write teardown code (`#1461`_).
137151
Thanks `@csaftoiu`_ for bringing this to attention and `@nicoddemus`_ for the PR.
138152

139-
* Fix `#1351`_:
140-
explicitly passed parametrize ids do not get escaped to ascii.
153+
* Explicitly passed parametrize ids do not get escaped to ascii (`#1351`_).
141154
Thanks `@ceridwen`_ for the PR.
142155

143-
* parametrize ids can accept None as specific test id. The
156+
* Parametrize ids can accept ``None`` as specific test id, in which case the
144157
automatically generated id for that argument will be used.
145158
Thanks `@palaviv`_ for the complete PR (`#1468`_).
146159

147-
* improved idmaker name selection in case of duplicate ids in
160+
* Improved automatic id generation selection in case of duplicate ids in
148161
parametrize.
149162
Thanks `@palaviv`_ for the complete PR (`#1474`_).
150163

151-
* Fix `#1426`_ Make ImportError during collection more explicit by reminding
152-
the user to check the name of the test module/package(s).
164+
* Make ImportError during collection more explicit by reminding
165+
the user to check the name of the test module/package(s) (`#1426`_).
153166
Thanks `@omarkohl`_ for the complete PR (`#1520`_).
154167

155168
* Add ``build/`` and ``dist/`` to the default ``--norecursedirs`` list. Thanks
156169
`@mikofski`_ for the report and `@tomviner`_ for the PR (`#1544`_).
157170

158-
* pytest.raises in the context manager form accepts a custom
159-
message to raise when no exception occurred.
171+
* ``pytest.raises`` in the context manager form accepts a custom
172+
``message`` to raise when no exception occurred.
160173
Thanks `@palaviv`_ for the complete PR (`#1616`_).
161174

162175
* ``conftest.py`` files now benefit from assertion rewriting; previously it
@@ -170,15 +183,8 @@
170183
is specified on the command line together with the ``--pyargs``
171184
option. Thanks to `@taschini`_ for the PR (`#1597`_).
172185

173-
* Add proposal to docs for a new feature that enables users to combine multiple
174-
fixtures into one. Thanks to `@hpk42`_ and `@hackebrot`_.
175-
176-
* Rename ``getfuncargvalue`` to ``getfixturevalue``. ``getfuncargvalue`` is
177-
deprecated but still present. Thanks to `@RedBeardCode`_ and `@tomviner`_
178-
for PR (`#1626`_).
179-
180-
* Always include full assertion explanation. The previous behaviour was hiding
181-
sub-expressions that happened to be False, assuming this was redundant information.
186+
* Always include full assertion explanation during assertion rewriting. The previous behaviour was hiding
187+
sub-expressions that happened to be ``False``, assuming this was redundant information.
182188
Thanks `@bagerard`_ for reporting (`#1503`_). Thanks to `@davehunt`_ and
183189
`@tomviner`_ for PR.
184190

@@ -194,6 +200,10 @@
194200
removed in pytest-4.0 (`#1684`_).
195201
Thanks `@nicoddemus`_ for the PR.
196202

203+
* Rename ``getfuncargvalue`` to ``getfixturevalue``. ``getfuncargvalue`` is
204+
still present but is now considered deprecated. Thanks to `@RedBeardCode`_ and `@tomviner`_
205+
for PR (`#1626`_).
206+
197207
*
198208

199209
*
@@ -202,21 +212,20 @@
202212

203213
**Bug Fixes**
204214

205-
* When receiving identical test ids in parametrize we generate unique test ids.
215+
* Parametrize now correctly handles duplicated test ids.
206216

207-
* Fix internal error issue when ``method`` argument is missing for
208-
``teardown_method()``. Fixes `#1605`_.
217+
* Fix internal error issue when the ``method`` argument is missing for
218+
``teardown_method()`` (`#1605`_).
209219

210220
* Fix exception visualization in case the current working directory (CWD) gets
211-
deleted during testing. Fixes `#1235`_. Thanks `@bukzor`_ for reporting. PR by
212-
`@marscher`_. Thanks `@nicoddemus`_ for his help.
221+
deleted during testing (`#1235`_). Thanks `@bukzor`_ for reporting. PR by
222+
`@marscher`_.
213223

214-
* Improve of the test output for logical expression with brackets.
215-
Fixes `#925`_. Thanks `@DRMacIver`_ for reporting. Thanks to `@RedBeardCode`_
216-
for PR.
224+
* Improve test output for logical expression with brackets (`#925`_).
225+
Thanks `@DRMacIver`_ for reporting and `@RedBeardCode`_ for PR.
217226

218-
* Create correct diff for strings ending with newlines. Fixes `#1553`_.
219-
Thanks `@Vogtinator`_ for reporting. Thanks to `@RedBeardCode`_ and
227+
* Create correct diff for strings ending with newlines (`#1553`_).
228+
Thanks `@Vogtinator`_ for reporting and `@RedBeardCode`_ and
220229
`@tomviner`_ for PR.
221230

222231
*

0 commit comments

Comments
 (0)