Skip to content

Parse all requirements files in requirements-only Python projects#7323

Merged
sambsnyd merged 2 commits intomainfrom
Jenson3210/py-all-req-markers
Apr 8, 2026
Merged

Parse all requirements files in requirements-only Python projects#7323
sambsnyd merged 2 commits intomainfrom
Jenson3210/py-all-req-markers

Conversation

@Jenson3210
Copy link
Copy Markdown
Contributor

@Jenson3210 Jenson3210 commented Apr 8, 2026

Summary

  • parseManifest previously used .findFirst() to pick only one requirements file, ignoring others like requirements-dev.txt

  • Changed to collect and parse all matching requirements files, each receiving its own PythonResolutionResult marker

  • Added integration test verifying multiple requirements files get distinct markers

  • Closes moderneinc/customer-requests#2157

Test plan

  • includesAllRequirementsTxtFiles integration test passes — verifies both requirements.txt and requirements-dev.txt are parsed with distinct PythonResolutionResult markers pointing to their respective paths
  • Existing includesRequirementsTxt and pyprojectTomlTakesPriorityOverRequirementsTxt tests still pass

Previously parseManifest only picked the first matching requirements
file via findFirst(). Projects with multiple requirements files
(e.g. requirements.txt, requirements-dev.txt) would only have one
file with a PythonResolutionResult marker, so dependency recipes
like FFVD could not operate on the others.

Closes moderneinc/customer-requests#2157
@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in OpenRewrite Apr 8, 2026
@sambsnyd sambsnyd merged commit 6e9b467 into main Apr 8, 2026
1 check passed
@sambsnyd sambsnyd deleted the Jenson3210/py-all-req-markers branch April 8, 2026 21:19
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants