diff options
| author | R. David Murray <rdmurray@bitdance.com> | 2010-05-25 15:20:46 (GMT) |
|---|---|---|
| committer | R. David Murray <rdmurray@bitdance.com> | 2010-05-25 15:20:46 (GMT) |
| commit | bfbdefe5392c60d36ec12ffc9b52a156f4610f3e (patch) | |
| tree | 869e8a9447ae39beaa051429993bdb9b79477c77 /Lib/urllib.py | |
| parent | b64c89bd7abf05baad517b50cef7bc7de7b4eb74 (diff) | |
| download | cpython-bfbdefe5392c60d36ec12ffc9b52a156f4610f3e.zip cpython-bfbdefe5392c60d36ec12ffc9b52a156f4610f3e.tar.gz cpython-bfbdefe5392c60d36ec12ffc9b52a156f4610f3e.tar.bz2 | |
Issue 8143: sync unquote in urlparse with urllib; add comment about doing so.
unquote is duplicated in the two files to avoid a circular reference.
(This is fixed in Python3.) Updates keep getting made to the public unquote
without fixing the urlparse one, however, so this fix syncs the two
and adds a comment to both to make sure changes are applied to both.
Diffstat (limited to 'Lib/urllib.py')
| -rw-r--r-- | Lib/urllib.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index de10c7e..de67f67 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -1156,6 +1156,10 @@ def splitvalue(attr): if match: return match.group(1, 2) return attr, None +# urlparse contains a duplicate of this method to avoid a circular import. If +# you update this method, also update the copy in urlparse. This code +# duplication does not exist in Python3. + _hexdig = '0123456789ABCDEFabcdef' _hextochr = dict((a + b, chr(int(a + b, 16))) for a in _hexdig for b in _hexdig) |
