Closed wRAR closed 5 years ago
Interesting @wRAR . I'm actually not sure where it should be fixed (if not in multiple places):
JsonSchemaItem
a subclass of scapy.item.Item
HubstorageExtension
accept scapy.item.BaseItem
@vshlapakov you may be interested in this
If I recall it correctly, the code was added mainly to prevent wrong handling None
items, so I'm inclined to update HubstorageExtension
to check for BaseItem
instead of Item
, it looks consistent - I think it's fine to subclass custom items from DictItem
, but I can miss something. /cc @chekunkov
@vshlapakov agree with you, let's change the HubstorageExtension
JsonSchemaItem
is a subclass ofscrapy.item.DictItem
while a recent enoughHubstorageExtension
checks whether an item is ascrapy.Item
(which is a subclass ofDictItem
too): https://github.com/scrapinghub/scrapinghub-entrypoint-scrapy/commit/52e5362c9872047efb2c45fe066a50c61bf41d49