mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-118803: Remove ByteString
from typing
and collections.abc
(#118804)
This commit is contained in:
parent
cb6f75a32c
commit
2f4db5a04d
12 changed files with 14 additions and 114 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue