mirror of https://github.com/scrapy/scrapy.git
Remove metaclass-related six code
This commit is contained in:
parent
e461570f99
commit
7f3cb05d8e
|
|
@ -10,8 +10,6 @@ from copy import deepcopy
|
|||
from pprint import pformat
|
||||
from warnings import warn
|
||||
|
||||
import six
|
||||
|
||||
from scrapy.utils.deprecate import ScrapyDeprecationWarning
|
||||
from scrapy.utils.trackref import object_ref
|
||||
|
||||
|
|
@ -130,6 +128,5 @@ class DictItem(MutableMapping, BaseItem):
|
|||
return deepcopy(self)
|
||||
|
||||
|
||||
@six.add_metaclass(ItemMeta)
|
||||
class Item(DictItem):
|
||||
class Item(DictItem, metaclass=ItemMeta):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ import unittest
|
|||
from unittest import mock
|
||||
from warnings import catch_warnings
|
||||
|
||||
import six
|
||||
|
||||
from scrapy.exceptions import ScrapyDeprecationWarning
|
||||
from 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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue