bpo-38080: Added "getproxies" to urllib fixes in the 2to3 tool (GH-16167)
This commit is contained in:
parent
64838ce717
commit
276a84a0a6
|
@ -13,7 +13,7 @@ MAPPING = {"urllib": [
|
|||
("urllib.request",
|
||||
["URLopener", "FancyURLopener", "urlretrieve",
|
||||
"_urlopener", "urlopen", "urlcleanup",
|
||||
"pathname2url", "url2pathname"]),
|
||||
"pathname2url", "url2pathname", "getproxies"]),
|
||||
("urllib.parse",
|
||||
["quote", "quote_plus", "unquote", "unquote_plus",
|
||||
"urlencode", "splitattr", "splithost", "splitnport",
|
||||
|
|
|
@ -1913,7 +1913,11 @@ def foo():
|
|||
"""
|
||||
self.check(b, a)
|
||||
|
||||
def test_single_import(self):
|
||||
b = "from urllib import getproxies"
|
||||
a = "from urllib.request import getproxies"
|
||||
|
||||
self.check(b, a)
|
||||
|
||||
def test_import_module_usage(self):
|
||||
for old, changes in self.modules.items():
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Added support to fix ``getproxies`` in the :mod:`lib2to3.fixes.fix_urllib`
|
||||
module. Patch by José Roberto Meza Cabrera.
|
Loading…
Reference in New Issue