gh-118803: Remove ByteString from typing and collections.abc (#118804)

This commit is contained in:
Nikita Sobolev 2024-05-09 02:37:55 +03:00 committed by GitHub
parent cb6f75a32c
commit 2f4db5a04d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 14 additions and 114 deletions

View file

@ -7128,16 +7128,6 @@ class CollectionsAbcTests(BaseTestCase):
self.assertIsInstance([], typing.MutableSequence)
self.assertNotIsInstance((), typing.MutableSequence)
def test_bytestring(self):
with self.assertWarns(DeprecationWarning):
self.assertIsInstance(b'', typing.ByteString)
with self.assertWarns(DeprecationWarning):
self.assertIsInstance(bytearray(b''), typing.ByteString)
with self.assertWarns(DeprecationWarning):
class Foo(typing.ByteString): ...
with self.assertWarns(DeprecationWarning):
class Bar(typing.ByteString, typing.Awaitable): ...
def test_list(self):
self.assertIsSubclass(list, typing.List)
@ -9951,7 +9941,6 @@ class SpecialAttrsTests(BaseTestCase):
typing.AsyncIterable: 'AsyncIterable',
typing.AsyncIterator: 'AsyncIterator',
typing.Awaitable: 'Awaitable',
typing.ByteString: 'ByteString',
typing.Callable: 'Callable',
typing.ChainMap: 'ChainMap',
typing.Collection: 'Collection',