Red HatLumír BalharAnnouncement
Python 3.14 free-threaded build is now available in RHEL
Summary
Red Hat Enterprise Linux 9.8 and 10.2 now provide a free-threaded Python 3.14 build alongside the regular interpreter, enabling developers to test parallel CPU execution with threads. The build disables the GIL, allowing Python threads to execute on multiple CPU cores in one process, while built-in dict, list, and set operations retain internal locking for individual operations. Developers install the python3.14-freethreading package from the CodeReady Linux Builder repository; it provides the separate python3.14t executable and commands to verify free-threading support and GIL status. Existing code may expose race conditions, and unsupported C-extension dependencies can re-enable the GIL, so the source recommends testing, dependency checks, explicit synchronization, and workload measurement. The build carries a stated 5%-10% single-threaded performance overhead and mainly targets CPU-bound threaded workloads.
Context
The free-threaded build is available for developers on RHEL 9.8 and 10.2 through the Red Hat CodeReady Linux Builder repositories. It can be installed alongside other Python interpreters without replacing the system Python.
Approach / What changed
Install the python3.14-freethreading package after enabling the appropriate CodeReady Linux Builder repository, then run the separate python3.14t executable. Developers can verify build support with -VV or inspect Py_GIL_DISABLED and sys._is_gil_enabled(), run their test suite, check dependency compatibility, add explicit synchronization, and measure relevant workloads.
Takeaways
The free-threaded build allows Python threads to execute CPU-bound Python code across multiple cores in a single process, but I/O-bound and single-threaded workloads may see little benefit.
dict, list, and set operations protect individual operations with internal locks, but sequences of operations are not atomic and may require threading.Lock, queues, or other synchronization.
Third-party modules, especially C extensions, can cause Python to re-enable the GIL; the build also has a stated 5%-10% single-threaded performance overhead.
FAQ
How can developers install and verify the free-threaded interpreter on RHEL?
Enable the CodeReady Linux Builder repository and install the python3.14-freethreading package. Run python3.14t, then use python3.14t -VV or inspect Py_GIL_DISABLED and sys._is_gil_enabled() to check support and current GIL status.
Will existing threaded Python code remain safe without the GIL?
Not necessarily. Individual built-in container operations are protected, but sequences of operations can interleave and expose race conditions, so shared mutable state may need explicit synchronization.
Can dependencies prevent an application from receiving the full free-threading benefit?
Yes. An extension module that does not support free-threaded Python can cause Python to enable the GIL again for the process. PYTHON_GIL=0 or -Xgil=0 can override this when the workload is known to be safe, but the source describes that choice as being at the developer's risk.
Source and freshness
- Source
- developers.redhat.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.