mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-25068: urllib.request.ProxyHandler now lowercases the dict keys (GH-13489)
This commit is contained in:
parent
693aa80a43
commit
b761e3aed1
3 changed files with 18 additions and 14 deletions
|
@ -792,6 +792,7 @@ class ProxyHandler(BaseHandler):
|
|||
assert hasattr(proxies, 'keys'), "proxies must be a mapping"
|
||||
self.proxies = proxies
|
||||
for type, url in proxies.items():
|
||||
type = type.lower()
|
||||
setattr(self, '%s_open' % type,
|
||||
lambda r, proxy=url, type=type, meth=self.proxy_open:
|
||||
meth(r, proxy, type))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue