I'm curious how the free-threaded build holds up in real production code, especially with C extensions. What breaks, and are the speedups noticeable outside benchmarks?
Anyone using free-threaded Python 3.14 in production yet?
Answers
One thing to check is whether an extension has re-enabled the GIL. A free-threaded build doesn't guarantee it stays off after every import. You can inspect the current state with sys._is_gil_enabled(), including after loading the libraries your application uses.
Reply to this answer
You can set PYTHON_GIL=0 to keep the GIL disabled even when importing an extension that hasn't declared free-threading support. That doesn't make the extension safe, though. Treat it as something to test carefully, not a shortcut around compatibility checks.
Reply to this answer
For speedups, the workload matters. CPU-bound data processing is a reasonable place to test, but extension compatibility can change whether threads actually run without the GIL. The discussion doesn't establish a production speedup or a general adoption pattern yet.
Reply to this answer
Add your answer
Answers are reviewed before publication.
7h+teacaddy_29:
Checking after the full application starts may catch imports that a small test misses.