Skip to content
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

Python 3.12+ compatibility - module 'ssl' has no attribute 'wrap_socket' #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

riklaunim
Copy link

ssl.wrap_socket was deprecated since Python 3.7 and remove in 3.12 so for it to work with 3.12 SSLContext.wrap_socket has to be used.

https://pradyunsg-cpython-lutra-testing.readthedocs.io/en/latest/whatsnew/3.12.html

Tested for my use case and it seems to be working fine, although did not test with self.key_file/self.cert_file set which were undefined (and None in some test).

@hronecviktor
Copy link

👍 For this, we need this merged ASAP too

@PeterDekkers
Copy link

PeterDekkers commented May 6, 2024

@henrys-cm or anyone at CM, could you please review this?

This library doesn't work with Python 3.12+, which I assume is reasonably important.

@mikemanger
Copy link

mikemanger commented Aug 1, 2024

I've tried emailing the support to hopefully get some action on this.
One thing that is missing from this PR is it would be good to update tox to test against Python 3.11 and 3.12.

@riklaunim
Copy link
Author

I've tried emailing the support to hopefully get some action on this. One thing that is missing from this PR is it would be good to update tox to test against Python 3.11 and 3.12.

That can be added, although someone with knowledge of the codebase has to look at this. Like those hasattr I had to use were quite unexpected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants