Similar question to Force requests to use IPv4 / IPv6.
I'm using pwclient, which uses in xmlrpc.py for connection xmlrpc.client (xmlrpc.client.SafeTransport for HTTPS and xmlrpc.client.Transport for HTTP), which uses http.client (http.client.HTTPSConnection for HTTPS and http.client.HTTPConnection for HTTP).
How can I force it to use only IPv4 or only IPv6?