Python 3.13

Python 3.13

After a year of development, a new stable version of the interpreted programming language Python 3.13 has been released. The release includes changes in the language itself and its standard library. Key changes include the use of a new interactive interpreter by default, experimental support for operation in free-threaded mode (i.e., with the global interpreter lock disabled) (PEP 703), and a JIT compiler (PEP 744).

From this release onward, a transition to a new release cycle for Python (Annual Release Cycle for Python, PEP 602) has been implemented, aimed at extending the period of "full support" for new releases:

  • Python 3.9–3.12 will have one and a half years of full support, followed by three and a half years of security fixes.
  • Python 3.13 and later releases will have two years of full support and three years of vulnerability fixes.

Work continues on improving error messages. Now tracebacks are highlighted by default. The built-in function locals() now has defined semantics for changing the returned mapping (PEP 667), and type parameters (typing.TypeVar, typing.ParamSpec, typing.TypeVarTuple) support default values (PEP 696).

Changes to the standard library include the removal of deprecated APIs and modules (aifc, audioop, cgi, cgitb, chunk, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, and xdrlib), as well as familiar improvements in user-friendliness and correctness. Several modules are excluded from distribution due to being marked deprecated in Python 3.11 (PEP 594), including the 2to3 tool and library.

Among the security improvements, ssl.create_default_context() now sets the default flags ssl.VERIFY_X509_PARTIAL_CHAIN and ssl.VERIFY_X509_STRICT.

Support for platforms has been added: Apple iOS and Android are now officially supported platforms (tier 3) (PEP 730, 738). wasm32-wasi is supported at the tier 2level, while official support for wasm32-emscripten has been discontinued.

For a more in-depth understanding of the new features in the release, refer to the official documentation (for the library, for the language). Follow the article "Transition to Python 3.13" to update your projects to the new version of the language. Also see changelog.

Source: linux.org.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster