You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first type is the raw result coming from the system getaddrinfo implementation: tuple[int, int, int, str, tuple[int, bytes], currently not supported.
The correctness of the getaddrinfo return value is debated under the --disable-ipv6 flag. Python has marked both issues as won't fix, a long time ago.
I'm creating this issue to debate the value of adding a new return type variant to getaddrinfo. The likelihood of this happening is small, as Python usually ships with ipv6 support. However, it could result in library owners not correctly handling the return values.
The text was updated successfully, but these errors were encountered:
To resolve the issue of missing return value variants for socket.getaddrinfo when IPv6 is disabled, you need to update the socket.pyi stub file in the typeshed repository. Specifically, you should modify the return type of the getaddrinfo function to include a new variant that accounts for the scenario where IPv6 is disabled. Add a new return type variant, Tuple[int, int, int, str, Tuple[int, bytes]], to the existing return type union. This change ensures that the getaddrinfo function correctly handles the return values when IPv6 is disabled, accommodating the raw result from the system getaddrinfo implementation.
Whenever Python is compiled with
--disable-ipv6
, but running on a system that supports ipv6, we observe:resulting in:
The first type is the raw result coming from the system
getaddrinfo
implementation:tuple[int, int, int, str, tuple[int, bytes]
, currently not supported.Now according to:
The correctness of the
getaddrinfo
return value is debated under the--disable-ipv6
flag. Python has marked both issues as won't fix, a long time ago.I'm creating this issue to debate the value of adding a new return type variant to
getaddrinfo
. The likelihood of this happening is small, as Python usually ships with ipv6 support. However, it could result in library owners not correctly handling the return values.The text was updated successfully, but these errors were encountered: