#570: Free-Threaded Python

Listen through the publisher, then discuss the episode here or arrange an in-person Roundtable. Your city determines where to meet.
Roundtables are designed for groups of four, with a shared subject and room for everyone to speak. Come for discussion, with no dating expectation.
NumPy already releases the GIL. So threads should already pay off for your NumPy code, right? Christopher Ariza tested that. He summed the rows of a 10,000 by 10,000 array on Python 3.14. Sequential took 360 milliseconds. A thread pool took 373, slower than doing nothing. The same code on free-threaded Python 3.14t took 83.7 milliseconds. Free-threaded Python is officially supported as of 3.14. The GIL isn’t gone, though. It’s a zombie. Import one compiled package that hasn’t opted in, psycopg2 for example, and the GIL comes back for your entire process. You get a warning, not an error. Chris is the creator of StaticFrame and its C extension library ArrayKit. We dig into when threads beat plain NumPy, how to tell if you’re actually running free-threaded, and conditional-futures, his drop-in thread pool that stops your code from getting slower when the GIL wakes back up. Episode sponsors Talk Python Membership (https://talkpython.fm/talk-python-membership-fewer-ads) Talk Python Courses (https://talkpython.fm/training) Links from the show Guest Christopher Ariza: github.com (https://github.com/flexatone?featured_on=talkpython) GIL Guard project: mkennedy.codes (https://mkennedy.codes/posts/catch-the-import-name-the-culprit-keep-threads-free-introducing-gilguard/?featured_on=talkpython) chameleon-rs: mkennedy.codes (https://mkennedy.codes/posts/chameleon-templates-modernized-chameleon-rs/?featured_on=talkpython) diskcache-oxide: mkennedy.codes (https://mkennedy.codes/docs/diskcache-oxide/?featured_on=talkpython) Black Friday at Talk Python: talkpython.fm/black-friday (https://talkpython.fm/black-friday) episode 204: talkpython.fm (https://talkpython.fm/episodes/show/204/staticframe-like-pandas-but-safer) Fetter: fetter.io (https://fetter.io/?featured_on=talkpython) PyBay 2026: pybay.org (https://pybay.org/?featured_on=talkpython) StaticFrame: github.com (https://github.com/static-frame/static-frame?featured_on=talkpython) Free-threaded row-wise apply: static-frame.readthedocs.io (https://static-frame.readthedocs.io/en/latest/articles/freethread.html?featured_on=talkpython) Getting Started with Free-Threaded Python Using NumPy: github.com (https://github.com/flexatone/present-free-thread?featured_on=talkpython) Free-threaded Python: docs.python.org (https://docs.python.org/3/howto/free-threading-python.html?featured_on=talkpython) abi3t: peps.python.org (https://peps.python.org/pep-0803/?featured_on=talkpython) TonIO: talkpython.fm (https://talkpython.fm/episodes/show/561/tonio-a-multi-threaded-async-runtime-for-python) did a whole course: training.talkpython.fm (https://training.talkpython.fm/courses/python-concurrency-deep-dive) psycopg2: pypi.org (https://pypi.org/project/psycopg2/?featured_on=talkpython) ArrayKit: github.com (https://github.com/static-frame/arraykit?featured_on=talkpython) 217 of the top 360: hugovk.dev (https://hugovk.dev/free-threaded-wheels/?featured_on=talkpython) Quansights free-threading guide: py-free-threading.github.io (https://py-free-threading.github.io/?featured_on=talkpython) conditional-futures: github.com (https://github.com/static-frame/conditional-futures?featured_on=talkpython) rayon: github.com (https://github.com/rayon-rs/rayon?featured_on=talkpython) Watch this episode on YouTube: youtube.com (https://www.youtube.com/watch?v=9PhWaXMOjqw) Episode #570 deep-dive: talkpython.fm/570 (https://talkpython.fm/episodes/show/570/free-threaded-python) Episode transcripts: talkpython.fm (https://talkpython.fm/episodes/show/570/free-threaded-python) Theme Song: Developer Rap Served in a Flask : talkpython.fm/flasksong (https://talkpython.fm/flasksong) ---== Don't be a stranger ==--- YouTube: youtube.com/@talkpython (https://talkpython.fm/youtube) Bluesky: @talkpython.fm (https://bsky.app/profile/talkpython.fm) X.com: @talkpython (https://x.com/talkpython)
Episode information is provided by the publisher. Listening takes place on the publisher’s service.
Listen at the source ↗









