mirror of https://github.com/scrapy/scrapy.git
moved deprecated scrapy.item.adaptors to scrapy.contrib.item, and added deprecation warning
--HG-- rename : scrapy/item/adaptors.py => scrapy/contrib/item/adaptors.py
This commit is contained in:
parent
e96622166e
commit
a0e2086b1b
|
|
@ -1 +1,11 @@
|
|||
"""
|
||||
WARNING: This module is obsolete and will be removed before the Scrapy 0.7
|
||||
release
|
||||
"""
|
||||
|
||||
import warnings
|
||||
|
||||
from scrapy.contrib.item.models import RobustScrapedItem, RobustItemDelta, ValidationError, ValidationPipeline
|
||||
|
||||
warnings.warn("scrapy.contrib.item is obsolete and will be removed soon", \
|
||||
DeprecationWarning, stacklevel=2)
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@ useful in some Scrapy implementations
|
|||
|
||||
import copy
|
||||
import hashlib
|
||||
import warnings
|
||||
|
||||
from pprint import PrettyPrinter
|
||||
|
||||
from scrapy.item import ScrapedItem
|
||||
from scrapy.item.adaptors import AdaptorPipe
|
||||
from scrapy.contrib.item.adaptors import AdaptorPipe
|
||||
from scrapy.core.exceptions import DropItem
|
||||
from scrapy.utils.python import unique
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import re
|
|||
from scrapy.xpath.selector import XPathSelector, XPathSelectorList
|
||||
from scrapy.utils.misc import extract_regex
|
||||
from scrapy.utils.python import flatten, str_to_unicode, unicode_to_str
|
||||
from scrapy.item.adaptors import adaptize
|
||||
from scrapy.contrib.item.adaptors import adaptize
|
||||
|
||||
def to_unicode(value, adaptor_args):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import unittest
|
||||
import re
|
||||
|
||||
from scrapy.item.adaptors import AdaptorPipe
|
||||
from scrapy.contrib.item.adaptors import AdaptorPipe
|
||||
from scrapy.contrib_exp import adaptors
|
||||
from scrapy.http import HtmlResponse, Headers
|
||||
from scrapy.xpath.selector import HtmlXPathSelector, XmlXPathSelector
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import unittest
|
||||
|
||||
from scrapy.contrib.item import RobustScrapedItem
|
||||
from scrapy.item.adaptors import AdaptorPipe
|
||||
from scrapy.contrib.item.adaptors import AdaptorPipe
|
||||
from scrapy.contrib_exp import adaptors
|
||||
|
||||
class MyItem(RobustScrapedItem):
|
||||
|
|
|
|||
Loading…
Reference in New Issue