Scrapy, a fast high-level web crawling & scraping framework for Python.
removed backwards compatibility code for old scrapy versions
Pablo Hoffman9fddc73ed818
diff --git a/scrapy/cmdline.py b/scrapy/cmdline.pyindex cd33381fc..7b0923add 100644--- a/scrapy/cmdline.py+++ b/scrapy/cmdline.py@@ -1,5 +1,4 @@import sys-import osimport optparseimport cProfileimport inspect@@ -9,7 +8,7 @@ from scrapy.crawler import CrawlerProcessfrom scrapy.xlib import lsprofcalltreefrom scrapy.conf import settingsfrom scrapy.command import ScrapyCommand-from scrapy.exceptions import UsageError, ScrapyDeprecationWarning+from scrapy.exceptions import UsageErrorfrom scrapy.utils.misc import walk_modulesfrom scrapy.utils.project import inside_project@@ -72,24 +71,6 @@ def _print_unknown_command(cmdname, inproject):print "More commands are available in project mode"-def _check_deprecated_scrapy_ctl(argv, inproject):- """Check if Scrapy was called using the deprecated scrapy-ctl command and- warn in that case, also creating a scrapy.cfg if it doesn't exist.- """- if not any('scrapy-ctl' in x for x in argv):- return- import warnings- warnings.warn("`scrapy-ctl.py` command-line tool is deprecated and will be removed in Scrapy 0.11, use `scrapy` instead",- ScrapyDeprecationWarning, stacklevel=3)- if inproject:- projpath = os.path.abspath(os.path.dirname(os.path.dirname(settings.settings_module.__file__)))- cfg_path = os.path.join(projpath, 'scrapy.cfg')- if not os.path.exists(cfg_path):- with open(cfg_path, 'w') as f:- f.write("# generated automatically - feel free to edit" + os.linesep)- f.write("[settings]" + os.linesep)- f.write("default = %s" % settings.settings_module.__name__ + os.linesep)-def _run_print_help(parser, func, *a, **kw):try:func(*a, **kw)@@ -106,7 +87,6 @@ def execute(argv=None):crawler = CrawlerProcess(settings)crawler.install()inproject = inside_project()- _check_deprecated_scrapy_ctl(argv, inproject) # TODO: remove for Scrapy 0.11cmds = _get_commands_dict(inproject)cmdname = _pop_command_name(argv)parser = optparse.OptionParser(formatter=optparse.TitledHelpFormatter(), \diff --git a/scrapy/contrib/exporter/jsonlines.py b/scrapy/contrib/exporter/jsonlines.pydeleted file mode 100644index fbab65735..000000000--- a/scrapy/contrib/exporter/jsonlines.py+++ /dev/null@@ -1,6 +0,0 @@-from scrapy.contrib.exporter import JsonLinesItemExporter-from scrapy.exceptions import ScrapyDeprecationWarning--import warnings-warnings.warn("Module `scrapy.contrib.exporter.jsonlines` is deprecated - use `scrapy.contrib.exporter` instead",- ScrapyDeprecationWarning, stacklevel=2)diff --git a/scrapy/log.py b/scrapy/log.pyindex 8d79f3aef..ebd1ac7ec 100644--- a/scrapy/log.py+++ b/scrapy/log.py@@ -13,7 +13,6 @@ import scrapyfrom scrapy.conf import settingsfrom scrapy.utils.python import unicode_to_strfrom scrapy.utils.misc import load_object-from scrapy.exceptions import ScrapyDeprecationWarning# Logging levelsDEBUG = logging.DEBUG@@ -113,9 +112,6 @@ def start(logfile=None, loglevel=None, logstdout=None):settings['BOT_NAME']))def msg(message, level=INFO, **kw):- if 'component' in kw:- warnings.warn("Argument `component` of scrapy.log.msg() is deprecated", \- ScrapyDeprecationWarning, stacklevel=2)kw.setdefault('system', 'scrapy')kw['logLevel'] = levellog.msg(message, **kw)