Author ncoghlan
Recipients ncoghlan, r.david.murray, stein-k
Date 2018-01-08.02:39:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1515379159.62.0.467229070634.issue32498@psf.upfronthosting.co.za>
In-reply-to
Content
As David noted, we updated all the URL parsing functions to be polymorphic back in 3.2: https://docs.python.org/3/library/urllib.parse.html#parsing-ascii-encoded-bytes

We left the quoting functions alone, because they already had their own way of dealing with the bytes-vs-str distinction (quote_from_bytes, unquote_to_bytes, etc) that meant the polymorphic approach we adopted for the parsing functions didn't make sense.

That said, I think it would be reasonable to enhance unquote() to accept a bytes object, processing it as follows:

    unquote_to_bytes(string).decode(encoding, errors)
History
Date User Action Args
2018-01-08 02:39:19ncoghlansetrecipients: + ncoghlan, r.david.murray, stein-k
2018-01-08 02:39:19ncoghlansetmessageid: <1515379159.62.0.467229070634.issue32498@psf.upfronthosting.co.za>
2018-01-08 02:39:19ncoghlanlinkissue32498 messages
2018-01-08 02:39:18ncoghlancreate