diff --git a/python/helpers/lib/hasher.py b/python/helpers/lib/hasher.py index b134017d79e..7e105c18c47 100644 --- a/python/helpers/lib/hasher.py +++ b/python/helpers/lib/hasher.py @@ -1,6 +1,6 @@ import hashin import json -import pipfile +import plette from poetry.factory import Factory @@ -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): diff --git a/python/helpers/requirements.txt b/python/helpers/requirements.txt index c213bc408a8..ad2d8bdca0b 100644 --- a/python/helpers/requirements.txt +++ b/python/helpers/requirements.txt @@ -3,7 +3,7 @@ pip-tools==7.3.0 flake8==6.1.0 hashin==0.17.0 pipenv==2022.4.8 -pipfile==0.0.2 +plette==0.4.4 poetry==1.6.1 # Some dependencies will only install if Cython is present