mirror of https://github.com/scrapy/scrapy.git
better deprecation warning for Response.body_as_unicode() (#4579)
This commit is contained in:
parent
314adf6c38
commit
bcc40c4077
|
|
@ -65,7 +65,7 @@ class TextResponse(Response):
|
|||
"""Return body as unicode"""
|
||||
warnings.warn('Response.body_as_unicode() is deprecated, '
|
||||
'please use Response.text instead.',
|
||||
ScrapyDeprecationWarning)
|
||||
ScrapyDeprecationWarning, stacklevel=2)
|
||||
return self.text
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Reference in New Issue