diff --git a/dvc/lock.py b/dvc/lock.py index 37fb7863c..3360001c0 100644 --- a/dvc/lock.py +++ b/dvc/lock.py @@ -176,25 +176,14 @@ class HardlinkLock(flufl.lock.Lock, LockBase): except flufl.lock.TimeOutError: raise LockError(FAILED_TO_LOCK_MESSAGE) - def _set_claimfile(self, pid=None): - super()._set_claimfile(pid) + def _set_claimfile(self): + super()._set_claimfile() if self._tmp_dir is not None: # Under Windows file path length is limited so we hash it filename = hashlib.md5(self._claimfile.encode()).hexdigest() self._claimfile = os.path.join(self._tmp_dir, filename + ".lock") - # Fix for __del__ bug in flufl.lock [1] which is causing errors on - # Python shutdown [2]. - # [1] https://gitlab.com/warsaw/flufl.lock/issues/7 - # [2] https://github.com/iterative/dvc/issues/2573 - def __del__(self): - try: - if self._owned: - self.finalize() - except ImportError: - pass - def make_lock(lockfile, tmp_dir=None, friendly=False, hardlink_lock=False): cls = HardlinkLock if hardlink_lock else Lock diff --git a/setup.cfg b/setup.cfg index c8bece2f8..39f0a2600 100644 --- a/setup.cfg +++ b/setup.cfg @@ -59,7 +59,7 @@ install_requires = tqdm>=4.45.0,<5 packaging>=19.0 zc.lockfile>=1.2.1 - flufl.lock>=3.2,<4 + flufl.lock>=5 networkx>=2.5 psutil>=5.8.0 pydot>=1.2.4