logger.warn is deprecated.

Use logger.warning() instead.

Fixes #1015.
This commit is contained in:
Omer Katz 2019-03-13 11:55:46 +02:00
parent 3a0454c21d
commit e9e1edf396
2 changed files with 7 additions and 2 deletions

View File

@ -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...\

View File

@ -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'] = {}