Skip to content

requests methods should accept http.cookiejar.CookieJar instead of RequestsCookieJar #12593

Closed

Description

@FeldrinH

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.

Activity

  1. srittau commented on Aug 29, 2024

    @srittau
    Collaborator

    Sounds reasonable, PR welcome!

  2. added
    stubs: false positive
    on Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stubs: false positive

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions