Skip to content

socket.getaddrinfo can return an (int, bytes) tuple if Python is compiled with --disable-ipv6 #128546

@srittau

Description

@srittau

Documentation

Currently, socket.getaddrinfo is documented as follows:

[...] sockaddr is a tuple describing a socket address, whose format depends on the returned family (a (address, port) 2-tuple for AF_INET, a (address, port, flowinfo, scope_id) 4-tuple for AF_INET6), [...]

But it seems that it can also return a (int, bytes) tuple if Python is compiled with --disable-ipv6 and the family is AF_INET6. This should be documented.

Cf. python/typeshed#13344, cc @MaicoTimmerman

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions