Bug#764380: A closer look

Stephan Sürken stephan.suerken at 1und1.de
Mon Oct 13 15:07:43 UTC 2014


Hi Stuart,

thanks for pointing to the commit.

I had a closer look; it's this compat include

---
try:
    from StringIO import StringIO
    BytesIO = StringIO
except ImportError:
    from io import BytesIO, StringIO
---

that previously made it work.

Using io.open() implicitly makes the "split_gpg_and_payload" produce
unicode strings. Then finally code like this

---
io.BytesIO().write(b"\n".join([u"unicode string"]))
---

is run (and fails).

Fwiw, for python3 "split_gpg_and_payload" implicitly produces 'bytes',
and everything works fine.

Not really sure though what a good fix could be ;).

Thx,

S



More information about the pkg-python-debian-maint mailing list