fix(pip): parse the index_url from uv.lock file#3906
Conversation
This is so that the purl can be generated correctly and we pass the right index_url parameter to the whl_library file. Work towards bazel-contrib#1975
There was a problem hiding this comment.
Code Review
This pull request updates the uv.lock JSON parser to extract and populate the index_url for packages, and updates the corresponding tests to reflect this change. The reviewer identified potential issues with the current implementation, including a double-slash bug when the registry URL has a trailing slash, failure to resolve custom registries that do not end with 'simple', and potential runtime errors if source or registry is None. A code suggestion was provided to address these concerns.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This is so that the purl can be generated correctly and we
pass the right index_url parameter to the whl_library file.
Work towards #1975