Scrapy, a fast high-level web crawling & scraping framework for Python.
Move an import to postpone another "import twisted.internet.reactor".
Andrey Rakhmatullin97fb61cec846
diff --git a/scrapy/commands/shell.py b/scrapy/commands/shell.pyindex e05084272..7516e2aba 100644--- a/scrapy/commands/shell.py+++ b/scrapy/commands/shell.py@@ -6,7 +6,6 @@ See documentation in docs/topics/shell.rstfrom threading import Threadfrom scrapy.commands import ScrapyCommand-from scrapy.shell import Shellfrom scrapy.http import Requestfrom scrapy.utils.spider import spidercls_for_request, DefaultSpiderfrom scrapy.utils.url import guess_scheme@@ -70,6 +69,8 @@ class Command(ScrapyCommand):self._start_crawler_thread()+ # moved from the top-level because it imports twisted.internet.reactor+ from scrapy.shell import Shellshell = Shell(crawler, update_vars=self.update_vars, code=opts.code)shell.start(url=url, redirect=not opts.no_redirect)