Vendor ssl.match_hostname to avoid Python 3.10 deprecation warning
See original GitHub issueAs reported by @AdamWill in https://github.com/urllib3/urllib3/issues/2200#issuecomment-931759912, we’re issuing deprecation warnings for using ssl.match_hostname()
on Python 3.10:
/usr/lib/python3.10/site-packages/urllib3/connection.py:542: DeprecationWarning: ssl.match_hostname() is deprecated
match_hostname(cert, asserted_hostname)
We should probably fix that as we’re relying on users fixing 1.26.x deprecation warnings before moving to 2.0. In that case, the fix is vendoring ssl.match_hostname()
as SSLContext.check_hostname
does not support all our needs such as fingerprintings. Look at this main
commit for inspiration of what should be done in the 1.26.x
branch: https://github.com/urllib3/urllib3/pull/2198
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
ssl.match_hostname() is deprecated" on Fedora 35 / Rawhi...
Bug 2009550 - "DeprecationWarning: ssl.match_hostname() is deprecated" on Fedora 35 ... Vendor ssl.match_hostname to avoid Python 3.10 deprecation warning ...
Read more >Issue 43880: 3.10 SSL module deprecations - Python tracker
With PEP 644 accepted I can finally raise deprecation warnings for a ... ssl.SSLContext() without a protocol argument * ssl.match_hostname().
Read more >Tornado Documentation - Read the Docs
However, this pattern produces deprecation warnings starting in Python 3.10 and will break in some future version of Python.).
Read more >Package List — Spack 0.20.0.dev0 documentation
ethtool, py-backports-ssl-match-hostname, r-htmltools ... Versions: 3.10.0, 3.9.0; Build Dependencies: cmake, python, py-setuptools, gl, py-pip, py-wheel, ...
Read more >Bug listing with status RESOLVED with resolution TEST ...
Stop." status:RESOLVED resolution:TEST-REQUEST severity:normal ... DeprecationWarning: the md5 module is deprecated; use hashlib" status:RESOLVED ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chetanugale @Pradhvan Because there’s some time sensitivity to this PR I’d recommend both of you work on this and whoever has a PR that’s ready to merge first will be merged. Not trying to turn this into a race, I just know that I’m also guilty of committing to an OSS contribution but not quite sure when it’ll get done due to real life concerns.
Thank you both for being interested in this, it’s very appreciated. Hope that either way you’ll both be interested in contributing other issues as well 🙇
I can give it a shot. 😄