removed code from scrapy.link to avoid cyclic imports from scrapy.contrib.linkextractors.sgml

This commit is contained in:
Pablo Hoffman 2009-05-18 19:27:51 -03:00
parent 86498abdf1
commit 59e504a003
1 changed files with 0 additions and 22 deletions

View File

@ -22,25 +22,3 @@ class Link(object):
def __repr__(self):
return '<Link url=%r text=%r >' % (self.url, self.text)
# FIXME: code below is for backwards compatibility and should be removed before
# the 0.7 release
import warnings
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor, BaseSgmlLinkExtractor
class LinkExtractor(BaseSgmlLinkExtractor):
def __init__(self, *args, **kwargs):
warnings.warn("scrapy.link.LinkExtractor is deprecated, use scrapy.contrib.linkextractors.sgml.BaseSgmlLinkExtractor instead",
DeprecationWarning, stacklevel=2)
BaseSgmlLinkExtractor.__init__(self, *args, **kwargs)
class RegexLinkExtractor(SgmlLinkExtractor):
def __init__(self, *args, **kwargs):
warnings.warn("scrapy.link.RegexLinkExtractor is deprecated, use scrapy.contrib.linkextractors.sgml.SgmlLinkExtractor instead",
DeprecationWarning, stacklevel=2)
SgmlLinkExtractor.__init__(self, *args, **kwargs)