From cb4477db3e2ac4ee1972ac3832d036a08596fa7a Mon Sep 17 00:00:00 2001 From: Mikhail Korobov Date: Mon, 8 Jul 2019 11:18:40 +0500 Subject: [PATCH] deprecate scrapy.utils.markup it was an import-only shim for w3lib.html --- scrapy/utils/markup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scrapy/utils/markup.py b/scrapy/utils/markup.py index 977133f4e..a18f308a3 100644 --- a/scrapy/utils/markup.py +++ b/scrapy/utils/markup.py @@ -3,5 +3,12 @@ Transitional module for moving to the w3lib library. For new code, always import from w3lib.html instead of this module """ +import warnings +from scrapy.exceptions import ScrapyDeprecationWarning from w3lib.html import * + + +warnings.warn("Module `scrapy.utils.markup` is deprecated. " + "Please import from `w3lib.html` instead.", + ScrapyDeprecationWarning, stacklevel=2) \ No newline at end of file