pending-removal-in-3.16.md
1> **Источник:** https://python-all.ru/3.15/deprecations/pending-removal-in-3.16.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Запланировано к удалению в Python 3.1689- Система импорта:1011 - Установка [`__loader__`](https://python-all.ru/3.15/reference/datamodel.html#module.__loader__) в модуле при отсутствии [`__spec__.loader`](https://python-all.ru/3.15/library/importlib.html#importlib.machinery.ModuleSpec.loader) устарела. В Python 3.16 `__loader__` перестанет устанавливаться или учитываться системой импорта или стандартной библиотекой.12- [`array`](https://python-all.ru/3.15/library/array.html#module-array):1314 - Код формата `'u'` (`wchar_t`) устарел в документации начиная с Python 3.3 и во время выполнения начиная с Python 3.13. Используйте код формата `'w'` ([`Py_UCS4`](https://python-all.ru/3.15/c-api/unicode.html#c.Py_UCS4)) для символов Unicode.15- [`asyncio`](https://python-all.ru/3.15/library/asyncio.html#module-asyncio):1617 - `asyncio.iscoroutinefunction()` устарело и будет удалено в Python 3.16; используйте [`inspect.iscoroutinefunction()`](https://python-all.ru/3.15/library/inspect.html#inspect.iscoroutinefunction) вместо этого. (Предложено Jiahao Li и Kumar Aditya в [gh-122875](https://python-all.ru/3.15/deprecations/pending-removal-in-3.16.html).)18 - Система политик [`asyncio`](https://python-all.ru/3.15/library/asyncio.html#module-asyncio) устарела и будет удалена в Python 3.16. В частности, следующие классы и функции устарели:1920 - [`asyncio.AbstractEventLoopPolicy`](https://python-all.ru/3.15/library/asyncio-policy.html#asyncio.AbstractEventLoopPolicy)21 - [`asyncio.DefaultEventLoopPolicy`](https://python-all.ru/3.15/library/asyncio-policy.html#asyncio.DefaultEventLoopPolicy)22 - [`asyncio.WindowsSelectorEventLoopPolicy`](https://python-all.ru/3.15/library/asyncio-policy.html#asyncio.WindowsSelectorEventLoopPolicy)23 - [`asyncio.WindowsProactorEventLoopPolicy`](https://python-all.ru/3.15/library/asyncio-policy.html#asyncio.WindowsProactorEventLoopPolicy)24 - [`asyncio.get_event_loop_policy()`](https://python-all.ru/3.15/library/asyncio-policy.html#asyncio.get_event_loop_policy)25 - [`asyncio.set_event_loop_policy()`](https://python-all.ru/3.15/library/asyncio-policy.html#asyncio.set_event_loop_policy)2627 Для использования нужной реализации цикла событий следует применять [`asyncio.run()`](https://python-all.ru/3.15/library/asyncio-runner.html#asyncio.run) или [`asyncio.Runner`](https://python-all.ru/3.15/library/asyncio-runner.html#asyncio.Runner) с параметром *loop\_factory*.2829 Например, чтобы использовать [`asyncio.SelectorEventLoop`](https://python-all.ru/3.15/library/asyncio-eventloop.html#asyncio.SelectorEventLoop) в Windows:3031 ```python32 import asyncio3334 async def main():35 ...3637 asyncio.run(main(), loop_factory=asyncio.SelectorEventLoop)38 ```3940 (Предложено Kumar Aditya в [gh-127949](https://python-all.ru/3.15/deprecations/pending-removal-in-3.16.html).)41- [`builtins`](https://python-all.ru/3.15/library/builtins.html#module-builtins):4243 - Поразрядная инверсия для булевых типов, `~True` или `~False` устарела начиная с Python 3.12, поскольку даёт неожиданные и неинтуитивные результаты (`-2` и `-1`). Используйте `not x` для логического отрицания булевого значения. В редких случаях, когда требуется поразрядная инверсия базового целого числа, явно преобразуйте в `int` (`~int(x)`).44- [`functools`](https://python-all.ru/3.15/library/functools.html#module-functools):4546 - Вызов реализации [`functools.reduce()`](https://python-all.ru/3.15/library/functools.html#functools.reduce) на Python с *function* или *sequence* в качестве именованных аргументов устарел начиная с Python 3.14.47- [`logging`](https://python-all.ru/3.15/library/logging.html#module-logging):4849 - Поддержка пользовательских обработчиков логирования с аргументом *strm* устарела и запланирована к удалению в Python 3.16. Вместо этого определяйте обработчики с аргументом *stream*. (Предложено Mariusz Felisiak в [gh-115032](https://python-all.ru/3.15/deprecations/pending-removal-in-3.16.html).)50- [`mimetypes`](https://python-all.ru/3.15/library/mimetypes.html#module-mimetypes):5152 - Допустимые расширения начинаются с точки ‘.’ или пусты для [`mimetypes.MimeTypes.add_type()`](https://python-all.ru/3.15/library/mimetypes.html#mimetypes.MimeTypes.add_type). Расширения без точки устарели и будут вызывать [`ValueError`](https://python-all.ru/3.15/library/exceptions.html#ValueError) в Python 3.16. (Предложено Hugo van Kemenade в [gh-75223](https://python-all.ru/3.15/deprecations/pending-removal-in-3.16.html).)53- [`shutil`](https://python-all.ru/3.15/library/shutil.html#module-shutil):5455 - Исключение `ExecError` устарело начиная с Python 3.14. Оно не используется ни одной функцией в `shutil` начиная с Python 3.4 и теперь является псевдонимом [`RuntimeError`](https://python-all.ru/3.15/library/exceptions.html#RuntimeError).56- [`symtable`](https://python-all.ru/3.15/library/symtable.html#module-symtable):5758 - Метод [`Class.get_methods`](https://python-all.ru/3.15/library/symtable.html#symtable.Class.get_methods) устарел начиная с Python 3.14.59- [`sys`](https://python-all.ru/3.15/library/sys.html#module-sys):6061 - Функция [`_enablelegacywindowsfsencoding()`](https://python-all.ru/3.15/library/sys.html#sys._enablelegacywindowsfsencoding) устарела начиная с Python 3.13. Используйте переменную окружения [`PYTHONLEGACYWINDOWSFSENCODING`](https://python-all.ru/3.15/using/cmdline.html#envvar-PYTHONLEGACYWINDOWSFSENCODING).62- [`sysconfig`](https://python-all.ru/3.15/library/sysconfig.html#module-sysconfig):6364 - Функция `sysconfig.expand_makefile_vars()` устарела начиная с Python 3.14. Используйте аргумент `vars` из [`sysconfig.get_paths()`](https://python-all.ru/3.15/library/sysconfig.html#sysconfig.get_paths).65- [`tarfile`](https://python-all.ru/3.15/library/tarfile.html#module-tarfile):6667 - Недокументированный и неиспользуемый атрибут `TarFile.tarfile` устарел начиная с Python 3.13.68