http.client and dns lookups

Dieter Maurer dieter at handshake.de
Mon Jan 31 14:02:46 EST 2022


Michael Welle wrote at 2022-1-30 09:18 +0100:
> ...
 The machine this is running on regularly switches
>its network configuration without restarting the Python application. Now
>it turns out that the application is still using an old, outdated dns
>server after such a network configuration switch.

It is unlikely that Python performs the host -> IP address translation
itself. Almost surely, the translation is delegated to functions
of the underlying C runtime library, e.g. "gethostbyname".


More information about the Python-list mailing list