Skip to content
Myr

Copy cookie policy when copying a CookieJar

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

Without it, the cookie policy would get lost while making a request. That would be invisible to the user if the default cookie policy wasn't changed, of course.

authored by Laurent Bachelier · committed by Nate Prewitt · parent d1aeb7e · Browse files · 1 file+1 added−0 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+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:requests/cookies.py+1 added
413 unmodified lines
414415 def copy(self):416 """Return a copy of this RequestsCookieJar."""417 new_cj = RequestsCookieJar()418 new_cj.set_policy(self._policy)419 new_cj.update(self)420 return new_cj421422
121 unmodified lines