]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-94172: urllib.request avoids deprecated check_hostname (#94193)
authorVictor Stinner <vstinner@python.org>
Fri, 24 Jun 2022 15:45:28 +0000 (17:45 +0200)
committerGitHub <noreply@github.com>
Fri, 24 Jun 2022 15:45:28 +0000 (17:45 +0200)
commitf0b234e6ed83e810bd9844e744f5e22aa538a356
tree7bfb542d0c120c3f48b1e607bd10185ad00718f6
parente69306f08b9be84ccdd0a1c6601ec229c4e5b377
gh-94172: urllib.request avoids deprecated check_hostname (#94193)

The urllib.request no longer uses the deprecated check_hostname
parameter of the http.client module.

Add private http.client._create_https_context() helper to http.client,
used by urllib.request.

Remove the now redundant check on check_hostname and verify_mode in
http.client: the SSLContext.check_hostname setter already implements
the check.
Lib/http/client.py
Lib/urllib/request.py