Skip to content

Conversation

@godcrampy
Copy link

Fixes #7122

Essentially a semantic cherry-pick of the delta in #4042.

These changes persist the policy on the session cookie-jar instead of discarding it by doing a merge against an empty RequestsCookieJar.

#4042 mentions:

The only caveat here is this won't work for a non-RequestsCookieJar since the policy isn't exposed publicly. We may want to add some documentation about this caveat but given the rarity of this case, the information in the issue tracker may be sufficient.

Not too sure why, as long as CookieJar is a superclass the underlying policy would be respected. _copy_cookie_jar would shallow copy the jar along with it's policy in the case of a non RequestsCookieJar.

Nevertheless, changes are backwards complatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to override cookie policy in Session.prepare_request

1 participant