Skip to content
Myr

history is a tuple, not list

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 0d183c4 · Browse files · 1 file+4 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−5 removed

  • other:+4 added−5 removed

1 file+4 added−5 removed

modified:requests/sessions.py+4 added-5 removed
251 unmodified lines
252 # TODO: prepare cookies.253254 resp = self.send(prep)255256 # Redirect generator.256 # Redirect resolving generator.257 gen = self.resolve_redirects(resp, req, prefetch, timeout, verify, cert)258259 # Resolve redirects if allowed.260 history = [r for r in gen] if allow_redirects else []261262 # Shuffle things around if there's history.263 if history:264 history.insert(0, resp)265 resp = history.pop()264 resp.history = history266 resp.history = tuple(history)267268 return resp269270271272271272273273 def get(self, url, **kwargs):274 """Sends a GET request. Returns :class:`Response` object.275276 :param url: URL for the new :class:`Request` object.
85 unmodified lines