File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -900,7 +900,7 @@ using ``[]``.
900900 :pep: `695 ` for more details.
901901
902902 Since Python 3.16, ``AnyStr `` is removed from ``typing.__all__ ``, and
903- deprecation warnings is emitted at runtime when it is accessed or
903+ deprecation warnings are emitted at runtime when it is accessed or
904904 imported from ``typing ``. ``AnyStr `` will be removed from ``typing ``
905905 in Python 3.18.
906906
Original file line number Diff line number Diff line change @@ -3922,7 +3922,15 @@ def __subclasscheck__(self, cls):
39223922 elif attr == "AnyStr" :
39233923 import warnings
39243924
3925- warnings ._deprecated ("typing.AnyStr" , remove = (3 , 18 ))
3925+ warnings ._deprecated (
3926+ "typing.AnyStr" ,
3927+ message = (
3928+ "{name!r} is deprecated and slated for removal "
3929+ "in Python {remove}. Use PEP-695 type parameters "
3930+ "with constraints instead"
3931+ ),
3932+ remove = (3 , 18 ),
3933+ )
39263934 AnyStr = globals ()["AnyStr" ] = TypeVar ('AnyStr' , bytes , str )
39273935 return AnyStr
39283936 else :
You can’t perform that action at this time.
0 commit comments