mirror of https://github.com/scrapy/scrapy.git
moved module scrapy.core.downloader.responsetypes to scrapy.responsetypes
--HG-- rename : scrapy/core/downloader/responsetypes/mime.types => scrapy/mime.types rename : scrapy/core/downloader/responsetypes/__init__.py => scrapy/responsetypes.py
This commit is contained in:
parent
9f60c27612
commit
259dccaf58
|
|
@ -3,7 +3,7 @@ include AUTHORS
|
|||
include INSTALL
|
||||
include LICENSE
|
||||
include MANIFEST.in
|
||||
include scrapy/core/downloader/responsetypes/mime.types
|
||||
include scrapy/mime.types
|
||||
include scrapyd/default_scrapyd.conf
|
||||
recursive-include scrapy/templates *
|
||||
recursive-include scrapy/tests/sample_data *
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from scrapy.xlib.pydispatch import dispatcher
|
|||
from scrapy import signals
|
||||
from scrapy.http import Headers
|
||||
from scrapy.exceptions import NotConfigured, IgnoreRequest
|
||||
from scrapy.core.downloader.responsetypes import responsetypes
|
||||
from scrapy.responsetypes import responsetypes
|
||||
from scrapy.utils.request import request_fingerprint
|
||||
from scrapy.utils.httpobj import urlparse_cached
|
||||
from scrapy.utils.misc import load_object
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import zlib
|
|||
|
||||
from scrapy.utils.gz import gunzip
|
||||
from scrapy.http import Response, TextResponse
|
||||
from scrapy.core.downloader.responsetypes import responsetypes
|
||||
from scrapy.responsetypes import responsetypes
|
||||
|
||||
|
||||
class HttpCompressionMiddleware(object):
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from time import time
|
|||
import cPickle as pickle
|
||||
|
||||
from scrapy.http import Headers
|
||||
from scrapy.core.downloader.responsetypes import responsetypes
|
||||
from scrapy.responsetypes import responsetypes
|
||||
from scrapy.utils.request import request_fingerprint
|
||||
from scrapy.utils.project import data_path
|
||||
from scrapy import conf
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from tempfile import mktemp
|
|||
|
||||
from scrapy import log
|
||||
from scrapy.http import Response
|
||||
from scrapy.core.downloader.responsetypes import responsetypes
|
||||
from scrapy.responsetypes import responsetypes
|
||||
|
||||
|
||||
class DecompressionMiddleware(object):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from w3lib.url import file_uri_to_path
|
||||
from scrapy.core.downloader.responsetypes import responsetypes
|
||||
from scrapy.responsetypes import responsetypes
|
||||
from scrapy.utils.decorator import defers
|
||||
|
||||
class FileDownloadHandler(object):
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from twisted.internet import defer
|
|||
|
||||
from scrapy.http import Headers
|
||||
from scrapy.utils.httpobj import urlparse_cached
|
||||
from scrapy.core.downloader.responsetypes import responsetypes
|
||||
from scrapy.responsetypes import responsetypes
|
||||
|
||||
|
||||
def _parsed_url_args(parsed):
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ from scrapy.utils.python import isbinarytext
|
|||
from scrapy.utils.py26 import get_data
|
||||
from scrapy.conf import settings
|
||||
|
||||
__package__ = 'scrapy.core.downloader.responsetypes' # required for python 2.5
|
||||
|
||||
class ResponseTypes(object):
|
||||
|
||||
CLASSES = {
|
||||
|
|
@ -36,7 +34,7 @@ class ResponseTypes(object):
|
|||
self.CLASSES.update(settings.get('RESPONSE_CLASSES', {}))
|
||||
self.classes = {}
|
||||
self.mimetypes = MimeTypes()
|
||||
mimedata = get_data(__package__, 'mime.types')
|
||||
mimedata = get_data('scrapy', 'mime.types')
|
||||
self.mimetypes.readfp(StringIO(mimedata))
|
||||
for mimetype, cls in self.CLASSES.iteritems():
|
||||
self.classes[mimetype] = load_object(cls)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import unittest
|
||||
from scrapy.core.downloader.responsetypes import responsetypes
|
||||
from scrapy.responsetypes import responsetypes
|
||||
|
||||
from scrapy.http import Response, TextResponse, XmlResponse, HtmlResponse, Headers
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue