jaraco / irc

Full-featured Python IRC library for Python.
MIT License
390 stars 84 forks source link

Replace deprecated ssl.wrap_socket with SSLContext.wrap_socket #221

Closed StareInTheAir closed 3 months ago

StareInTheAir commented 6 months ago

ssl.wrap_socket() was also removed in Python 3.12, so this makes ssl-cat.py work with 3.12.

I prefer this fix, but I also have a branch where I changed the library code to directly work with SSLContext.wrap_socket but it's a breaking change, since then ssl.wrap_socket() will no longer work: https://github.com/jaraco/irc/compare/main...StareInTheAir:irc-fork:feature/ssl-context-wrap-socket-lib Please let me know if I should open a PR for that branch instead

This PR is backwards compatible since it's only client-side.

Resolves #216

bswck commented 3 months ago

@jaraco

jaraco commented 3 months ago

The coverage failures are fine - these lines were added to a script that already wasn't being tested in that code, so I'll ignore the failure. Thanks for the contrib!