From e9e1edf3966803b06a75480c372992a005b64100 Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Wed, 13 Mar 2019 11:55:46 +0200 Subject: [PATCH] logger.warn is deprecated. Use logger.warning() instead. Fixes #1015. --- kombu/mixins.py | 7 ++++++- kombu/utils/url.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kombu/mixins.py b/kombu/mixins.py index 825d272a..75727130 100644 --- a/kombu/mixins.py +++ b/kombu/mixins.py @@ -21,7 +21,12 @@ from .utils.objects import cached_property __all__ = ('ConsumerMixin', 'ConsumerProducerMixin') logger = get_logger(__name__) -debug, info, warn, error = logger.debug, logger.info, logger.warn, logger.error +debug, info, warn, error = ( + logger.debug, + logger.info, + logger.warning, + logger.error +) W_CONN_LOST = """\ Connection to broker lost, trying to re-establish connection...\ diff --git a/kombu/utils/url.py b/kombu/utils/url.py index 0cae13c9..ea56fe0f 100644 --- a/kombu/utils/url.py +++ b/kombu/utils/url.py @@ -53,7 +53,7 @@ def parse_url(url): query[key] = getattr(ssl, query[key]) else: query[key] = None - logger.warn('Defaulting to insecure SSL behaviour.') + logger.warning('Defaulting to insecure SSL behaviour.') if 'ssl' not in query: query['ssl'] = {}