From b77aa02eec66a5d46c498b01b8569a337f527a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Sat, 23 Aug 2025 11:51:23 +0200 Subject: [PATCH] restore comment post GH-136623 --- Lib/smtplib.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/smtplib.py b/Lib/smtplib.py index b71fee8777e866..808f0fd47e8b4e 100644 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -734,6 +734,7 @@ def login(self, user, password, *, initial_response_ok=True): preferred_auths = ['CRAM-MD5', 'PLAIN', 'LOGIN'] else: preferred_auths = ['PLAIN', 'LOGIN'] + # We try the supported authentications in our preferred order, if # the server supports them. authlist = [auth for auth in preferred_auths if auth in advertised_authlist]