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 r.david.murray
Recipients lazka, luch, r.david.murray
Date 2017-12-20.03:13:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513739589.59.0.213398074469.issue32268@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, if that protocol existed the errors would be clearer.  But it doesn't, for historical reasons, and that is unlikely to change.

You are welcome to submit an enhancement request to make quopri accept string as an argument when decoding.  But when encoding, it must produce bytes, because "ASCII" is a *byte* encoding, not a unicode encoding (unicode is ascii compatible, but it is neither ascii nor bytes).  You might have to write the PR yourself, I'm not sure if anyone else will be interested (but some of the people on the core-mentorship mailing list might be).

StringIO is specifically designed to only operate on strings.  If you want to decode the bytes you feed it, you have to do that.  This is an intentional design.

Further discussion of ways to improve the situation should move to the python-idea mailing list.  There's really nothing to do here from a bug tracker perspective, unless you want to open an enhancement request as mentioned above.
History
Date User Action Args
2017-12-20 03:13:09r.david.murraysetrecipients: + r.david.murray, luch, lazka
2017-12-20 03:13:09r.david.murraysetmessageid: <1513739589.59.0.213398074469.issue32268@psf.upfronthosting.co.za>
2017-12-20 03:13:09r.david.murraylinkissue32268 messages
2017-12-20 03:13:08r.david.murraycreate