Scrapy, a fast high-level web crawling & scraping framework for Python.
Remove metaclass-related six code
Eugenio Lacuesta7f3cb05d8e20
diff --git a/scrapy/item.py b/scrapy/item.pyindex 4e0f0ac44..1d39b48b2 100644--- a/scrapy/item.py+++ b/scrapy/item.py@@ -10,8 +10,6 @@ from copy import deepcopyfrom pprint import pformatfrom warnings import warn-import six-from scrapy.utils.deprecate import ScrapyDeprecationWarningfrom scrapy.utils.trackref import object_ref@@ -130,6 +128,5 @@ class DictItem(MutableMapping, BaseItem):return deepcopy(self)[email protected]_metaclass(ItemMeta)-class Item(DictItem):+class Item(DictItem, metaclass=ItemMeta):passdiff --git a/tests/test_item.py b/tests/test_item.pyindex d98c63ddd..0da8fa1ac 100644--- a/tests/test_item.py+++ b/tests/test_item.py@@ -3,8 +3,6 @@ import unittestfrom unittest import mockfrom warnings import catch_warnings-import six-from scrapy.exceptions import ScrapyDeprecationWarningfrom scrapy.item import ABCMeta, DictItem, Field, Item, ItemMeta@@ -302,7 +300,7 @@ class ItemMetaTest(unittest.TestCase):class ItemMetaClassCellRegression(unittest.TestCase):def test_item_meta_classcell_regression(self):- class MyItem(six.with_metaclass(ItemMeta, Item)):+ class MyItem(Item, metaclass=ItemMeta):def __init__(self, *args, **kwargs):# This call to super() trigger the __classcell__ propagation# requirement. When not done properly raises an error: