Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forced toolchain selection #1341

Open
lorenzogatti opened this issue Aug 19, 2024 · 0 comments
Open

Forced toolchain selection #1341

lorenzogatti opened this issue Aug 19, 2024 · 0 comments

Comments

@lorenzogatti
Copy link

Steps to Reproduce

There is no way to make Rye run a specific Python version: it uses the last indygreg downloadable version, ignoring other toolchains. At this moment, Python 3.12.5 is only available on Windows with the regular Python.org installer and I am forced to run Rye with Python 3.12.4.


$ /c/Users/redacted/.rye/shims/rye.exe toolchain list
cpython@3.12.4 (C:\Users\redacted\.rye\py\cpython@3.12.4\python.exe)

$ /c/Users/redacted/.rye/shims/rye.exe toolchain register "c:\python\python.exe"
Registered c:\python\python.exe as cpython@3.12.5

$ /c/Users/redacted/.rye/shims/rye.exe toolchain list
cpython@3.12.5 (\\?\C:\python\python.exe)
cpython@3.12.4 (C:\Users\redacted\.rye\py\cpython@3.12.4\python.exe)

$ /c/Users/redacted/.rye/shims/rye.exe toolchain list --include-downloadable | grep 3.12.5
cpython@3.12.5 (\\?\C:\python\python.exe)

$ /c/Users/redacted/.rye/shims/rye.exe toolchain list --include-downloadable | grep 3.12.4
cpython@3.12.4 (C:\Users\redacted\.rye\py\cpython@3.12.4\python.exe)
cpython-x86@3.12.4 (downloadable)

$ /c/Users/redacted/.rye/shims/rye.exe toolchain remove cpython@3.12.4
error: toolchain cpython@3.12.4 is still in use by rye itself

Moreover, it isn't at all clear how to upgrade to Python 3.12.5; will rye self update do it automatically when the downloadable toolchain is published?

Expected Result

Rye should run with any Python interpreter, and provide a way to specify which one among the registered toolchains.
In a project folder the Python version specified in .python-version or pyproject.toml should override a global setting (which, currently, exists only in Rye's internally managed virtual environment rather than in user-editable files).

Are there compelling technical reasons to exclude some Python interpreters, beyond the risk of library hell on Linux and bizarre misconfigurations on MacOS?

I can't deal with any more linux distribution weird Python installations or whatever mess there is on macOS.

If it's possible to register and use a toolchain, a toolchain that is good enough for the user's project should be good enough for Rye.

Actual Result

rye toolchain remove cpython@3.12.4
error: toolchain cpython@3.12.4 is still in use by rye itself

Version Info

Windows 10 64 bit, Rye 0.38, Python 3.12.5 (and forcibly 3.12.4)

Stacktrace

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant