From f689e917bf2caa2c48def7399317dd019264663d Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Fri, 8 May 2020 19:44:05 -0300 Subject: [PATCH] Update Item docstring --- scrapy/item.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scrapy/item.py b/scrapy/item.py index f468ff86f..b9a0acd3d 100644 --- a/scrapy/item.py +++ b/scrapy/item.py @@ -79,8 +79,7 @@ class DictItem(MutableMapping, BaseItem): def __new__(cls, *args, **kwargs): if issubclass(cls, DictItem) and not issubclass(cls, Item): - warn('scrapy.item.DictItem is deprecated, please use ' - 'scrapy.item.Item instead', + warn('scrapy.item.DictItem is deprecated, please use scrapy.item.Item instead', ScrapyDeprecationWarning, stacklevel=2) return super(DictItem, cls).__new__(cls, *args, **kwargs) @@ -147,6 +146,11 @@ class Item(DictItem, metaclass=ItemMeta): If you need instances of a custom class to be considered items by Scrapy, you must inherit from either :class:`Item` or :class:`dict`. + Items offer the ability to declare :class:`Field` attributes, which can be + used to define metadata and control the way data is processed internally. + Please refer to the :ref:`documentation about fields ` + for additional information. + Unlike instances of :class:`dict`, instances of :class:`Item` may be :ref:`tracked ` to debug memory leaks. """