Conversation
…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
Test Results527 tests 525 ✅ 1m 10s ⏱️ Results for commit 7c1fa00. ♻️ This comment has been updated with latest results. |
…quirements.txt (guacsec#485) ## Summary - Adds `preprocessRequirementsLines()` to `PythonControllerBase` that properly handles all requirements.txt line types before dependency resolution - Fixes parsing errors when requirements.txt contains `--extra-index-url`, `--hash`, line continuations (`\`), and other non-package lines - Handles: pip options, inline options (--hash, --config-settings), line continuations, PEP 508 direct references (`name @ url`), bare URLs, VCS URLs, and local paths Fixes [TC-4527](https://redhat.atlassian.net/browse/TC-4527) Related: fabric8-analytics/fabric8-analytics-vscode-extension#843 ## Test plan - [x] 13 unit tests covering all requirements.txt line types - [x] Existing `getIgnoredDependencies_strips_environment_markers` test passes - [ ] Manual verification with requirements.txt files containing `--extra-index-url` and line continuations 🤖 Generated with [Claude Code](https://claude.com/claude-code) [TC-4527]: https://redhat.atlassian.net/browse/TC-4527?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ ## Summary by Sourcery Improve Python requirements.txt preprocessing to robustly handle pip options, hashes, line continuations, and non-package lines before dependency resolution. Bug Fixes: - Fix handling of requirements.txt entries that include pip options, hashes, line continuations, direct references, bare URLs, VCS URLs, and local paths so they no longer break dependency parsing and installation. Enhancements: - Introduce a reusable preprocessing routine for requirements.txt lines and apply it across Python dependency resolution and ignored-dependency detection to ensure consistent parsing behavior. Tests: - Add unit tests covering preprocessing of all supported requirements.txt line variants, including pip options, hashes, line continuations, direct references, URLs, local paths, and mixed scenarios. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…, 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
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.
Summary
name @ url) and path dependencies (./,../,/) inparseUvExport()withlog.fine()warning instead of throwingIOExceptioncurrentKey = nullafter skipping to prevent# viacomments from corrupting the dependency graph of other packagesprovideStack()/provideComponent()Implements TC-4538
Test plan
parseUvExport()skips PEP 440 direct references without throwingparseUvExport()skips path dependencies (./,../,/) without throwing# viacomments after skipped packages do not corrupt the graphprovideStack()andprovideComponent()succeed with direct refs in export outputmvn spotless:checkpasses🤖 Generated with Claude Code