https://github.com/python/cpython/commit/8aa856170dd79b17df87dc2b35472b1c50d14c4c
commit: 8aa856170dd79b17df87dc2b35472b1c50d14c4c
branch: 3.13
author: Alex Waygood <[email protected]>
committer: AlexWaygood <[email protected]>
date: 2025-09-19T18:51:39+01:00
summary:
[3.13] gh-118803: Fixup a few references in the 3.13 branch to the intended
removal date for `ByteString` (#139171)
files:
M Doc/deprecations/pending-removal-in-3.14.rst
M Doc/library/typing.rst
M Lib/_collections_abc.py
M Lib/typing.py
diff --git a/Doc/deprecations/pending-removal-in-3.14.rst
b/Doc/deprecations/pending-removal-in-3.14.rst
index 15606f61cf8b0c..0dc4233e926098 100644
--- a/Doc/deprecations/pending-removal-in-3.14.rst
+++ b/Doc/deprecations/pending-removal-in-3.14.rst
@@ -38,12 +38,6 @@ Pending Removal in Python 3.14
is no current event loop set and it decides to create one.
(Contributed by Serhiy Storchaka and Guido van Rossum in :gh:`100160`.)
-* :mod:`collections.abc`: Deprecated :class:`~collections.abc.ByteString`.
- Prefer :class:`!Sequence` or :class:`~collections.abc.Buffer`.
- For use in typing, prefer a union, like ``bytes | bytearray``,
- or :class:`collections.abc.Buffer`.
- (Contributed by Shantanu Jain in :gh:`91896`.)
-
* :mod:`email`: Deprecated the *isdst* parameter in
:func:`email.utils.localtime`.
(Contributed by Alan Williams in :gh:`72346`.)
@@ -96,9 +90,6 @@ Pending Removal in Python 3.14
if :ref:`named placeholders <sqlite3-placeholders>` are used and
*parameters* is a sequence instead of a :class:`dict`.
-* :mod:`typing`: :class:`~typing.ByteString`, deprecated since Python 3.9,
- now causes a :exc:`DeprecationWarning` to be emitted when it is used.
-
* :mod:`urllib`:
:class:`!urllib.parse.Quoter` is deprecated: it was not intended to be a
public API.
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 8d8d902fa6fd78..d66698921e6450 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -3953,7 +3953,7 @@ convenience. This is subject to change, and not all
deprecations are listed.
- :pep:`585`
* - :class:`typing.ByteString`
- 3.9
- - 3.14
+ - 3.17
- :gh:`91896`
* - :data:`typing.Text`
- 3.11
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py
index 650d30fbaa9ef8..6e224d36001cdb 100644
--- a/Lib/_collections_abc.py
+++ b/Lib/_collections_abc.py
@@ -1083,7 +1083,7 @@ def __new__(cls, name, bases, namespace, **kwargs):
warnings._deprecated(
"collections.abc.ByteString",
- remove=(3, 14),
+ remove=(3, 17),
)
return super().__new__(cls, name, bases, namespace, **kwargs)
@@ -1092,7 +1092,7 @@ def __instancecheck__(cls, instance):
warnings._deprecated(
"collections.abc.ByteString",
- remove=(3, 14),
+ remove=(3, 17),
)
return super().__instancecheck__(instance)
diff --git a/Lib/typing.py b/Lib/typing.py
index fe939a2e68b9bd..f9141640997933 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -2843,7 +2843,7 @@ class Other(Leaf): # Error reported by type checker
Sequence = _alias(collections.abc.Sequence, 1)
MutableSequence = _alias(collections.abc.MutableSequence, 1)
ByteString = _DeprecatedGenericAlias(
- collections.abc.ByteString, 0, removal_version=(3, 14) # Not generic.
+ collections.abc.ByteString, 0, removal_version=(3, 17) # Not generic.
)
# Tuple accepts variable number of parameters.
Tuple = _TupleType(tuple, -1, inst=False, name='Tuple')
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]