comparison mercurial/urllibcompat.py @ 51700:7f0cb9ee0534

Backout accidental publication of a large range of revisions I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 23 Jul 2024 10:02:46 +0200
parents 493034cc3265
children ca7bde5dbafb
comparison
equal deleted inserted replaced
51699:bd1483fd7088 51700:7f0cb9ee0534
107 b"SimpleHTTPRequestHandler", 107 b"SimpleHTTPRequestHandler",
108 b"CGIHTTPRequestHandler", 108 b"CGIHTTPRequestHandler",
109 ), 109 ),
110 ) 110 )
111 111
112
113 # urllib.parse.quote() accepts both str and bytes, decodes bytes 112 # urllib.parse.quote() accepts both str and bytes, decodes bytes
114 # (if necessary), and returns str. This is wonky. We provide a custom 113 # (if necessary), and returns str. This is wonky. We provide a custom
115 # implementation that only accepts bytes and emits bytes. 114 # implementation that only accepts bytes and emits bytes.
116 def quote(s, safe='/'): 115 def quote(s, safe='/'):
117 # bytestr has an __iter__ that emits characters. quote_from_bytes() 116 # bytestr has an __iter__ that emits characters. quote_from_bytes()