Skip to content

Conversation

@MaelkMark
Copy link
Contributor

Replaced ssl.wrap_socket() with the new ssl.SSLContext approach in WebSocketHandler __init__ as Python 3.12+ no longer supports the ssl.wrap_socket() function.

The ssl.wrap_socket() function was removed in Python 3.12, making it impossible now to establish a secure websocket connection. I've replaced the script inside the try with the new ssl context approach.

I also added an except for handling FileNotFoundError and another one for the ssl.SSLError to clarify error messages.

Replaced ssl.wrap_socket() with the new ssl.SSLContext approach in WebSocketHandler __init__ as Python 3.12+ no longer supports the ssl.wrap_socket() function.
@richtepa
Copy link

richtepa commented Oct 7, 2025

Hi @Pithikos,

it would be great if you could release a new version containing this PR to add support for Python 3.12+.

Thanks.
Paul

@Pithikos Pithikos merged commit d478e0f into Pithikos:master Oct 7, 2025
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.

3 participants