Pending removal in Python 3.21
-
abc- Soft-deprecated since Python 3.3
abc.abstractclassmethod,abc.abstractstaticmethod, andabc.abstractpropertynow raise aDeprecationWarning. These classes will be removed in Python 3.21, instead useabc.abstractmethodwithclassmethod,staticmethod, andpropertyrespectively.
- Soft-deprecated since Python 3.3
-
ast:- Classes
slice,Index,ExtSlice,Suite,Param,AugLoadandAugStore, will be removed in Python 3.21. These types are not generated by the parser or accepted by the code generator. - The
dimsproperty ofast.Tuplewill be removed in Python 3.21. Use theast.Tuple.eltsproperty instead.
- Classes
-
functools:- Using a return annotation to infer the dispatch type for
functools.singledispatchorfunctools.singledispatchmethodis deprecated since Python 3.16 and will raiseTypeErrorin Python 3.21. Annotate the dispatch parameter or pass the dispatch type explicitly instead. (Contributed by Bartosz Sławecki in143465.)
- Using a return annotation to infer the dispatch type for
-
struct:- Soft-deprecated since Python 3.15, using
'F'and'D'type codes are now deprecated. These codes will be removed in Python 3.21. Use instead two-letter forms'Zf'and'Zd'.
- Soft-deprecated since Python 3.15, using
-
tempfile:tempfile._TemporaryFileWrapperwill be removed in Python 3.21. Use the publictempfile.TemporaryFileWrapperinstead.
这篇文档对你有帮助吗?
谢谢你的反馈!