Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pipenv from 2022.4.8 to 2023.7.23 in /python/helpers #7715

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/helpers/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pip==23.2.0
pip-tools==7.2.0
hashin==0.17.0
pipenv==2022.4.8
pipenv==2023.7.23
pipfile==0.0.2
poetry==1.5.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ class UpdateChecker
# just raise if the latest version can't be resolved. Knowing that is
# still better than nothing, though.
class PipenvVersionResolver
# rubocop:disable Layout/LineLength
GIT_DEPENDENCY_UNREACHABLE_REGEX = /git clone -q (?<url>[^\s]+).* /
GIT_REFERENCE_NOT_FOUND_REGEX = %r{git checkout -q (?<tag>[^\n"]+)\n?[^\n]*/(?<name>.*?)(\\n'\]|$)}m
PIPENV_INSTALLATION_ERROR = "pipenv.patched.notpip._internal.exceptions.InstallationError: Command errored out" \
GIT_DEPENDENCY_UNREACHABLE_REGEX = /git clone --filter=blob:none (?<url>[^\s]+).*/
GIT_REFERENCE_NOT_FOUND_REGEX = /git checkout -q (?<tag>[^\s]+).*/
PIPENV_INSTALLATION_ERROR = "pipenv.patched.pip._internal.exceptions.InstallationError: Command errored out" \
" with exit status 1: python setup.py egg_info"
TRACEBACK = "Traceback (most recent call last):"
PIPENV_INSTALLATION_ERROR_REGEX =
Expand All @@ -41,7 +40,6 @@ class PipenvVersionResolver
UNSUPPORTED_DEP_REGEX =
/Could not find a version that satisfies the requirement.*(?:#{UNSUPPORTED_DEPS.join("|")})/
PIPENV_RANGE_WARNING = /Warning:\sPython\s[<>].* was not found/
# rubocop:enable Layout/LineLength

DEPENDENCY_TYPES = %w(packages dev-packages).freeze

Expand Down Expand Up @@ -189,9 +187,10 @@ def handle_pipenv_errors(error)
end

if error.message.match?(GIT_REFERENCE_NOT_FOUND_REGEX)
name = error.message.match(GIT_REFERENCE_NOT_FOUND_REGEX).
named_captures.fetch("name")
raise GitDependencyReferenceNotFound, name
# Unfortunately the error message doesn't include the package name.
# TODO: Talk with pipenv maintainers about exposing the package name, it used to be part of the error output
tag = error.message.match(GIT_REFERENCE_NOT_FOUND_REGEX).named_captures.fetch("tag")
raise GitDependencyReferenceNotFound, "(unknown package at #{tag})"
end

raise unless error.message.include?("could not be resolved")
Expand Down Expand Up @@ -259,7 +258,7 @@ def clean_error_message(message)
next false if l.start_with?("CRITICAL:")
next false if l.start_with?("ERROR:")
next false if l.start_with?("packaging.specifiers")
next false if l.start_with?("pipenv.patched.notpip._internal")
next false if l.start_with?("pipenv.patched.pip._internal")
next false if l.include?("Max retries exceeded")

true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
expect { subject }.
to raise_error(Dependabot::DependencyFileNotResolvable) do |error|
expect(error.message).to start_with(
"CRITICAL:pipenv.patched.notpip._internal.resolution.resolvelib.factory:" \
"CRITICAL:pipenv.patched.pip._internal.resolution.resolvelib.factory:" \
"Could not find a version that satisfies the requirement " \
"pytest==10.4.0"
)
Expand Down Expand Up @@ -293,7 +293,7 @@
it "raises a helpful error" do
expect { subject }.
to raise_error(Dependabot::GitDependencyReferenceNotFound) do |err|
expect(err.dependency).to eq("pythonfinder")
expect(err.dependency).to eq("(unknown package at v15.1.2)")
end
end
end
Expand Down
Loading