Major new features of the 3.13 series, compared to 3.12
Some of the new major new features and changes in Python 3.13 are:
- New features
- A new and improved interactive interpreter, based on
PyPy's, featuring multi-line editing and color support, as
well as colorized exception tracebacks.
- An experimental free-threaded build mode, which disables
the Global Interpreter Lock, allowing threads to run
more concurrently. The build mode is available as an
experimental feature in the Windows and macOS installers as
well.
- A preliminary, experimental JIT, providing the ground work
for significant performance improvements.
- The locals() builtin function (and its C equivalent)
now has well-defined semantics when mutating the
returned mapping, which allows debuggers to operate more
consistently.
- A modified version of mimalloc is now included, optional
but enabled by default if supported by the platform, and
required for the free-threaded build mode.
- Docstrings now have their leading indentation stripped,
reducing memory use and the size of .pyc files. (Most tools
handling docstrings already strip leading indentation.)
- The dbm module has a new dbm.sqlite3 backend that is used
by default when creating new files.
- WASI is now a Tier 2 supported platform. Emscripten is
no longer an officially supported platform (but Pyodide
continues to support Emscripten).
- Typing
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=56
- The most important change is rolling back the incremental
cyclic garbage collector (GC), which was added in one of
the alpha releases. The incremental GC had more significant
performance regressions in specific workloads than we
expected.
- Tests
- gh-124378: Updated test_ttk to pass with Tcl/Tk 8.6.15.
- Library
- gh-124538: Fixed crash when using gc.get_referents() on a
capsule object.
- gh-124498: Fix typing.TypeAliasType not to be generic, when
type_params is an empty tuple.
- gh-123017: Due to unreliable results on some devices,
time.strftime() no longer accepts negative years on
Android.
- gh-123014: os.pidfd_open() and signal.pidfd_send_signal()
are now unavailable when building against Android API
levels older than 31, since the underlying system calls may
cause a crash.
- gh-124248: Fixed potential crash when using struct to
process zero-width ‘Pascal string’ fields (0p).
- gh-87041: Fix a bug in argparse where lengthy subparser
argument help is incorrectly indented.
- gh-124212: Fix invalid variable in venv handling of failed
symlink on Windows
- gh-124171: Add workaround for broken fmod() implementations
on Windows, that loose zero sign (e.g. fmod(-10, 1) returns
0.0). Patch by Sergey B Kirpichev.
- gh-123934: Fix unittest.mock.MagicMock reseting magic
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=51