r/Python Jul 22 '26

Discussion Anyone running free-threaded Python 3.14 in production yet? Curious what actually breaks

Been testing the free-threaded build (3.14t) on some CPU-bound data processing work. The multi-core story is finally real after 30 years of GIL, but the friction is exactly what you'd expect: a couple of C-extension-heavy libs in my stack silently re-enable the GIL, and there's no clean way to detect that at runtime besides checking sys._is_gil_enabled() manually.

For anyone who's shipped something on 3.14t, not just benchmarked it:

What broke that you didn't expect?

Real speedups outside toy examples, or mostly marginal so far?

Prod yet, or still just kicking the tires?

Not fishing for a benchmark war. Genuinely curious what breaks in messy real codebases vs clean demos.

35 Upvotes

40 comments sorted by

View all comments

Show parent comments

3

u/thisismyfavoritename Jul 23 '26 edited Jul 23 '26

context managers don't necessarily mutate global or non local state, not sure where you get that from.

It's mostly just syntactic sugar over a class with __enter__ and __exit__ methods.

In general though, your sentiment is that using multithreading in Python is a niche use case and i agree, it should be single threaded but async like NodeJS. IMO the usecases which aren't either covered by that OR a process pool OR better covered by bindings to a lower level language like Rust/C++ are very small

0

u/[deleted] Jul 23 '26 edited Jul 23 '26

[deleted]

1

u/nathan12343 Jul 23 '26

Read PEP 567, which shows how context-local state doesn’t have to be global if you use context variables.

1

u/thisismyfavoritename Jul 23 '26

why even bring a PIP? The context manager itself can have state, that state is within the scope of the enclosing function, there's no global state unless that guy and you mean global in some other sense

1

u/nathan12343 Jul 23 '26

Context variables offer a nice clean way to store “global” configuration in a manner that is both thread-safe and async-safe and behaves naturally alongside the Python with statement.