Skip to content

RequestsHTTPTransport cookies arg seems to have wrong type signature #593

@raxod502

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugAn issue or pull request relating to a bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions