-
Notifications
You must be signed in to change notification settings - Fork 567
Remove outdated Python pre-3.7 references #1186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ | |
|
|
||
| if not hasattr(ssl, 'match_hostname'): | ||
| try: | ||
| from backports.ssl_match_hostname import match_hostname | ||
| from ssl import match_hostname | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like exactly the right idea. I'll also note that ssl.match_hostname has been deprecated since Python 3.7 and is actually removed in 3.12 (more on that in PYTHON-1331) so these changes will likely be subsequently changed based on whatever happens with that ticket (which is next in my queue). I very much like the other changes in this PR, though, so my inclination is to merge this now and just lay any fixes for PYTHON-1331 on top of this in their own PR. |
||
| ssl.match_hostname = match_hostname | ||
| except ImportError: | ||
| pass # tests will fail | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find! I must've missed this one when I put out the last release 🤦