Skip to content

Commit

Permalink
Support Python 3.13
Browse files Browse the repository at this point in the history
What's new in Python 3.13 states:
"logging: Remove undocumented and untested Logger.warn() and LoggerAdapter.warn() methods and logging.warn() function. Deprecated since Python 3.3, they were aliases to the logging.Logger.warning() method, logging.LoggerAdapter.warning() method and logging.warning() function. (Contributed by Victor Stinner in gh-105376.)"
  • Loading branch information
befeleme authored and lavagetto committed Aug 9, 2024
1 parent 5aea0fd commit d2889f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/etcd/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def uuid(self, value):
old_uuid = self._uuid
self._uuid = value
if not self._find_lock():
_log.warn("The hand-set uuid was not found, refusing")
_log.warning("The hand-set uuid was not found, refusing")
self._uuid = old_uuid
raise ValueError("Inexistent UUID")

Expand All @@ -51,7 +51,7 @@ def is_acquired(self):
self.client.read(self.lock_key)
return True
except etcd.EtcdKeyNotFound:
_log.warn("Lock was supposedly taken, but we cannot find it")
_log.warning("Lock was supposedly taken, but we cannot find it")
self.is_taken = False
return False

Expand Down

0 comments on commit d2889f7

Please sign in to comment.