Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
srittau opened this issue Jan 6, 2025 · 0 comments
Labels
docs Documentation in the Doc dir

Comments

@srittau
Copy link
Contributor

srittau commented Jan 6, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

1 participant