fix: forward :python option from compile-time config to uv fetch/init#48
Open
AJReade wants to merge 1 commit into
Open
fix: forward :python option from compile-time config to uv fetch/init#48AJReade wants to merge 1 commit into
AJReade wants to merge 1 commit into
Conversation
The :python option (e.g., "3.14t" for free-threaded builds) was read from Application.compile_env but never forwarded to Pythonx.Uv.fetch/3 or Pythonx.Uv.init/3. This caused uv to download the regular Python build instead of the free-threaded variant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
:pythonoption (e.g.,"3.14t"for free-threaded builds) set viaconfig :pythonx, :uv_initis read fromApplication.compile_envbut never forwarded toPythonx.Uv.fetch/3orPythonx.Uv.init/3uv syncto download the regular Python build instead of the requested variantContext
PR #45 added the
:pythonoption toPythonx.uv_init/2(the runtime function), which works correctly. However, the compile-time config path inapplication.exwas not updated to forward this option. Users following the recommended Mix project setup viaconfig :pythonx, :uv_initsilently get the wrong Python variant.Change
One line in
lib/pythonx/application.ex— read:pythonfrom the config and include it in the opts passed tofetch/3andinit/3:Verification
Tested on macOS aarch64. Before the fix,
config :pythonx, :uv_init, python: "3.14t"downloadscpython-3.14.3-macos-aarch64-none(regular). After the fix, it downloadscpython-3.14.3+freethreaded-macos-aarch64-noneand confirms GIL disabled.