mirror of https://github.com/celery/kombu.git
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
This commit is contained in:
parent
f61c6d1726
commit
d4d9012863
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue