feat(7430) - Add support to spawn python REPL with uvx python or uvx python@<version>#7491
Closed
mikeleppane wants to merge 3 commits intoastral-sh:mainfrom
Closed
feat(7430) - Add support to spawn python REPL with uvx python or uvx python@<version>#7491mikeleppane wants to merge 3 commits intoastral-sh:mainfrom
feat(7430) - Add support to spawn python REPL with uvx python or uvx python@<version>#7491mikeleppane wants to merge 3 commits intoastral-sh:mainfrom
Conversation
…@<version> Related to issue astral-sh#7430
feat(7430) - Add support to spawn python interpreter with uvx python or uvx python<version>feat(7430) - Add support to spawn python REPL with uvx python or uvx python<version>
Add conditional checks for Linux/Windows
feat(7430) - Add support to spawn python REPL with uvx python or uvx python<version>feat(7430) - Add support to spawn python REPL with uvx python or uvx python@<version>
|
I think I like #7677 approach better. |
Contributor
Author
|
Hey, should I close this PR? It seems like no one's interested. Is this feature already implemented? |
Member
|
Sorry, I'm still interested but I think we might want a different approach to the implementation and haven't had the time to explore it myself to give a concrete recommendation. |
Member
|
I took this over in #11076 — your feedback would be welcome! |
zanieb
added a commit
that referenced
this pull request
Jan 30, 2025
Supersedes #7491 Closes #7430 Thanks @mikeleppane for starting this implementation. I took a bit of a different approach and it was easier to start over fresh, but I used some of the test cases there.
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
This PR adds support to spawn Python REPL with the following commands:
Test Plan
I added a few snapshot tests to the
crates/uv/tests/tool_run.rs.CI passes
Manual Tests
cargo run -- tool run python ░▒▓ 99% Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.42s Running `target/debug/uv tool run python` Python 3.12.1 (main, Jan 8 2024, 05:57:25) [Clang 17.0.6 ] on linux Type "help", "copyright", "credits" or "license" for more information. >>>Remarks/Questions
uvx python@latestdoes not work, and I'm unsure how to handle this. Is this a valid alternative?uvx pythonlaunches REPL from system env? Is that correct? Or should it take the default interpreter from the virtual environment?uvx python. E.g.--python?Related to issue #7430