Why requests raise this exception "check_hostname requires server_hostname"? Why requests raise this exception "check_hostname requires server_hostname"? python python

Why requests raise this exception "check_hostname requires server_hostname"?


as a work around:

pip install urllib3==1.25.11


As I understand, in new urllib3 the main schema of proxy was changed... can read here.This settings help for me (for urllib3=1.26.4).

An old

proxy={    'http':'8.88.888.8:8888',    'https':'8.88.888.8:8888'    }

The new

proxy={    'https': 'https://8.88.888.8:8888',    'http': 'http://8.88.888.8:8888',    } 

UPDATED

I have met this issue again for requests 2.26.0, but in this time it works with an old schema...

proxy={    'http':'8.88.888.8:8888',    'https':'8.88.888.8:8888'    }


I have solved the problem. It is a bug with urllib3.

You can use pip install urllib3==1.25.8