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

python: upgrade to poetry ^1.0.0 #1739

Merged
merged 1 commit into from
Mar 24, 2020
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: 2 additions & 0 deletions bin/docker-dev-shell
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ docker run --rm -ti \
-v "$(pwd)/github_actions/spec:$CODE_DIR/github_actions/spec" \
-v "$(pwd)/python/Gemfile:$CODE_DIR/python/Gemfile" \
-v "$(pwd)/python/dependabot-python.gemspec:$CODE_DIR/python/dependabot-python.gemspec" \
-v "$(pwd)/python/helpers:/opt/python" \
-v "$(pwd)/python/helpers:/opt/python/helpers" \
-v "$(pwd)/python/lib:$CODE_DIR/python/lib" \
-v "$(pwd)/python/spec:$CODE_DIR/python/spec" \
-v "$(pwd)/nuget/Gemfile:$CODE_DIR/nuget/Gemfile" \
Expand Down
3 changes: 2 additions & 1 deletion python/helpers/lib/hasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import pipfile
from poetry.poetry import Poetry
from poetry.factory import Factory

def get_dependency_hash(dependency_name, dependency_version, algorithm):
hashes = hashin.get_package_hashes(
Expand All @@ -18,6 +19,6 @@ def get_pipfile_hash(directory):
return json.dumps({ "result": p.hash })

def get_pyproject_hash(directory):
p = Poetry.create(directory)
p = Factory().create_poetry(directory)

return json.dumps({ "result": p.locker._get_content_hash() })
2 changes: 1 addition & 1 deletion python/helpers/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pip-tools==4.5.1
hashin==0.14.6
pipenv==2018.11.26
pipfile==0.0.2
poetry==0.12.17
poetry==1.0.5

# Some dependencies will only install if Cython is present
Cython==0.29.15
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
)
end

pending "updates the lockfile successfully" do
it "updates the lockfile successfully" do
updated_lockfile = updated_files.find { |f| f.name == "pyproject.lock" }

lockfile_obj = TomlRB.parse(updated_lockfile.content)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
let(:pyproject_fixture_name) { "python_2.toml" }
let(:lockfile_fixture_name) { "python_2.lock" }

pending "resolves version" do
it "resolves version" do
is_expected.to eq(Gem::Version.new("2.18.4"))
end
end
Expand Down