typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

`requests` methods should accept `http.cookiejar.CookieJar` instead of `RequestsCookieJar`

Open FeldrinH opened this issue 1 year ago • 0 comments

Currently requests.get and other similar methods produce a type error if you try to pass them a http.cookiejar.CookieJar as cookies. As far as I can tell this is a mistake in the type hints. requests fully supports providing cookies as http.cookiejar.CookieJar. According to requests documentation, the RequestsCookieJar class is intended as a compatibility wrapper for "external client code" and every method in requests that accepts a cookie jar should work just fine with a standard CookieJar.

FeldrinH avatar Aug 25 '24 16:08 FeldrinH