question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vendor ssl.match_hostname to avoid Python 3.10 deprecation warning

See original GitHub issue

As 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:closed
  • Created 2 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
sethmlarsoncommented, Oct 7, 2021

@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 🙇

2reactions
Pradhvancommented, Oct 1, 2021

I can give it a shot. 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found