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

Pin to latest pipenv commit #775

Merged
merged 3 commits into from
Nov 14, 2018
Merged
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 helpers/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pip==18.1
pip-tools==3.1.0
hashin==0.14.0
pipenv==2018.10.13
-e git://github.com/pypa/pipenv.git@bfa0b290cca65f3ed8b95350aaf37eb1ed794d7b#egg=pipenv
pipfile==0.0.2
poetry==0.12.8

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PipfileVersionResolver
GIT_DEPENDENCY_UNREACHABLE_REGEX =
/Command "git clone -q (?<url>[^\s]+).*" failed/.freeze
GIT_REFERENCE_NOT_FOUND_REGEX =
%r{Command "git reset --hard -q (?<tag>[^"]+)" .*/(?<name>.*?)$}.
%r{"git checkout -q (?<tag>[^"]+)" .*/(?<name>.*?)(\\n'\]|$)}.
freeze

attr_reader :dependency, :dependency_files, :credentials
Expand Down Expand Up @@ -128,7 +128,7 @@ def handle_pipenv_errors(error)
end

if error.message.include?("Could not find a version") ||
error.message.include?("Not a valid python version")
error.message.include?("was not found on your system…")
check_original_requirements_resolvable
end

Expand Down Expand Up @@ -182,7 +182,7 @@ def check_original_requirements_resolvable
raise DependencyFileNotResolvable, msg
end

if error.message.include?("Not a valid python version")
if error.message.include?("was not found on your system…")
msg = "Pipenv does not support specifying Python ranges "\
"(see https://github.com/pypa/pipenv/issues/1050 for more "\
"details)."
Expand All @@ -201,11 +201,11 @@ def clean_error_message(message)
msg = msg_lines.
take_while { |l| !l.start_with?("During handling of") }.
drop_while do |l|
!l.start_with?(
"Could not find",
"CRITICAL:notpip._internal.index:Could not find",
"packaging.specifiers.InvalidSpecifier"
)
next false if l.start_with?("CRITICAL:")
next false if l.start_with?("ERROR:")
next false if l.start_with?("packaging.specifiers")

true
end.join.strip

# We also need to redact any URLs, as they may include credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@
it "raises a helpful error" do
expect { subject }.
to raise_error(Dependabot::DependencyFileNotResolvable) do |error|
puts error.message
expect(error.message).to start_with(
"CRITICAL:notpip._internal.index:Could not find a version"
"CRITICAL:pipenv.patched.notpip._internal.index:"\
"Could not find a version that satisfies the requirement "\
"pytest==10.4.0"
)
end
end
Expand Down Expand Up @@ -415,7 +418,7 @@
it "raises a helpful error" do
expect { subject }.
to raise_error(Dependabot::DependencyFileNotResolvable) do |error|
expect(error.message).to start_with(
expect(error.message).to include(
"Could not find a version that matches "\
"chardet<3.1.0,==3.0.0,>=3.0.2\n"
)
Expand Down