Документация Python неофициальный перевод

pending-removal-in-3.20.md

49 строк · 4.6 КБ · обычная страница · сырой текст · скачать

1> **Источник:** https://python-all.ru/3.16/deprecations/pending-removal-in-3.20.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Ожидается удаление в Python 3.2089- Вызов метода `__new__()` объекта [`struct.Struct`](https://python-all.ru/3.16/library/struct.html#struct.Struct) без аргумента *format* устарел и будет удалён в Python 3.20. Вызов [`__init__()`](https://python-all.ru/3.16/reference/datamodel.html#object.__init__) метода для инициализированных объектов `Struct` устарел и будет удалён в Python 3.20.1011  (Вклад: Sergey B Kirpichev и Serhiy Storchaka в [gh-143715](https://python-all.ru/3.16/deprecations/pending-removal-in-3.20.html).)12- Атрибуты `__version__`, `version` и `VERSION` были объявлены устаревшими в этих модулях стандартной библиотеки и будут удалены в Python 3.20. Вместо них используйте [`sys.version_info`](https://python-all.ru/3.16/library/sys.html#sys.version_info).1314  - [`argparse`](https://python-all.ru/3.16/library/argparse.html#module-argparse)15  - [`csv`](https://python-all.ru/3.16/library/csv.html#module-csv)16  - [`ctypes`](https://python-all.ru/3.16/library/ctypes.html#module-ctypes)17  - `ctypes.macholib`18  - [`decimal`](https://python-all.ru/3.16/library/decimal.html#module-decimal) (используйте [`decimal.SPEC_VERSION`](https://python-all.ru/3.16/library/decimal.html#decimal.SPEC_VERSION) вместо)19  - [`http.server`](https://python-all.ru/3.16/library/http.server.html#module-http.server)20  - [`imaplib`](https://python-all.ru/3.16/library/imaplib.html#module-imaplib)21  - [`ipaddress`](https://python-all.ru/3.16/library/ipaddress.html#module-ipaddress)22  - [`json`](https://python-all.ru/3.16/library/json.html#module-json)23  - [`logging`](https://python-all.ru/3.16/library/logging.html#module-logging) (`__date__` также устарел)24  - [`optparse`](https://python-all.ru/3.16/library/optparse.html#module-optparse)25  - [`pickle`](https://python-all.ru/3.16/library/pickle.html#module-pickle)26  - [`platform`](https://python-all.ru/3.16/library/platform.html#module-platform)27  - [`re`](https://python-all.ru/3.16/library/re.html#module-re)28  - [`socketserver`](https://python-all.ru/3.16/library/socketserver.html#module-socketserver)29  - [`tabnanny`](https://python-all.ru/3.16/library/tabnanny.html#module-tabnanny)30  - [`tarfile`](https://python-all.ru/3.16/library/tarfile.html#module-tarfile)31  - [`tkinter.font`](https://python-all.ru/3.16/library/tkinter.font.html#module-tkinter.font)32  - [`tkinter.ttk`](https://python-all.ru/3.16/library/tkinter.ttk.html#module-tkinter.ttk)33  - [`wsgiref.simple_server`](https://python-all.ru/3.16/library/wsgiref.html#module-wsgiref.simple_server)34  - [`xml.etree.ElementTree`](https://python-all.ru/3.16/library/xml.etree.elementtree.html#module-xml.etree.ElementTree)35  - `xml.sax.expatreader`36  - [`xml.sax.handler`](https://python-all.ru/3.16/library/xml.sax.handler.html#module-xml.sax.handler)37  - [`zlib`](https://python-all.ru/3.16/library/zlib.html#module-zlib)3839  (Вклад: Hugo van Kemenade и Stan Ulbrych в [gh-76007](https://python-all.ru/3.16/deprecations/pending-removal-in-3.20.html).)40- Устаревшие элементы, определённые [**PEP 829**](https://python-all.ru/3.16/deprecations/pending-removal-in-3.20.html):4142  - Предупреждения выводятся для строк `import`, найденных в `name.pth` файлах.43  - Файлы `name.pth` больше не декодируются в кодировке локали по умолчанию. Они **ДОЛЖНЫ** быть закодированы в `utf-8-sig`.4445  (Вклад: Barry Warsaw в [gh-148641](https://python-all.ru/3.16/deprecations/pending-removal-in-3.20.html).)46- [`ast`](https://python-all.ru/3.16/library/ast.html#module-ast):4748  - Создание экземпляров абстрактных узлов AST (таких как [`ast.AST`](https://python-all.ru/3.16/library/ast.html#ast.AST) или `ast.expr`) устарело и будет вызывать ошибку в Python 3.20.49