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

* 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]