[docs] [issue13700] imaplib.IMAP4.authenticate authobject fails with PLAIN mechanism

Erno Tukia report at bugs.python.org
Tue Jan 3 03:59:53 CET 2012

Erno Tukia <erno.tukia at iki.fi> added the comment:

File "/usr/lib/python3.1/imaplib.py", line 1257, in encode
    e = binascii.b2a_base64(t)

imaplib._Authenticator.encode() calls binascii.b2a_base64() function. In Python 2.6 that function returns a string, and in Python 3.1 it returns bytes. What is returned from b2a_base64() function is later in the encode() function concatenated with a string, with bytes that is not possible.

Should binascii.b2a_base64() return a string (2.6) or bytes (3.1)?


Python tracker <report at bugs.python.org>

More information about the docs mailing list