1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-24 10:24:13 +00:00

deprecate scrapy.utils.http

ChunkedTransferMiddleware is deprecated, so decode_chunked_transfer
can be deprecated as well.
This commit is contained in:
Mikhail Korobov 2019-07-08 11:17:30 +05:00
parent 3d8f075b0a
commit 1130711cc1

View File

@ -4,8 +4,19 @@ Transitional module for moving to the w3lib library.
For new code, always import from w3lib.http instead of this module
"""
import warnings
from scrapy.exceptions import ScrapyDeprecationWarning
from scrapy.utils.decorators import deprecated
from w3lib.http import *
warnings.warn("Module `scrapy.utils.http` is deprecated, "
"Please import from `w3lib.http` instead.",
ScrapyDeprecationWarning, stacklevel=2)
@deprecated
def decode_chunked_transfer(chunked_body):
"""Parsed body received with chunked transfer encoding, and return the
decoded body.