Message 74760 - Python tracker
IMAP_stream() is also broken because it uses os.popen2() which has been deprecated since long time and now replaced by subprocess. Here is a patch replacing os.popen2() by subprocess, but also using transparent conversion from/to unicode using io.TextIOWrapper().