Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-38291: DeprecationWarning when importing typing.{io,re}#26719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gvanrossum merged 6 commits intopython:mainfromsrittau:warn-old-typing
Jun 19, 2021
Merged
Changes from1 commit
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
PrevPrevious commit
Fix tests
  • Loading branch information
@srittau
srittau committedJun 14, 2021
commit00656193c10ac55b7130ac4130a6d840a75f290c
8 changes: 4 additions & 4 deletionsLib/test/test_typing.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3997,14 +3997,14 @@ def stuff(a: BinaryIO) -> bytes:
self.assertEqual(a.__parameters__, ())

def test_io_submodule(self):
with warnings.catch_warnings() as w:
with warnings.catch_warnings(record=True) as w:
from typing.io import IO, TextIO, BinaryIO, __all__, __name__
self.assertIs(IO, typing.IO)
self.assertIs(TextIO, typing.TextIO)
self.assertIs(BinaryIO, typing.BinaryIO)
self.assertEqual(set(__all__), set(['IO', 'TextIO', 'BinaryIO']))
self.assertEqual(__name__, 'typing.io')
assertlen(w) == 1
self.assertEqual(len(w), 1)


class RETests(BaseTestCase):
Expand DownExpand Up@@ -4051,13 +4051,13 @@ def test_repr(self):
self.assertEqual(repr(Match[bytes]), 'typing.Match[bytes]')

def test_re_submodule(self):
with warnings.catch_warnings() as w:
with warnings.catch_warnings(record=True) as w:
from typing.re import Match, Pattern, __all__, __name__
self.assertIs(Match, typing.Match)
self.assertIs(Pattern, typing.Pattern)
self.assertEqual(set(__all__), set(['Match', 'Pattern']))
self.assertEqual(__name__, 'typing.re')
assertlen(w) == 1
self.assertEqual(len(w), 1)

def test_cannot_subclass(self):
with self.assertRaises(TypeError) as ex:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp