diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_urllib.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_urllib.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Lib/lib2to3/fixes/fix_urllib.py b/Lib/lib2to3/fixes/fix_urllib.py index 1e74bff..89abfc4 100644 --- a/Lib/lib2to3/fixes/fix_urllib.py +++ b/Lib/lib2to3/fixes/fix_urllib.py @@ -15,7 +15,10 @@ MAPPING = {'urllib': [ '_urlopener', 'urlcleanup']), ('urllib.parse', ['quote', 'quote_plus', 'unquote', 'unquote_plus', - 'urlencode', 'pahtname2url', 'url2pathname']), + 'urlencode', 'pathname2url', 'url2pathname', 'splitattr', + 'splithost', 'splitnport', 'splitpasswd', 'splitport', + 'splitquery', 'splittag', 'splittype', 'splituser', + 'splitvalue', ]), ('urllib.error', ['ContentTooShortError'])], 'urllib2' : [ @@ -34,12 +37,12 @@ MAPPING = {'urllib': [ 'FTPHandler', 'CacheFTPHandler', 'UnknownHandler']), ('urllib.error', - ['URLError', 'HTTPError'])], + ['URLError', 'HTTPError']), + ] } - -# def alternates(members): -# return "(" + "|".join(map(repr, members)) + ")" +# Duplicate the url parsing functions for urllib2. +MAPPING["urllib2"].append(MAPPING["urllib"][1]) def build_pattern(): |