From 1f1fdc9a0a5b7af0faf5e6c684d34dfcbf69b61f Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Sun, 26 Dec 2021 12:23:57 -0500 Subject: [PATCH] Avoid a new deprecation warning from filelock dependency (#2237) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bernát Gábor --- docs/changelog/2237.feature.rst | 1 + src/virtualenv/util/lock.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 docs/changelog/2237.feature.rst diff --git a/docs/changelog/2237.feature.rst b/docs/changelog/2237.feature.rst new file mode 100644 index 000000000..6defa64f7 --- /dev/null +++ b/docs/changelog/2237.feature.rst @@ -0,0 +1 @@ +Avoid deprecation warning from py-filelock argument - by :user:`ofek`. diff --git a/src/virtualenv/util/lock.py b/src/virtualenv/util/lock.py index e141aafae..1cf968b42 100644 --- a/src/virtualenv/util/lock.py +++ b/src/virtualenv/util/lock.py @@ -25,10 +25,10 @@ def __init__(self, lock_file): self.count = 0 self.thread_safe = RLock() - def acquire(self, timeout=None, poll_intervall=0.05): + def acquire(self, timeout=None, poll_interval=0.05): with self.thread_safe: if self.count == 0: - super(_CountedFileLock, self).acquire(timeout=timeout, poll_intervall=poll_intervall) + super(_CountedFileLock, self).acquire(timeout, poll_interval) self.count += 1 def release(self, force=False):