This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lavajoe
Recipients lavajoe
Date 2011-01-19.15:35:30
SpamBayes Score 1.01468e-06
Marked as misclassified No
Message-id <>
In imaplib, there is currently a mix of bytes array and str use.  Time2Internaldate(), e.g., returns (and accepts) str.  Internaldate2tuple() and ParseFlags() only accept a bytes object, and the latter returns a tuple of bytes objects.  Of course, these were all strings in Python 2.

To regain compatibility with Python 2 behavior and make things more consistent, this patch changes the return type of ParseFlags() to a str tuple, and allow it and Internaldate2tuple() to accept either a bytes object or a str.

The unit test has been expanded to test these.  Note that applying this patch assumes that the the patches from issue 10939 and issue 10941 have been applied.

Also, I am not sure it is proper to accept *both* bytes array and str.  Perhaps only str should be allowed.  Comments?
Date User Action Args
2011-01-19 15:35:32lavajoesetrecipients: + lavajoe
2011-01-19 15:35:32lavajoesetmessageid: <>
2011-01-19 15:35:30lavajoelinkissue10947 messages
2011-01-19 15:35:30lavajoecreate