]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-91099: fix[imaplib]: call Exception with string instance (GH-31823) (#150810)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 3 Jun 2026 13:12:27 +0000 (15:12 +0200)
committerGitHub <noreply@github.com>
Wed, 3 Jun 2026 13:12:27 +0000 (09:12 -0400)
commitd5ebac697f3b3d364680ee1e99dd4555a230594c
treeef4fda27ef429420dbc19a61b9e7149de75b1e41
parente7a9369d27aeaa4191efd789ddf2b1140da394d5
[3.14] gh-91099: fix[imaplib]: call Exception with string instance (GH-31823) (#150810)

* bpo-46943: fix[imaplib]: call Exception with string instance

Adjust the behavior of 'login' to be similar to `authenticate()`,
where self.error is called with a str() instance.
(cherry picked from commit 29805f00a1b65163230d17584c30e2b955086abb)

Co-authored-by: Florian Best <spaceone@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Lib/imaplib.py
Lib/test/test_imaplib.py
Misc/NEWS.d/next/Library/2023-02-26-14-07-18.gh-issue-91099._QPbEL.rst [new file with mode: 0644]