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

Switch from pipfile to plette lib #8627

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions python/helpers/lib/hasher.py
@@ -1,6 +1,6 @@
import hashin
import json
import pipfile
import plette
from poetry.factory import Factory


Expand All @@ -15,9 +15,10 @@ def get_dependency_hash(dependency_name, dependency_version, algorithm):


def get_pipfile_hash(directory):
p = pipfile.load(directory + '/Pipfile')
with open(directory + '/Pipfile') as f:
pipfile = plette.Pipfile.load(f)

return json.dumps({"result": p.hash})
return json.dumps({"result": pipfile.get_hash().value})


def get_pyproject_hash(directory):
Expand Down
2 changes: 1 addition & 1 deletion python/helpers/requirements.txt
Expand Up @@ -3,7 +3,7 @@ pip-tools==7.4.1
flake8==7.0.0
hashin==0.17.0
pipenv==2023.11.17
pipfile==0.0.2
plette==0.4.4
poetry==1.7.1
# TODO: Replace 3p package `toml` with 3.11's new stdlib `tomllib` once we drop support for Python 3.10.
toml==0.10.2
Expand Down