[Python-checkins] r68306 - sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py

benjamin.peterson python-checkins at python.org
Sun Jan 4 19:27:19 CET 2009


Author: benjamin.peterson
Date: Sun Jan  4 19:27:19 2009
New Revision: 68306

Log:
fix_urllib: add mappings for the url parsing functions

Modified:
   sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py

Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py	(original)
+++ sandbox/trunk/2to3/lib2to3/fixes/fix_urllib.py	Sun Jan  4 19:27:19 2009
@@ -15,7 +15,10 @@
                      '_urlopener', 'urlcleanup']),
                 ('urllib.parse',
                     ['quote', 'quote_plus', 'unquote', 'unquote_plus',
-                     'urlencode', 'pahtname2url', 'url2pathname']),
+                     'urlencode', 'pahtname2url', 'url2pathname', 'splitattr',
+                     'splithost', 'splitnport', 'splitpasswd', 'splitport',
+                     'splitquery', 'splittag', 'splittype', 'splituser',
+                     'splitvalue', ]),
                 ('urllib.error',
                     ['ContentTooShortError'])],
            'urllib2' : [
@@ -34,9 +37,12 @@
                      'FTPHandler', 'CacheFTPHandler',
                      'UnknownHandler']),
                 ('urllib.error',
-                    ['URLError', 'HTTPError'])],
+                    ['URLError', 'HTTPError']),
+           ]
 }
 
+# Duplicate the url parsing functions for urllib2.
+MAPPING["urllib2"].append(MAPPING["urllib"][1])
 
 # def alternates(members):
 #     return "(" + "|".join(map(repr, members)) + ")"


More information about the Python-checkins mailing list