[Python-Dev] making socket.getaddrinfo use cached dns

Antoine Pitrou solipsis at pitrou.net
Sat Jul 16 17:26:07 CEST 2011


On Sun, 17 Jul 2011 00:59:17 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> 
> Exposing those flags would
> encourage people to do exactly that, and that would be a *really* bad
> idea

Making DNS resolution configurable (for example by allowing the user to
supply their own resolution function) in the stdlib's network APIs
doesn't sound like a really bad idea to me. Of course, a "no_ipv6" flag
would scale poorly and would therefore be a bad API.

> We really shouldn't make things even worse by making
> it easy for developers with broken IPv6 setups to switch off IPv6
> support entirely).

I don't think moralist arguments should have a weight when deciding
which features we add. If developers want to introduce bugs or
limitations in their software they will always be able to do it.

Regards

Antoine.




More information about the Python-Dev mailing list