1
- =================
2
- Changelog history
3
- =================
1
+ =========
2
+ Changelog
3
+ =========
4
4
5
5
Versions follow `Semantic Versioning <https://semver.org/ >`_ (``<major>.<minor>.<patch> ``).
6
6
@@ -90,6 +90,24 @@ Removals
90
90
- `#5412 <https://github.com/pytest-dev/pytest/issues/5412 >`_: ``ExceptionInfo `` objects (returned by ``pytest.raises ``) now have the same ``str `` representation as ``repr ``, which
91
91
avoids some confusion when users use ``print(e) `` to inspect the object.
92
92
93
+ This means code like:
94
+
95
+ .. code-block :: python
96
+
97
+ with pytest.raises(SomeException) as e:
98
+ ...
99
+ assert " some message" in str (e)
100
+
101
+
102
+ Needs to be changed to:
103
+
104
+ .. code-block :: python
105
+
106
+ with pytest.raises(SomeException) as e:
107
+ ...
108
+ assert " some message" in str (e.value)
109
+
110
+
93
111
94
112
95
113
Deprecations
@@ -2173,10 +2191,10 @@ Features
2173
2191
design. This introduces new ``Node.iter_markers(name) `` and
2174
2192
``Node.get_closest_marker(name) `` APIs. Users are **strongly encouraged ** to
2175
2193
read the `reasons for the revamp in the docs
2176
- <https://docs.pytest.org/en/latest/mark .html#marker-revamp-and-iteration> `_,
2194
+ <https://docs.pytest.org/en/latest/historical-notes .html#marker-revamp-and-iteration> `_,
2177
2195
or jump over to details about `updating existing code to use the new APIs
2178
- <https://docs.pytest.org/en/latest/mark .html#updating-code> `_. (` #3317
2179
- <https://github.com/pytest-dev/pytest/issues/3317> `_)
2196
+ <https://docs.pytest.org/en/latest/historical-notes .html#updating-code> `_.
2197
+ (` #3317 <https://github.com/pytest-dev/pytest/issues/3317 >`_)
2180
2198
2181
2199
- Now when ``@pytest.fixture `` is applied more than once to the same function a
2182
2200
``ValueError `` is raised. This buggy behavior would cause surprising problems
@@ -2582,10 +2600,10 @@ Features
2582
2600
<https://github.com/pytest-dev/pytest/issues/3038> `_)
2583
2601
2584
2602
- New `pytest_runtest_logfinish
2585
- <https://docs.pytest.org/en/latest/writing_plugins .html#_pytest.hookspec.pytest_runtest_logfinish> `_
2603
+ <https://docs.pytest.org/en/latest/reference .html#_pytest.hookspec.pytest_runtest_logfinish> `_
2586
2604
hook which is called when a test item has finished executing, analogous to
2587
2605
`pytest_runtest_logstart
2588
- <https://docs.pytest.org/en/latest/writing_plugins .html#_pytest.hookspec.pytest_runtest_start > `_.
2606
+ <https://docs.pytest.org/en/latest/reference .html#_pytest.hookspec.pytest_runtest_logstart > `_.
2589
2607
(`#3101 <https://github.com/pytest-dev/pytest/issues/3101 >`_)
2590
2608
2591
2609
- Improve performance when collecting tests using many fixtures. (`#3107
@@ -3575,7 +3593,7 @@ Bug Fixes
3575
3593
Thanks `@sirex `_ for the report and `@nicoddemus `_ for the PR.
3576
3594
3577
3595
* Replace ``raise StopIteration `` usages in the code by simple ``returns `` to finish generators, in accordance to `PEP-479 `_ (`#2160 `_).
3578
- Thanks ` @tgoodlet `_ for the report and `@nicoddemus `_ for the PR.
3596
+ Thanks to `@nicoddemus `_ for the PR.
3579
3597
3580
3598
* Fix internal errors when an unprintable ``AssertionError `` is raised inside a test.
3581
3599
Thanks `@omerhadari `_ for the PR.
@@ -3706,7 +3724,7 @@ Bug Fixes
3706
3724
3707
3725
.. _@syre : https://github.com/syre
3708
3726
.. _@adler-j : https://github.com/adler-j
3709
- .. _@d-b-w : https://bitbucket.org /d-b-w/
3727
+ .. _@d-b-w : https://github.com /d-b-w
3710
3728
.. _@DuncanBetts : https://github.com/DuncanBetts
3711
3729
.. _@dupuy : https://bitbucket.org/dupuy/
3712
3730
.. _@kerrick-lyft : https://github.com/kerrick-lyft
@@ -3766,7 +3784,7 @@ Bug Fixes
3766
3784
3767
3785
.. _@adborden : https://github.com/adborden
3768
3786
.. _@cwitty : https://github.com/cwitty
3769
- .. _@d_b_w : https://github.com/d_b_w
3787
+ .. _@d_b_w : https://github.com/d-b-w
3770
3788
.. _@gdyuldin : https://github.com/gdyuldin
3771
3789
.. _@matclab : https://github.com/matclab
3772
3790
.. _@MSeifert04 : https://github.com/MSeifert04
@@ -3801,7 +3819,7 @@ Bug Fixes
3801
3819
Thanks `@axil `_ for the PR.
3802
3820
3803
3821
* Explain a bad scope value passed to ``@fixture `` declarations or
3804
- a ``MetaFunc.parametrize() `` call. Thanks ` @tgoodlet `_ for the PR.
3822
+ a ``MetaFunc.parametrize() `` call.
3805
3823
3806
3824
* This version includes ``pluggy-0.4.0 ``, which correctly handles
3807
3825
``VersionConflict `` errors in plugins (`#704 `_).
@@ -3811,7 +3829,6 @@ Bug Fixes
3811
3829
.. _@philpep : https://github.com/philpep
3812
3830
.. _@raquel-ucl : https://github.com/raquel-ucl
3813
3831
.. _@axil : https://github.com/axil
3814
- .. _@tgoodlet : https://github.com/tgoodlet
3815
3832
.. _@vlad-dragos : https://github.com/vlad-dragos
3816
3833
3817
3834
.. _#1853 : https://github.com/pytest-dev/pytest/issues/1853
@@ -4157,7 +4174,7 @@ time or change existing behaviors in order to make them less surprising/more use
4157
4174
* Updated docstrings with a more uniform style.
4158
4175
4159
4176
* Add stderr write for ``pytest.exit(msg) `` during startup. Previously the message was never shown.
4160
- Thanks `@BeyondEvil `_ for reporting `#1210 `_. Thanks to `@JonathonSonesen `_ and
4177
+ Thanks `@BeyondEvil `_ for reporting `#1210 `_. Thanks to `@jgsonesen `_ and
4161
4178
`@tomviner `_ for the PR.
4162
4179
4163
4180
* No longer display the incorrect test deselection reason (`#1372 `_).
@@ -4205,7 +4222,7 @@ time or change existing behaviors in order to make them less surprising/more use
4205
4222
Thanks to `@Stranger6667 `_ for the PR.
4206
4223
4207
4224
* Fixed the total tests tally in junit xml output (`#1798 `_).
4208
- Thanks to `@cryporchild `_ for the PR.
4225
+ Thanks to `@cboelsen `_ for the PR.
4209
4226
4210
4227
* Fixed off-by-one error with lines from ``request.node.warn ``.
4211
4228
Thanks to `@blueyed `_ for the PR.
@@ -4278,7 +4295,7 @@ time or change existing behaviors in order to make them less surprising/more use
4278
4295
.. _@BeyondEvil : https://github.com/BeyondEvil
4279
4296
.. _@blueyed : https://github.com/blueyed
4280
4297
.. _@ceridwen : https://github.com/ceridwen
4281
- .. _@cryporchild : https://github.com/cryporchild
4298
+ .. _@cboelsen : https://github.com/cboelsen
4282
4299
.. _@csaftoiu : https://github.com/csaftoiu
4283
4300
.. _@d6e : https://github.com/d6e
4284
4301
.. _@davehunt : https://github.com/davehunt
@@ -4289,7 +4306,7 @@ time or change existing behaviors in order to make them less surprising/more use
4289
4306
.. _@gprasad84 : https://github.com/gprasad84
4290
4307
.. _@graingert : https://github.com/graingert
4291
4308
.. _@hartym : https://github.com/hartym
4292
- .. _@JonathonSonesen : https://github.com/JonathonSonesen
4309
+ .. _@jgsonesen : https://github.com/jgsonesen
4293
4310
.. _@kalekundert : https://github.com/kalekundert
4294
4311
.. _@kvas-it : https://github.com/kvas-it
4295
4312
.. _@marscher : https://github.com/marscher
@@ -4426,7 +4443,7 @@ time or change existing behaviors in order to make them less surprising/more use
4426
4443
4427
4444
**Changes **
4428
4445
4429
- * **Important **: `py.code <https://pylib.readthedocs.io/en/latest /code.html >`_ has been
4446
+ * **Important **: `py.code <https://pylib.readthedocs.io/en/stable /code.html >`_ has been
4430
4447
merged into the ``pytest `` repository as ``pytest._code ``. This decision
4431
4448
was made because ``py.code `` had very few uses outside ``pytest `` and the
4432
4449
fact that it was in a different repository made it difficult to fix bugs on
0 commit comments