Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Session.cookies a property (#446)
This allows users to replace session.cookies after initialization with any CookieTypes object. This behavior matches httpx and requests, and allows it to be a drop-in replacement even in less typical usecases. httpx uses property in the same manner: https://github.com/encode/httpx/blob/47f4a96/httpx/_client.py#L317-L326 requests appears to differ at first glance, as it does not use a property, but each request calls merge_cookies, which converts dicts to cookie jars, so it's virtually identical https://github.com/psf/requests/blob/23540c9/src/requests/sessions.py#L241 https://github.com/psf/requests/blob/23540c9/src/requests/cookies.py#L552-L553
- Loading branch information