Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Importing typing.io or typing.re now prints a `DeprecationWarning`.
Importing typing.io or typing.re now prints a ``DeprecationWarning``.