Scrapy, a fast high-level web crawling & scraping framework for Python.
Merge branch 'master' into no-callback
Andrey Rakhmatullinccd1385e1134
diff --cc scrapy/downloadermiddlewares/robotstxt.pyindex 23b5924e1,8015b3bb3..6cab27c5a--- a/scrapy/downloadermiddlewares/robotstxt.py+++ b/scrapy/downloadermiddlewares/robotstxt.py@@@ -7,9 -7,9 +7,10 @@@ enable this middleware and enable the Rimport loggingfrom twisted.internet.defer import Deferred, maybeDeferred- from scrapy.exceptions import NotConfigured, IgnoreRequest++ from scrapy.exceptions import IgnoreRequest, NotConfiguredfrom scrapy.http import Request+from scrapy.http.request import NO_CALLBACKfrom scrapy.utils.httpobj import urlparse_cachedfrom scrapy.utils.log import failure_to_exc_infofrom scrapy.utils.misc import load_objectdiff --cc scrapy/pipelines/media.pyindex 1e921f0b5,f6eb5b139..ce8cfa353--- a/scrapy/pipelines/media.py+++ b/scrapy/pipelines/media.py@@@ -7,13 -7,12 +7,13 @@@ from warnings import warfrom twisted.internet.defer import Deferred, DeferredListfrom twisted.python.failure import Failure+from scrapy.http.request import NO_CALLBACKfrom scrapy.settings import Settingsfrom scrapy.utils.datatypes import SequenceExclude- from scrapy.utils.defer import mustbe_deferred, defer_result+ from scrapy.utils.defer import defer_result, mustbe_deferredfrom scrapy.utils.deprecate import ScrapyDeprecationWarning- from scrapy.utils.misc import arg_to_iterfrom scrapy.utils.log import failure_to_exc_info+ from scrapy.utils.misc import arg_to_iterlogger = logging.getLogger(__name__)diff --cc tests/test_downloadermiddleware_robotstxt.pyindex 953b61626,2fdf4c9b5..26898a6a1--- a/tests/test_downloadermiddleware_robotstxt.py+++ b/tests/test_downloadermiddleware_robotstxt.py@@@ -4,15 -4,13 +4,14 @@@ from twisted.internet import error, reafrom twisted.internet.defer import Deferred, DeferredList, maybeDeferredfrom twisted.python import failurefrom twisted.trial import unittest- from scrapy.downloadermiddlewares.robotstxt import (- RobotsTxtMiddleware,- logger as mw_module_logger,- )++ from scrapy.downloadermiddlewares.robotstxt import RobotsTxtMiddleware+ from scrapy.downloadermiddlewares.robotstxt import logger as mw_module_loggerfrom scrapy.exceptions import IgnoreRequest, NotConfiguredfrom scrapy.http import Request, Response, TextResponse+from scrapy.http.request import NO_CALLBACKfrom scrapy.settings import Settings- from tests.test_robotstxt_interface import rerp_available, reppy_available+ from tests.test_robotstxt_interface import reppy_available, rerp_availableclass RobotsTxtMiddlewareTest(unittest.TestCase):diff --cc tests/test_http_request.pyindex e800f427f,d02f11f0e..5a7413b32--- a/tests/test_http_request.py+++ b/tests/test_http_request.py@@@ -7,14 -7,13 +7,14 @@@ from unittest import mocfrom urllib.parse import parse_qs, unquote_to_bytes, urlparsefrom scrapy.http import (- Request,FormRequest,- XmlRpcRequest,- JsonRequest,Headers,HtmlResponse,+ JsonRequest,+ Request,+ XmlRpcRequest,)+from scrapy.http.request import NO_CALLBACKfrom scrapy.utils.python import to_bytes, to_unicodediff --cc tests/test_pipeline_media.pyindex 0a0c13a1c,e6d8ed2a2..66a492217--- a/tests/test_pipeline_media.py+++ b/tests/test_pipeline_media.py@@@ -9,9 -9,6 +9,7 @@@ from twisted.trial import unittesfrom scrapy import signalsfrom scrapy.http import Request, Response+from scrapy.http.request import NO_CALLBACK- from scrapy.settings import Settings- from scrapy.spiders import Spiderfrom scrapy.pipelines.files import FileExceptionfrom scrapy.pipelines.images import ImagesPipelinefrom scrapy.pipelines.media import MediaPipeline