After a year of development, has published a major release of the programming language Python 3.15. Changes include enabling UTF-8 by default, lazy loading of modules, experimental JIT compiler optimizations, frozendict and sentinel types, configuration files for initialization at startup, enhanced profiling capabilities, building in “-fno-omit-frame-pointer” mode, and a built-in text game “whatsnewt”. The new branch will be supported for one and a half years, after which another three and a half years will be developed for it to fix vulnerabilities.
Among the innovations added in Python 3.15 (1, 2, 3):
- The experimental JIT compiler has been modernized, which now allows an average speedup of 11-12% on the macOS AArch64 platform and 7-8% on the x86_64 Linux platform in pyperformance tests compared to the standard interpreter. Moreover, in some tests, when JIT is enabled, the change in performance varies from acceleration by more than 100% to slowdown by 15%. In addition to optimizing performance and improving machine code generation, the new version of JIT has redesigned the tracing mechanism, which now takes into account actual sequences of code execution, and not just predicts them, which has significantly expanded support for operations at the bytecode level. The transition to the LLVM 21 branch has been made. In the generated code, some operations with the stack are replaced with work using CPU registers.
Added support for stack unwinding for GDB and GNU backtrace(). - UTF-8 is used as the default encoding UTF-8, regardless of the system in which the code is executed. All I/O operations now treat text data as UTF-8 sequences unless an encoding is explicitly specified. To use parameters of the current locale or other encoding, the “encoding” argument must be specified (for example, “open(‘test.txt’, encoding=’locale’)”). You can disable UTF-8 mode at the interpreter level using the command line option “-X utf8=0” or the environment variable “PYTHONUTF8=0”.
/Reports, release notes, official announcements.