Per discussion on #303, arbitrary bytes in the path and query should pass through even if they aren't UTF-8 encoded. The params argument should also accept arbitrary bytes, rather than just ASCII.
The approach here is to use hyperlink.EncodedURL (a.k.a. hyperlink.URL) rather than DecodedURL. The latter has strong UTF-8 opinions. treq continues to accept either type (or bytes or str) as the url argument.
Per discussion on #303, arbitrary bytes in the path and query should pass through even if they aren't UTF-8 encoded. The params argument should also accept arbitrary
bytes
, rather than just ASCII.The approach here is to use
hyperlink.EncodedURL
(a.k.a.hyperlink.URL
) rather thanDecodedURL
. The latter has strong UTF-8 opinions. treq continues to accept either type (orbytes
orstr
) as the url argument.