Skip to content

fix: skip PEP 508 marker-constrained packages in pip provider#1

Closed
ruromero wants to merge 1 commit into
mainfrom
TC-4044
Closed

fix: skip PEP 508 marker-constrained packages in pip provider#1
ruromero wants to merge 1 commit into
mainfrom
TC-4044

Conversation

@ruromero

@ruromero ruromero commented Apr 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Skip packages with PEP 508 environment markers (; separator) that are not installed in the current pip environment, instead of throwing PackageNotInstalledException
  • Strip marker suffixes from version strings before version-match comparison to prevent mismatches
  • Add test with mocked pip freeze/show data verifying pywin32 (Windows-only marker) is excluded while certifi (marker, installed) and six (no marker) are included

Closes: TC-4044

Test plan

  • New unit test test_marker_constrained_uninstalled_packages_are_skipped_in_component_analysis passes
  • All existing Python provider tests continue to pass
  • mvn spotless:apply produces no changes
  • CI pipeline passes

🤖 Generated with Claude Code

…vironment

When a requirements.txt contains packages with environment markers (e.g.,
`pywin32==306 ; platform_system == "Windows"`), pip only installs packages
whose markers match the current platform. The component analysis now detects
the semicolon marker separator and silently skips packages that have markers
but are not present in the pip freeze cache, instead of throwing a
PackageNotInstalledException. Also strips marker suffixes from version
strings before version-match comparison.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown

Test Results

381 tests   379 ✅  1m 28s ⏱️
 25 suites    2 💤
 25 files      0 ❌

Results for commit 310c568.

@ruromero ruromero closed this Apr 9, 2026
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