diff --git a/pdm/project/__init__.py b/pdm/project/__init__.py index 2f69b5dc4f5f5f9fe1ac6d0032d6638ad650cdc9..bf60eda68b017956add75cdecbff57156f79e8af 100644 --- a/pdm/project/__init__.py +++ b/pdm/project/__init__.py @@ -204,5 +204,6 @@ class Project: algo, hash_value = hash_in_lockfile.split(":") hasher = hashlib.new(algo) pyproject_content = tomlkit.dumps(self.pyproject) - content_hash = hasher(pyproject_content.encode("utf-8")).hexdigest() + hasher.update(pyproject_content.encode("utf-8")) + content_hash = hasher.hexdigest() return content_hash == hash_value