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
While I care about consistency between the asyncio and threading implementation, I care about consistency with Python's stdlib even more, and this behavior is inherited from the standard library.
>>> import socket
>>> socket.create_server(("::", 1234))
Traceback (most recent call last):
File "<python-input-1>", line 1, in <module>
s = socket.create_server(("::", 1234))
File "/Users/myk/.pyenv/versions/3.13.1/lib/python3.13/socket.py", line 947, in create_server
raise error(err.errno, msg) from None
OSError: [Errno 8] nodename nor servname provided, or not known (while attempting to bind on address ('::', 1234))
>>> socket.create_server(("::", 1234), family=socket.AddressFamily.AF_INET6)
<socket.socket fd=5, family=30, type=1, proto=0, laddr=('::', 1234, 0, 0)>
This should be improved in Python, perhaps by changing the default to family=AF_UNSPEC like asyncio.create_server and making it work. I recommend that you file an issue against Python.
Thanks for the great product!
I'd like to report a minor issue I just faced.
I need to listen on an ipv6 address.
asyncio version can simply serve("::", port)
but sync version needs specifying the family like
The text was updated successfully, but these errors were encountered: