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
Can you reproduce the bug with PYTHONASYNCIODEBUG in env? yes:
In uvloop 0.8.0, an error occurs when sending UDP data to a named host. The default asyncio eventloop allows it (and it probably shouldn't since sendto can block on the name lookup). Here is an example.
import uvloop
class P:
def connection_made(self, transport):
pass
async def go():
loop = asyncio.get_event_loop()
pair = await loop.create_datagram_endpoint(P, local_addr=("0.0.0.0", 6666))
transport = pair[0]
try:
transport.sendto(b'foo', ("google.com", 6666))
except Exception as ex:
print(ex)
if 1:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
asyncio.get_event_loop().run_until_complete(go())
The text was updated successfully, but these errors were encountered:
Good catch. I've fixed uvloop to raise an error when a DNS lookup is needed in .sendto(). I will fix asyncio in a similar fashion. The fix will be in the next uvloop release in a couple of days.
PYTHONASYNCIODEBUG
in env? yes:In uvloop 0.8.0, an error occurs when sending UDP data to a named host. The default asyncio eventloop allows it (and it probably shouldn't since sendto can block on the name lookup). Here is an example.
The text was updated successfully, but these errors were encountered: