Skip to content

fix(python): handle PEP 440 direct references and path dependencies in uv export#2

Closed
a-oren wants to merge 4 commits into
mainfrom
TC-4538
Closed

fix(python): handle PEP 440 direct references and path dependencies in uv export#2
a-oren wants to merge 4 commits into
mainfrom
TC-4538

Conversation

@a-oren

@a-oren a-oren commented May 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Skip PEP 440 direct references (name @ url) and path dependencies (./, ../, /) in parseUvExport() with log.fine() warning instead of throwing IOException
  • Set currentKey = null after skipping to prevent # via comments from corrupting the dependency graph of other packages
  • Add test fixture with mixed direct refs and normal packages, plus 7 new unit tests covering skip behavior, graph integrity, and integration with provideStack()/provideComponent()

Implements TC-4538

Test plan

  • parseUvExport() skips PEP 440 direct references without throwing
  • parseUvExport() skips path dependencies (./, ../, /) without throwing
  • Packages following skipped lines are parsed correctly
  • # via comments after skipped packages do not corrupt the graph
  • provideStack() and provideComponent() succeed with direct refs in export output
  • Existing tests pass (27/27)
  • mvn spotless:check passes

🤖 Generated with Claude Code

…n uv export

Skip PEP 440 direct references (name @ url) and path dependencies (./,
../, /) in parseUvExport() with a log.fine() warning instead of throwing
an IOException. These lines lack pinned versions needed for the dependency
graph. Set currentKey to null after skipping to prevent # via comments
from corrupting the graph of other packages.

Implements TC-4538

Signed-off-by: Adva Oren <aoren@redhat.com>
Assisted-by: Claude Code
@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown

Test Results

527 tests   525 ✅  1m 14s ⏱️
 35 suites    2 💤
 35 files      0 ❌

Results for commit 0eb3aea.

♻️ This comment has been updated with latest results.

a-oren added 3 commits May 21, 2026 12:00
…, add ~/Windows path support

Address code review feedback:
- Extract isDirectReference() and isPathDependency() helper methods for
  clearer naming and a single place to extend edge case handling
- Add ~/home-relative and Windows drive path (C:\) detection
- Add test for # via graph corruption after skipped path dependencies

Implements TC-4538

Signed-off-by: Adva Oren <aoren@redhat.com>
Assisted-by: Claude Code
@a-oren a-oren closed this Jun 4, 2026
@a-oren
a-oren deleted the TC-4538 branch June 4, 2026 06:48
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.

1 participant