Skip to content

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

Change condition to raise deprecation warning

Eugenio Lacuestad7074d86d26c
diff --git a/scrapy/utils/datatypes.py b/scrapy/utils/datatypes.py
index fbc41f760..231234e3d 100644
--- a/scrapy/utils/datatypes.py
+++ b/scrapy/utils/datatypes.py
@@ -245,7 +245,7 @@ class MergeDict(object):
first occurrence will be used.
"""
def __init__(self, *dicts):
- if six.PY3:
+ if not six.PY2:
warnings.warn(
"scrapy.utils.datatypes.MergeDict is deprecated in favor "
"of collections.ChainMap (introduced in Python 3.3)",