diff --git a/scrapy/http/response/text.py b/scrapy/http/response/text.py index 5614e6e55..0603b6653 100644 --- a/scrapy/http/response/text.py +++ b/scrapy/http/response/text.py @@ -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