Scrapy, a fast high-level web crawling & scraping framework for Python.
Drop support for ScrapyCommand.crawler property
Julia Medinad0edad4b0bd9
diff --git a/scrapy/command.py b/scrapy/command.pyindex b2eb9cf8f..9ac013098 100644--- a/scrapy/command.py+++ b/scrapy/command.py@@ -2,12 +2,11 @@Base class for Scrapy commands"""import os-import warningsfrom optparse import OptionGroupfrom twisted.python import failurefrom scrapy.utils.conf import arglist_to_dict-from scrapy.exceptions import UsageError, ScrapyDeprecationWarning+from scrapy.exceptions import UsageErrorclass ScrapyCommand(object):@@ -27,31 +26,6 @@ class ScrapyCommand(object):assert not hasattr(self, '_crawler'), "crawler already set"self._crawler = crawler- @property- def crawler(self):- warnings.warn("Command's default `crawler` is deprecated and will be removed. "- "Use `create_crawler` method to instatiate crawlers.",- ScrapyDeprecationWarning)-- if not hasattr(self, '_crawler'):- crawler = self.crawler_process.create_crawler()-- old_start = crawler.start- self.crawler_process.started = False-- def wrapped_start():- if self.crawler_process.started:- old_start()- else:- self.crawler_process.started = True- self.crawler_process.start()-- crawler.start = wrapped_start-- self.set_crawler(crawler)-- return self._crawler-def syntax(self):"""Command syntax (preferably one-line). Do not include command name.