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 orsenthil
Recipients Jiri.Horky, bero, cyrus, eric.araujo, ezio.melotti, orsenthil, santoso.wijaya, ssbarnea, terry.reedy
Date 2011-06-25.20:22:42
SpamBayes Score 2.371396e-05
Marked as misclassified No
Message-id <20110625202238.GA10432@mathmagic>
In-reply-to <1309031664.1.0.864654468055.issue11898@psf.upfronthosting.co.za>
Content
Hi Sorin,
On Sat, Jun 25, 2011 at 07:54:24PM +0000, sorin wrote:
> type(message_body) is str ... even if I tried to manually force
> Python for use bytes. It seams that in 2.7 bytes are alias to str.
> Due to this the code will fail to run only on 2.7 because it will
> try to convert  binary data to unicode string.

Bit confused here. You encode the string to bytes and decode it back
to str. One does not force bytes to str. And if you use, str or bytes
consistently in Python2.7 you wont face the problem.
History
Date User Action Args
2011-06-25 20:22:43orsenthilsetrecipients: + orsenthil, terry.reedy, bero, ezio.melotti, eric.araujo, ssbarnea, santoso.wijaya, Jiri.Horky, cyrus
2011-06-25 20:22:42orsenthillinkissue11898 messages
2011-06-25 20:22:42orsenthilcreate