Skip to content

Conversation

miss-islington
Copy link
Contributor

GH-127712: Fix secure argument of logging.handlers.SMTPHandler

Python 3.12 removed support for the keyfile and certfile parameters
in smtplib.SMTP.starttls(), requiring a ssl.SSLContext instead.
SMTPHandler now creates a context from the secure tuple and passes
that to starttls.
(cherry picked from commit d7672e5)

Co-authored-by: s-hamann 10639154+s-hamann@users.noreply.github.com

…er` (pythonGH-127726)

pythonGH-127712: Fix `secure` argument of `logging.handlers.SMTPHandler`

Python 3.12 removed support for the `keyfile` and `certfile` parameters
in `smtplib.SMTP.starttls()`, requiring a `ssl.SSLContext` instead.
`SMTPHandler` now creates a context from the `secure` tuple and passes
that to `starttls`.
(cherry picked from commit d7672e5)

Co-authored-by: s-hamann <10639154+s-hamann@users.noreply.github.com>
@vsajip vsajip merged commit 2db4a9d into python:3.12 Feb 10, 2025
29 checks passed
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