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

2012-01-02 Thread Erno Tukia
New submission from Erno Tukia : >>> import imaplib >>> imap = imaplib.IMAP4_SSL("imap.example.com") >>> authcb = lambda resp: "{0}\x00{0}\x00{1}".format("username","password") >>> imap.authenticate("PLAIN", a

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

2012-01-02 Thread Erno Tukia
Erno Tukia added the comment: The same problems exists even if I use b"PLAIN" as the first argument in authenticate(). -- ___ Python tracker <http://bugs.python.o

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

2012-01-02 Thread Erno Tukia
Erno Tukia 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

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

2012-01-03 Thread Erno Tukia
Erno Tukia added the comment: In Python 2.6 PLAIN authentication works, in Python 3.1 not. Lib/test/test_imaplib.py does not test IMAP4.authenticate() or IMAP4.login_cram_md5() functions, only IMAP4.login(). I would still like to go back to imaplib._Authenticator.encode() function. The

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

2012-01-03 Thread Erno Tukia
Erno Tukia added the comment: I tried to fix the problem and the correct fix is to change oup = '' to oup = b'' in imaplib._Authenticator.encode() function, and not what I suggested in my previous post. After changing that PLAIN

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

2012-01-03 Thread Erno Tukia
Erno Tukia added the comment: Here's a patch with test. I am not an IMAP guru, so please verify my patch. -- keywords: +patch Added file: http://bugs.python.org/file24132/issue13700.patch ___ Python tracker <http://bugs.python.org/is

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

2012-01-03 Thread Erno Tukia
Erno Tukia added the comment: Here's another patch that should fix the CRAM-MD5 authentication. My previous patch is required with this one. The patch includes a test. -- Added file: http://bugs.python.org/file24134/cram_md5.patch ___ P

[issue13725] regrtest does not recognize -d flag

2012-01-07 Thread Erno Tukia
New submission from Erno Tukia : ./python -m test --help -d/--debug -- print traceback for failed tests ./python -m test -d test_imaplib option -d not recognized Use --help for usage Patch included. -- components: Tests files: regrtest-debug.patch keywords: patch messages: 150790

[issue13726] regrtest ambiguous -S flag

2012-01-07 Thread Erno Tukia
New submission from Erno Tukia : ./python -m test --help -S/--slow -- print the slowest 10 tests -S is used to continue running tests after an aborted run. It will maintain the order a standard run (ie, this assumes -r is not used). This is useful after the tests have prematurely stopped

[issue13725] regrtest does not recognize -d flag

2012-01-13 Thread Erno Tukia
Erno Tukia added the comment: @Éric I just tried to fix, with tests, the imaplib bug (#13700) and I found this bug. And fixing this bug I happened to notice in the source code another bug (#13726). No problems with CPython test suite relating to these regrtest bugs

[issue13726] regrtest ambiguous -S flag

2012-01-14 Thread Erno Tukia
Erno Tukia added the comment: --start requires an argument but short opt -S does not. in Lib/test/regrtest.py opts, args = getopt.getopt(sys.argv[1:], '...S...', [..., 'start=', ...]) Patch included. -- keywords: +patch Added file: http://bugs.

[issue13726] regrtest ambiguous -S flag

2012-01-14 Thread Erno Tukia
Changes by Erno Tukia : -- resolution: fixed -> status: closed -> open ___ Python tracker <http://bugs.python.org/issue13726> ___ ___ Python-bugs-list

[issue13725] regrtest does not recognize -d flag

2012-01-14 Thread Erno Tukia
Erno Tukia added the comment: Meador, thanks for the acknowledgement. -- ___ Python tracker <http://bugs.python.org/issue13725> ___ ___ Python-bugs-list mailin

[issue13700] imaplib.IMAP4.authenticate authobject does not work correctly in python3

2012-07-01 Thread Erno Tukia
Erno Tukia added the comment: Here's the updated patch. Tests now works. PLAIN works for me, that's only I can test against live system. test_login_cram_md5 test had extra \r\n in _send_tagged. diff imaplib_authenticate.patch imaplib_authenticate_v2.patch < + self._send_ta