Skip to content

Conversation

@levi42x
Copy link

@levi42x levi42x commented Nov 26, 2025

Fixes #4501

Description

This PR implements support for parsing Python UV package manager manifests in scancode-toolkit.

Changes

  • UvPyprojectTomlHandler: Parses pyproject.toml files with [tool.uv] sections
  • UvLockHandler: Parses uv.lock lockfiles with full dependency resolution
  • BaseUvPythonLayout: Manages UV project assembly and resource coordination
  • Helper functions:
    is_uv_pyproject_toml() for UV project detection
    parse_dependency_requirement() for PEP 508 dependency parsing

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: Shekhar Suman levi42x@gmail.com

- 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>
@levi42x levi42x force-pushed the feature/parse-uv_package branch from 64d01f0 to 900452d Compare November 27, 2025 03:45
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a 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.

levi42x and others added 4 commits January 5, 2026 23:00
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

Successfully merging this pull request may close these issues.

Support parsing python UV manifests

2 participants