Skip to content

Commit 3e321d4

Browse files
sobolevnhugovk
andauthored
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 2eb9c1b commit 3e321d4

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎Doc/deprecations/pending-removal-in-3.21.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ Pending removal in Python 3.21
4141
* :mod:`typing`:
4242

4343
* :data:`typing.AnyStr` has been discouraged
44-
and deprecated since Python 3.16
44+
and deprecated since Python 3.13
4545
and is scheduled to be removed in Python 3.21.
4646
Use :pep:`695` syntax instead.

‎Lib/typing.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3543,7 +3543,7 @@ def __ror__(self, other):
35433543
TYPE_CHECKING = False
35443544

35453545
# Since `AnyStr` public API is deprecated since 3.16 and will be removed
3546-
# in 3.18, we need to keep `IO` protocol the same as it used to be:
3546+
# in 3.21, we need to keep `IO` protocol the same as it used to be:
35473547
class IO[AnyStr: (bytes, str)]:
35483548
"""Generic base class for TextIO and BinaryIO.
35493549
@@ -3951,7 +3951,7 @@ def __subclasscheck__(self, cls):
39513951
"typing.AnyStr",
39523952
message=(
39533953
"{name!r} is deprecated and slated for removal "
3954-
"in Python {remove}. Use PEP-695 type parameters "
3954+
"in Python {remove}. Use PEP 695 type parameters "
39553955
"with constraints instead"
39563956
),
39573957
remove=(3, 21),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Deprecate :data:`typing.AnyStr` type variable and raise a warning, when it
1+
Deprecate :data:`typing.AnyStr` type variable and raise a warning when it
22
is imported.

0 commit comments

Comments
 (0)