Skip to content

RequestsHTTPTransport cookies arg seems to have wrong type signature #593

Closed

Description

@raxod502

In version 4.3.0b2 of gql, the RequestsHTTPTransport class has the following type signature for the cookies parameter of __init__:

        cookies: Optional[Union[Dict[str, Any], RequestsCookieJar]] = None,

This seems incorrect, because it disallows passing http.cookiejar.CookieJar objects in this parameter, although that is supported by requests, as discussed at python/typeshed#12593.

Indeed, I see an error flagged by the Pyright language server when I do this. Happy to provide more diagnostic information if it would be helpful, however the root cause seemed clear to me when I looked at the code above.

Activity

  1. changed the title [-]GQLRequestsHTTPTransport cookies arg seems to have wrong type signature[/-] [+]RequestsHTTPTransport cookies arg seems to have wrong type signature[/+] on May 30, 2026
  2. added
    type: bug
    on May 30, 2026
  3. leszekhanusz commented on May 30, 2026

    @leszekhanusz
    Collaborator

    Thanks!

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

    type: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions