From 59e504a003b034b157c8ed8297b9992c79d62769 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Mon, 18 May 2009 19:27:51 -0300 Subject: [PATCH] removed code from scrapy.link to avoid cyclic imports from scrapy.contrib.linkextractors.sgml --- scrapy/link/__init__.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/scrapy/link/__init__.py b/scrapy/link/__init__.py index 03c91737c..1844da1da 100644 --- a/scrapy/link/__init__.py +++ b/scrapy/link/__init__.py @@ -22,25 +22,3 @@ class Link(object): def __repr__(self): return '' % (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) -