-
-
Notifications
You must be signed in to change notification settings - Fork 657
feat: Add UV package manager support for Python projects #4616
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
Open
levi42x
wants to merge
5
commits into
aboutcode-org:develop
Choose a base branch
from
levi42x:feature/parse-uv_package
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Implement UvPyprojectTomlHandler to parse pyproject.toml with [tool.uv] sections - Implement UvLockHandler to parse uv.lock lockfiles - Add BaseUvPythonLayout for UV project assembly logic - Add is_uv_pyproject_toml() helper for UV project detection - Add parse_dependency_requirement() helper for dependency parsing - Support standard dependencies, dev-dependencies, and optional groups - Handle UV lockfile format with [[package]] entries and markers - Add comprehensive test fixtures and test cases Signed-off-by: Shekhar Suman levi42x@gmail.com Signed-off-by: Shekhar <shekharsuman0397@gmail.com>
64d01f0 to
900452d
Compare
AyanSinhaMahapatra
requested changes
Dec 15, 2025
Member
AyanSinhaMahapatra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks++ @levi42x for the PR, much needed update! ❤️
This is a great start and a step in the right direction, but needs some more updates and love. See my comments for your consideration.
Co-authored-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Simplify the `is_uv_pyproject_toml` function as suggested.
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.
Fixes #4501
Description
This PR implements support for parsing Python UV package manager manifests in scancode-toolkit.
Changes
UvPyprojectTomlHandler: Parsespyproject.tomlfiles with[tool.uv]sectionsUvLockHandler: Parsesuv.locklockfiles with full dependency resolutionBaseUvPythonLayout: Manages UV project assembly and resource coordinationis_uv_pyproject_toml()for UV project detectionparse_dependency_requirement()for PEP 508 dependency parsingTasks
Run tests locally to check for errors.
Signed-off-by: Shekhar Suman levi42x@gmail.com