From 519029720c40f380e9a94d69dd58313aa7f04654 Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Mon, 21 Jun 2021 01:26:42 +0800 Subject: [PATCH] Reset DeprecationWarning filters in test_typing io and re --- Lib/test/test_typing.py | 2 ++ .../next/Library/2021-06-14-14-19-11.bpo-38291.ee4cSX.rst | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 06df3e23264cb2..eff0f5bfc4b1e1 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -3998,6 +3998,7 @@ def stuff(a: BinaryIO) -> bytes: def test_io_submodule(self): with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings("default", category=DeprecationWarning) from typing.io import IO, TextIO, BinaryIO, __all__, __name__ self.assertIs(IO, typing.IO) self.assertIs(TextIO, typing.TextIO) @@ -4052,6 +4053,7 @@ def test_repr(self): def test_re_submodule(self): with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings("default", category=DeprecationWarning) from typing.re import Match, Pattern, __all__, __name__ self.assertIs(Match, typing.Match) self.assertIs(Pattern, typing.Pattern) diff --git a/Misc/NEWS.d/next/Library/2021-06-14-14-19-11.bpo-38291.ee4cSX.rst b/Misc/NEWS.d/next/Library/2021-06-14-14-19-11.bpo-38291.ee4cSX.rst index 7fb891dd4bc0c9..078d78d1778b1f 100644 --- a/Misc/NEWS.d/next/Library/2021-06-14-14-19-11.bpo-38291.ee4cSX.rst +++ b/Misc/NEWS.d/next/Library/2021-06-14-14-19-11.bpo-38291.ee4cSX.rst @@ -1 +1 @@ -Importing typing.io or typing.re now prints a `DeprecationWarning`. +Importing typing.io or typing.re now prints a ``DeprecationWarning``.