doc: Response.replace() cannot take meta argument

>>> response.replace(meta={'foo':1})
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/srv/scrapy/scrapy-fork/scrapy/scrapy/http/response/text.py", line 45, in replace
    return Response.replace(self, *args, **kwargs)
  File "/srv/scrapy/scrapy-fork/scrapy/scrapy/http/response/__init__.py", line 77, in replace
    return cls(*args, **kwargs)
  File "/srv/scrapy/scrapy-fork/scrapy/scrapy/http/response/text.py", line 22, in __init__
    super(TextResponse, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'meta'
This commit is contained in:
Steven Almeroth 2013-03-21 13:49:55 -06:00
parent 21c8b89422
commit 0d7747d353
1 changed files with 2 additions and 3 deletions

View File

@ -450,12 +450,11 @@ Response objects
Returns a new Response which is a copy of this Response.
.. method:: Response.replace([url, status, headers, body, meta, flags, cls])
.. method:: Response.replace([url, status, headers, body, request, flags, cls])
Returns a Response object with the same members, except for those members
given new values by whichever keyword arguments are specified. The
attribute :attr:`Response.meta` is copied by default (unless a new value
is given in the ``meta`` argument).
attribute :attr:`Response.meta` is copied by default.
.. _topics-request-response-ref-response-subclasses: