Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 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
Prev Previous commit
.
  • Loading branch information
AlexWaygood committed Sep 18, 2025
commit 3ee08b6c12357a3f68d6c7a965577bdd0dade7e2
6 changes: 6 additions & 0 deletions stdlib/@tests/stubtest_allowlists/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ _collections_abc.AsyncGenerator.__anext__
_collections_abc.AsyncGenerator.aclose
_collections_abc.AsyncIterator.__anext__

# Pretend typing.ByteString is a Union, to better match its documented semantics.
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
# because it's not an ABC that makes any sense and was deprecated in 3.12
_collections_abc\.ByteString
typing\.ByteString

_collections_abc.Callable # Typing-related weirdness
_collections_abc.Mapping.get # Adding None to the Union messed up mypy
_collections_abc.Sequence.index # Supporting None in end is not mandatory
Expand Down
7 changes: 0 additions & 7 deletions stdlib/@tests/stubtest_allowlists/py310.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,12 @@ tkinter.tix.TkVersion
# <= 3.13
# =======

# Pretend typing.ByteString is a Union, to better match its documented semantics.
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
# because it's not an ABC that makes any sense and was deprecated in 3.12
_collections_abc.ByteString

ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any

_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None

importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.

typing\.ByteString

# Will always raise. Not included to avoid type checkers inferring that
# TypeAliasType instances are callable.
typing_extensions.TypeAliasType.__call__
Expand Down
7 changes: 0 additions & 7 deletions stdlib/@tests/stubtest_allowlists/py311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,12 @@ tkinter.tix.TkVersion
# <= 3.13
# =======

# Pretend typing.ByteString is a Union, to better match its documented semantics.
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
# because it's not an ABC that makes any sense and was deprecated in 3.12
_collections_abc.ByteString

ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any

_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None

importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.

typing\.ByteString

# Will always raise. Not included to avoid type checkers inferring that
# TypeAliasType instances are callable.
typing_extensions.TypeAliasType.__call__
Expand Down
7 changes: 0 additions & 7 deletions stdlib/@tests/stubtest_allowlists/py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,12 @@ tkinter.tix.TkVersion
# <= 3.13
# =======

# Pretend typing.ByteString is a Union, to better match its documented semantics.
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
# because it's not an ABC that makes any sense and was deprecated in 3.12
_collections_abc.ByteString

ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any

_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None

importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.

typing\.ByteString

# Will always raise. Not included to avoid type checkers inferring that
# TypeAliasType instances are callable.
typing_extensions.TypeAliasType.__call__
Expand Down
7 changes: 0 additions & 7 deletions stdlib/@tests/stubtest_allowlists/py313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,12 @@ typing(_extensions)?\.IO\.writelines
# <= 3.13
# =======

# Pretend typing.ByteString is a Union, to better match its documented semantics.
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
# because it's not an ABC that makes any sense and was deprecated in 3.12
_collections_abc.ByteString

ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any

_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None

importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.

typing\.ByteString

# Will always raise. Not included to avoid type checkers inferring that
# TypeAliasType instances are callable.
typing_extensions.TypeAliasType.__call__
Expand Down
9 changes: 1 addition & 8 deletions stdlib/@tests/stubtest_allowlists/py39.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ collections.AsyncGenerator.__anext__ # async at runtime, deliberately not in th
collections.AsyncGenerator.aclose # async at runtime, deliberately not in the stub, see #7491
collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
collections.AsyncIterator.__anext__ # async at runtime, deliberately not in the stub, see #7491
collections.ByteString # see comments in py3_common.txt
collections.ByteString # see comments in common.txt
collections.Callable
collections.Mapping.get # Adding None to the Union messed up mypy
collections.Sequence.index # Supporting None in end is not mandatory
Expand Down Expand Up @@ -104,19 +104,12 @@ tkinter.tix.TkVersion
# <= 3.13
# =======

# Pretend typing.ByteString is a Union, to better match its documented semantics.
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
# because it's not an ABC that makes any sense and was deprecated in 3.12
_collections_abc.ByteString

ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any

_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None

importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.

typing\.ByteString

# Will always raise. Not included to avoid type checkers inferring that
# TypeAliasType instances are callable.
typing_extensions.TypeAliasType.__call__
Expand Down
4 changes: 1 addition & 3 deletions stdlib/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ __all__ = [
"AsyncIterator",
"Awaitable",
"BinaryIO",
"ByteString",
"Callable",
"ChainMap",
"ClassVar",
Expand Down Expand Up @@ -109,9 +110,6 @@ __all__ = [
"runtime_checkable",
]

if sys.version_info < (3, 14):
__all__ += ["ByteString"]

if sys.version_info >= (3, 14):
__all__ += ["evaluate_forward_ref"]

Expand Down
Loading