Skip to content

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

deprecate unused and untested scrapy.utils.datatypes.SiteNode

Mikhail Korobov7070dae48da0
diff --git a/scrapy/utils/datatypes.py b/scrapy/utils/datatypes.py
index 097bd1ac9..2b54982b8 100644
--- a/scrapy/utils/datatypes.py
+++ b/scrapy/utils/datatypes.py
@@ -137,10 +137,18 @@ class MultiValueDict(dict):
for key, value in six.iteritems(kwargs):
self.setlistdefault(key, []).append(value)
+
class SiteNode(object):
"""Class to represent a site node (page, image or any other file)"""
def __init__(self, url):
+ warnings.warn(
+ "scrapy.utils.datatypes.SiteNode is deprecated "
+ "and will be removed in future releases.",
+ category=ScrapyDeprecationWarning,
+ stacklevel=2
+ )
+
self.url = url
self.itemnames = []
self.children = []