From 3c1ccb660f66353c967fd73c6b6ae5b92b1791c6 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 20 Dec 2020 13:33:44 -0600 Subject: [PATCH] Bring back persistent_dict.new_hash for the moment --- pytools/persistent_dict.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pytools/persistent_dict.py b/pytools/persistent_dict.py index 21eb985..c33f240 100644 --- a/pytools/persistent_dict.py +++ b/pytools/persistent_dict.py @@ -28,12 +28,13 @@ THE SOFTWARE. import logging import hashlib +import collections.abc as abc -try: - import collections.abc as abc -except ImportError: - # Python 2 - import collections as abc +# Removing this in 2020-12 broke a shocking amount of stuff, such as +# https://github.com/OP2/PyOP2/pull/605 +# Bring it back for now to mitigate the breakage, however this is going +# away in 2021 at the latest. +new_hash = hashlib.sha256 import os import shutil -- GitLab