Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

deprecate scrapy.utils.markup

Mikhail Korobovcb4477db3e2a
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