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
For IPv4 addresses, two special forms are accepted instead of a host address: '' represents INADDR_ANY, which is used to bind to all interfaces, and the string '<broadcast>' represents INADDR_BROADCAST. This behavior is not compatible with IPv6, therefore, you may want to avoid these if you intend to support IPv6 with your Python programs.
It looks like CPython implements it in socketmodule.c:setipaddress()
PYTHONASYNCIODEBUG
in env?:Some code out there in the wild uses an ip address of "" to indicate a broadcast should be made instead of using 255.255.255.255. i.e.
asyncio.UDPDatagramTransport.sendto(data,
"<broadcast>"
)This causes sendto() to fail because uvloop tries to resolve this address.
This behavior is all over various packages, i.e.:
so this behavior breaks a lot of things.
It would be a trivial change to implement in uvloop, just check if address ==
"<broadcast>"
and replace it with 255.255.255.255The text was updated successfully, but these errors were encountered: