gmr/pamqp

Inconsistent unicode behaviour between python2 and 3

Closed this issue · 2 comments

https://github.com/gmr/pamqp/blob/master/pamqp/encode.py#L136 handles unicode strings inconsistently between the 2 major python versions: the other will encode unicode strings as ASCII, the other as UTF-8 octets.

https://github.com/gmr/pamqp/blob/master/pamqp/encode.py#L19 is also shoddy, since unicode is definitely not bytes. A compat lib would ease the pain of handling all of that (six, or homemade)

gmr commented

Addressed in 1.7 to be released today, thanks for the report. Yeah I didn't want to go six and add the overhead, should work fine as defined in 1.7.