diff tests/test-doctest.py @ 31566:c6df6a23dfe5

pycompat: alias urlreq.unquote to unquote_to_bytes Previously, urlreq.unquote aliased to urllib.parse.unquote, which returned a str/unicode. We like bytes, so switch urlreq.unquote to dispatch to urllib.parse.unquote_to_bytes. This required a minor helper function to register an alias under a different name from which it points. If this turns into a common pattern, we could likely teach _registeralias to accept tuple values defining the mapping. Until then, I didn't feel like adding complexity to _registeralias.
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 21 Mar 2017 22:20:11 -0700
parents 43d6ef658874
children ca3b4a2b7e54
line wrap: on
line diff