Python 3.13: What’s New and Should You Use It?

What is new in Python 3.13: the new interactive interpreter, experimental free-threaded and JIT builds, 19 removed modules, and whether to use it today.

Python 3.13 is a stable release whose main changes are a new interactive interpreter, experimental free-threaded and JIT builds, and the removal of 19 old standard library modules. The experimental pieces matter more as groundwork for later releases than for everyday speed.

It was released on 7 October 2024. Regular bugfix releases ended on 1 October 2026, so it now gets security fixes only until October 2029; see Python 3.13 end of life.

At a glance

ChangeStatus in 3.13Reference
New interactive interpreterDefaultn/a
Free-threaded build (no GIL)Experimental, separate python3.13t executablePEP 703
JIT compilerExperimental, disabled by defaultPEP 744
locals() semanticsDefined, independent snapshots in functionsPEP 667
Dead-battery module removals19 modules removedPEP 594
iOS and AndroidSupported at tier 3PEP 730, PEP 738

A better interactive interpreter

The REPL was replaced with a new shell based on code from the PyPy project. It supports multiline editing with history preservation, commands such as help, exit and quit without calling them as functions, and colour in prompts and tracebacks by default. F1 opens interactive help, F2 browses history without the output and prompts, and F3 toggles paste mode. Set the PYTHON_BASIC_REPL environment variable to go back to the old shell, and use PYTHON_COLORS or NO_COLOR to control colour.

Experimental free-threaded build (PEP 703)

CPython 3.13 can run with the global interpreter lock disabled, so threads run Python code in parallel on several cores. It needs a different executable, usually python3.13t, available as an option in the official Windows and macOS installers or by building from source with --disable-gil. The release notes call it experimental and say to expect some bugs and a substantial single-threaded performance hit.

$ python3.13t -VV
Python 3.13.18 experimental free-threading build (main, ...)

$ python3.13t -c "import sys; print(sys._is_gil_enabled())"
False

Free-threaded builds can still run with the GIL on, using PYTHON_GIL=1 or -X gil=1. C extensions must be built for the free-threaded build, and importing one that does not declare support turns the GIL back on unless you force it off. Installing packages with C extensions needs pip 24.1 or newer. Python 3.14 made the free-threaded build officially supported; see free threading explained and what is new in Python 3.14.

Experimental JIT (PEP 744)

A just-in-time compiler is added when CPython is built with --enable-experimental-jit. The release notes say it is currently disabled by default and that the performance improvements are modest, with more expected over the next few releases. See the Python 3.15 JIT for how it has progressed.

Removed “dead batteries” (PEP 594)

PEP 594 removed 19 modules that were deprecated in Python 3.11:

aifc, audioop, cgi, cgitb, chunk, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu and xdrlib.

The lib2to3 package and the 2to3 tool were removed too. The What’s New page points to redistributions on PyPI for several of the modules, such as standard-cgi, standard-telnetlib and standard-aifc, if you cannot rewrite the code.

Other changes worth knowing

locals() has defined semantics (PEP 667). In functions, generators and comprehensions each call now returns an independent snapshot. Before 3.13 every call updated and returned the same dictionary:

def f():
    x = 1
    first = locals()
    x = 2
    second = locals()
    return first["x"], second["x"], first is second

print(f())   # 3.12: (2, 2, True)    3.13: (1, 2, False)

copy.replace() makes a modified copy of an object, including dataclasses:

import copy
from dataclasses import dataclass

@dataclass
class Point:
    x: int
    y: int

print(copy.replace(Point(1, 2), y=9))   # Point(x=1, y=9)

warnings.deprecated() (PEP 702) marks a function as deprecated at runtime and for type checkers; see Python type checkers compared:

from warnings import deprecated

@deprecated("Use new_api() instead")
def old_api(): ...

Also new: type parameter defaults, a PythonFinalizationError exception, deprecation of options in argparse, and dbm.sqlite3 as the default dbm backend.

Should you use it?

3.13 is a sound choice if your dependencies support it. If you are choosing today, compare it with 3.14 and 3.15 in Python 3.14 vs 3.15. If you are coming from an older version, see Python 3.12 end of life and Python 3.11 end of life.

Try it

With uv, uv python install 3.13 installs the standard build, and uv python install 3.13t installs the free-threaded one. Run python3.13 for the new REPL.

Frequently Asked Questions

When was Python 3.13 released?

Python 3.13 was released on 7 October 2024. It is supported until October 2029, and since 1 October 2026 it has received security fixes only.

What is new in Python 3.13?

A redesigned interactive interpreter, an experimental free-threaded build without the GIL (PEP 703), an experimental JIT compiler (PEP 744), coloured tracebacks, defined semantics for locals() (PEP 667), type parameter defaults, and the removal of 19 dead-battery modules such as cgi and telnetlib (PEP 594).

Is Python 3.13 faster than 3.12?

The release notes do not claim a general speed-up. The JIT is disabled by default and its gains are described as modest, and the free-threaded build has a substantial single-threaded performance hit, so neither changes everyday speed.

Can I turn off the GIL in Python 3.13?

Only with the separate free-threaded build, usually called python3.13t, which is experimental in 3.13. It became officially supported in Python 3.14 under PEP 779.

Should I upgrade to Python 3.13?

It is a reasonable target if your dependencies support it, with security fixes until October 2029. For a new project, compare it with 3.14 and 3.15, which are still receiving bugfix releases.