From c24b80e1e6df7bd04cca77d068df2656d36a8753 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Sat, 13 Jul 2019 20:34:31 -0300 Subject: [PATCH] Prevent DeprecationWarning about logging.warn --- scrapy/core/downloader/handlers/http11.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scrapy/core/downloader/handlers/http11.py b/scrapy/core/downloader/handlers/http11.py index 0673188a1..74ef82874 100644 --- a/scrapy/core/downloader/handlers/http11.py +++ b/scrapy/core/downloader/handlers/http11.py @@ -479,10 +479,10 @@ class _ResponseReader(protocol.Protocol): return elif not self._fail_on_dataloss_warned: - logger.warn("Got data loss in %s. If you want to process broken " - "responses set the setting DOWNLOAD_FAIL_ON_DATALOSS = False" - " -- This message won't be shown in further requests", - self._txresponse.request.absoluteURI.decode()) + logger.warning("Got data loss in %s. If you want to process broken " + "responses set the setting DOWNLOAD_FAIL_ON_DATALOSS = False" + " -- This message won't be shown in further requests", + self._txresponse.request.absoluteURI.decode()) self._fail_on_dataloss_warned = True self._finished.errback(reason)