Skip to content

Commit 9226a64

Browse files
committed
Revert "Byestring removal for 3.14 (#12490)"
This reverts commit 8a7f09e.
1 parent 4fc0fd8 commit 9226a64

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

stdlib/_collections_abc.pyi

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import sys
22
from abc import abstractmethod
33
from types import MappingProxyType
4-
from typing import ( # noqa: Y022,Y038,UP035
4+
from typing import ( # noqa: Y022,Y038,UP035,Y057
55
AbstractSet as Set,
66
AsyncGenerator as AsyncGenerator,
77
AsyncIterable as AsyncIterable,
88
AsyncIterator as AsyncIterator,
99
Awaitable as Awaitable,
10+
ByteString as ByteString,
1011
Callable as Callable,
1112
ClassVar,
1213
Collection as Collection,
@@ -59,12 +60,8 @@ __all__ = [
5960
"ValuesView",
6061
"Sequence",
6162
"MutableSequence",
63+
"ByteString",
6264
]
63-
if sys.version_info < (3, 14):
64-
from typing import ByteString as ByteString # noqa: Y057,UP035
65-
66-
__all__ += ["ByteString"]
67-
6865
if sys.version_info >= (3, 12):
6966
__all__ += ["Buffer"]
7067

stdlib/typing.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,7 @@ class TextIO(IO[str]):
923923
@abstractmethod
924924
def __enter__(self) -> TextIO: ...
925925

926-
if sys.version_info < (3, 14):
927-
ByteString: typing_extensions.TypeAlias = bytes | bytearray | memoryview
926+
ByteString: typing_extensions.TypeAlias = bytes | bytearray | memoryview
928927

929928
# Functions
930929

0 commit comments

Comments
 (0)