pyptr2 added the comment:

Thanks for looking into this. Some comments:

1.
yuri, I haven't tried the github repo. Is that where the development happens? 
The description suggests it is outdated since the adoption, but there are some 
commits that aren't in hg...?
Anyhow, the relevant code looks identical to me.

2.
guido, yes validation would be domain specific.
But, just to understand: why validate at all?
If I give create_connection() or sock_connect() an unresolved address, then I 
would expect some "yield from resolve(domain, name)" to happen, which would be 
getaddrinfo() for IP-domain. If that would hang the event loop on some 
platform, do it in an executor. This is exactly what create_server() already 
does, by the way.

3.
AF_UNPSEC seems to mean (AF_INET or AF_INET6) to a lot of people these days, 
possibly because getaddrinfo() accepts these three AFs. I am not 100% sure, but 
that is why I think it is reasonable that _ipaddr_info() handles AF_UNSPEC in 
the way it does.

4.
For my use case, anything that stops check_resolve() from raising when given a 
resolved non-IP address would be enough for now.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27136>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to