From d4d901286396e59933e03fbd770cf3e98f8b4f1a Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Fri, 12 Jul 2024 19:13:50 +0300 Subject: [PATCH] Use logging.Logger.warning (#2058) Usage of `logging.Logger.warn` was deprecated since Python 3.3 and it will be removed in Python 3.13: https://docs.python.org/3.13/whatsnew/3.13.html#logging --- kombu/transport/redis.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kombu/transport/redis.py b/kombu/transport/redis.py index 515d6f7d..5879f7a4 100644 --- a/kombu/transport/redis.py +++ b/kombu/transport/redis.py @@ -89,7 +89,7 @@ except ImportError: # pragma: no cover logger = get_logger('kombu.transport.redis') -crit, warn = logger.critical, logger.warn +crit, warning = logger.critical, logger.warning DEFAULT_PORT = 6379 DEFAULT_DB = 0 @@ -939,8 +939,8 @@ class Channel(virtual.Channel): try: message = loads(bytes_to_str(payload['data'])) except (TypeError, ValueError): - warn('Cannot process event on channel %r: %s', - channel, repr(payload)[:4096], exc_info=1) + warning('Cannot process event on channel %r: %s', + channel, repr(payload)[:4096], exc_info=1) raise Empty() exchange = channel.split('/', 1)[0] self.connection._deliver(