From 709bfe598f6ff63f8fc97c6564a49f0cfbd66b4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:26:40 +0300 Subject: [PATCH] build(deps): Update flufl-lock requirement from <4,>=3.2 to >=5 (#6576) * build(deps): Update flufl-lock requirement from <4,>=3.2 to >=3.2,<7 Updates the requirements on [flufl-lock](https://gitlab.com/warsaw/flufl.lock) to permit the latest version. - [Release notes](https://gitlab.com/warsaw/flufl.lock/tags) - [Commits](https://gitlab.com/warsaw/flufl.lock/compare/3.2...6.0) --- updated-dependencies: - dependency-name: flufl-lock dependency-type: direct:production ... Signed-off-by: dependabot[bot] * upgrade flufl.lock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ruslan Kuprieiev --- dvc/lock.py | 15 ++------------- setup.cfg | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) 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