| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Allow specifying the Python version passed to uv via --python, enabling users to request free-threaded Python builds (e.g., "3.14t"). The python option is included in the project cache key so different variants get separate cache directories.
There was a problem hiding this comment.
This looks simple and lightweight enough to me!
Sorry, something went wrong.
There was a problem hiding this comment.
Ideally we would be able to specify it via pyproject.toml, but from what I checked that's not possible. That said, I think the option doesn't hurt and we can revisit as things change.
Sorry, something went wrong.
|
@jonatanklosko yes I agree. I was trying to find the least resistance path while python ecosystem resolving it :) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Adds a new :python option to Pythonx.uv_init/2 that gets passed as --python to uv sync, allowing users to request a specific Python variant — most notably free-threaded builds like "3.14t".
Motivation
Free-threaded Python (experimental in 3.13t, officially supported in 3.14t) removes the GIL, enabling true parallelism when calling Pythonx.eval/2 from multiple Elixir processes concurrently. As noted in
#23 and #39, this has been a requested feature. Now that Python 3.14t is officially supported and uv can install free-threaded builds via --python, this can be offered as an opt-in option without any
breaking changes.
No C++ NIF changes are needed — PyEval_RestoreThread/PyEval_SaveThread still exist in free-threaded Python as lightweight no-ops, and the wildcard lib/libpython3.*{.dylib,.so} already matches
libpython3.14t.{dylib,so}.
Changes
Follows the same pattern as :native_tls (#41):
variants (e.g., 3.14 vs 3.14t) get separate cache directories
Usage