#2100: Resolve python versions via uv instead of ide-urls#2152
Open
Paras14 wants to merge 3 commits into
Open
Conversation
d7bbc4b to
9e63620
Compare
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.
This PR fixes #2100
Implemented changes:
PythonRepository, aToolRepositorythat resolves the list of installable Python versions fromuv python listinstead of fromide-urls.Pythonnow uses this repository via an override ofgetToolRepository().PythonUrlUpdaterand had nodarwin/x64(Intel Mac) branch. Installable versions (e.g. 3.14.6) were therefore reported as "not found" on Intel Mac. Sourcing versions fromuv(the tool that actually installs Python) removes this class of gap, sinceuvonly lists versions it can install for the current OS/architecture. Still entries for Intel Macs(darwin/x64), Windows on arm(win32/arm64), and Linux on arm(linux/arm64).Uv#parsePythonListJson(...)(defensive JSON parsing ofuv python list) and thePythonUvListEntryrecord, with non-CPython entries (e.g. PyPy) are filtered out.getPythonRepository()intoIdeContextandAbstractIdeContextfetchUvPythonList()uses therunToolvariant that ensuresuvis installed before running it.ide-urls, which only need the tool folder andare unaffected by the per-platform gap.
UvRepository.Testing instructions
Automated:
PythonRepositoryTest.javaandPythonTest.java.Manual:
uvavailable, you can confirm thatuv python list --all-versions --only-downloads --output-format json --no-configlists the expected CPython versions for your platform.uvis not yet installed, runide install python 3.14*. Expected:uvis installed first, thenuv python listresolves 3.14.6, then Python 3.14.6 is installed successfully. Make sure you do it in a different new folder.Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)internal