Skip to content

Commit b3c337d

Browse files
add changelog entry and documentation note about RecordedWarning
1 parent e9668d7 commit b3c337d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ Changes
2828
to ``io.UnsupportedOperation``. Thanks `@vlad-dragos`_ for the PR.
2929

3030

31+
* fix `#2013`_: turn RecordedWarning into namedtupe,
32+
to give it a comprehensible repr while preventing unwarranted modification
33+
3134
.. _@davidszotten: https://github.com/davidszotten
3235
.. _@fushi: https://github.com/fushi
3336
.. _@mattduck: https://github.com/mattduck
3437

3538
.. _#1512: https://github.com/pytest-dev/pytest/issues/1512
3639
.. _#1874: https://github.com/pytest-dev/pytest/pull/1874
3740
.. _#1952: https://github.com/pytest-dev/pytest/pull/1952
41+
.. _#2013: https://github.com/pytest-dev/pytest/issues/2013
3842

3943

4044
3.0.4.dev

doc/en/recwarn.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ Each recorded warning has the attributes ``message``, ``category``,
9292
class of the warning. The ``message`` is the warning itself; calling
9393
``str(message)`` will return the actual message of the warning.
9494

95+
.. note::
96+
:class:`RecordedWarning` was changed from a plain class to a namedtuple in pytest 3.1
97+
9598
.. note::
9699
``DeprecationWarning`` and ``PendingDeprecationWarning`` are treated
97100
differently; see :ref:`ensuring_function_triggers`.

0 commit comments

Comments
 (0)