Skip to content

Upgrade pip to 26.0.1 to resolve relative path issue in pip-compile#15008

Closed
v-HaripriyaC wants to merge 1 commit into
mainfrom
chp/Upgrade-pipto25
Closed

Upgrade pip to 26.0.1 to resolve relative path issue in pip-compile#15008
v-HaripriyaC wants to merge 1 commit into
mainfrom
chp/Upgrade-pipto25

Conversation

@v-HaripriyaC
Copy link
Copy Markdown
Contributor

@v-HaripriyaC v-HaripriyaC commented May 13, 2026

based on the issue: #12663, since pip 25.2 version is incompatible, with pip-compile,

  • Upgraded pip from 24.2 to 26.0.1 in python/helpers/requirements.txt
  • Add VERSION_MATCHING_ERROR_REGEX handling in pip_compile_file_updater
  • Add piptools module check and version matching error handling in pip_compile_version_resolver
  • Add regression test for relative import paths (pip >25 issue)
  • Add fixture for pip_compile_relative_paths.txt

What are you trying to accomplish?

Anything you want to highlight for special attention from reviewers?

How will you know you've accomplished your goal?

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@v-HaripriyaC v-HaripriyaC force-pushed the chp/Upgrade-pipto25 branch 12 times, most recently from ea398c0 to 5ce42c5 Compare May 14, 2026 14:25
@v-HaripriyaC v-HaripriyaC marked this pull request as ready for review May 14, 2026 17:00
@v-HaripriyaC v-HaripriyaC requested a review from a team as a code owner May 14, 2026 17:00
@v-HaripriyaC v-HaripriyaC requested review from Copilot and kbukum1 May 14, 2026 17:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Python helper toolchain around pip/pip-compile behavior, adds handling for newer pip-compile resolution errors, and introduces regression coverage for relative requirement paths.

Changes:

  • Pins the Python helper pip version to 26.0.1.
  • Adds handling for pip-tools module errors and “Could not find a version that matches” failures.
  • Adds a regression fixture/spec for pip-compile relative path annotations and allow-lists two pip advisories in dependency review.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.github/workflows/dependency-review.yml Adds GHSA allow-list entries for pip advisories.
python/helpers/requirements.txt Updates the pinned pip helper version.
python/lib/dependabot/python/file_updater/pip_compile_file_updater.rb Converts pip-compile version-matching failures into DependencyFileNotResolvable.
python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb Adds piptools missing-module and version-matching error handling.
python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb Adds a regression spec for relative paths in pip-compile output.
python/spec/dependabot/python/update_checker/pip_compile_version_resolver_spec.rb Adds coverage for version-matching errors in the pip-compile error handler.
python/spec/fixtures/requirements/pip_compile_relative_paths.txt Adds a generated requirements fixture with relative # via -r annotations.

Comment thread python/spec/dependabot/python/file_updater/pip_compile_file_updater_spec.rb Outdated
Comment thread python/helpers/requirements.txt
Comment thread python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb Outdated
Comment thread python/lib/dependabot/python/update_checker/pip_compile_version_resolver.rb Outdated
Comment thread .github/workflows/dependency-review.yml Outdated
@v-HaripriyaC v-HaripriyaC changed the title Upgrade pip to 25.2 to resolve relative path issue in pip-compile Upgrade pip to 26.0.1 to resolve relative path issue in pip-compile May 14, 2026
@v-HaripriyaC v-HaripriyaC force-pushed the chp/Upgrade-pipto25 branch 2 times, most recently from fc6e2a7 to 2b2b19f Compare May 18, 2026 15:26
@v-HaripriyaC v-HaripriyaC requested a review from Copilot May 18, 2026 15:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Comment thread .github/workflows/dependency-review.yml Outdated
Comment thread python/spec/fixtures/requirements/pip_compile_relative_paths.txt Outdated
@v-HaripriyaC v-HaripriyaC force-pushed the chp/Upgrade-pipto25 branch from 2b2b19f to ff426a8 Compare May 18, 2026 17:08
Upgrade pip from 24.2 to 26.0.1 in the Python helpers requirements.
This resolves the relative path handling issue in pip-compile that
caused 'Could not find a version that matches' errors.

pip 26.0.1 is the highest version that still supports Python 3.9,
which is needed since dependabot-core supports Python 3.9.24.
pip 26.1+ drops Python 3.9 support.

Also adds error handling for version matching errors and
ModuleNotFoundError for piptools in the pip-compile resolvers.

Allow-lists GHSA-58qw-9mgm-455v and GHSA-jp4c-xjxw-mgf9 in the
dependency-review workflow since these are only fixed in pip 26.1+
which drops Python 3.9.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Comment on lines +245 to +247
check_original_requirements_resolvable
cleaned_message = clean_error_message(message)
raise DependencyFileNotResolvable, cleaned_message.empty? ? message : cleaned_message
Comment on lines +246 to +247
cleaned_message = clean_error_message(message)
raise DependencyFileNotResolvable, cleaned_message.empty? ? message : cleaned_message
Comment on lines +73 to +75
it "does not raise an error" do
expect { error_handler.handle_pipcompile_error(exception_message) }
.not_to raise_error
Comment on lines +30 to +32
allow-ghsas: >-
GHSA-58qw-9mgm-455v,
GHSA-jp4c-xjxw-mgf9
@v-HaripriyaC
Copy link
Copy Markdown
Contributor Author

fixing as part of #15058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants