Matt Giuca <matt.gi...@gmail.com> added the comment:

If this patch is rejected, then at the very least, the urllib.unquote function 
needs a comment at the top explaining that it is duplicated in urlparse, so any 
changes should be made to both.

Note that urlparse.unquote is not a documented function, or in the __all__ 
export list, so people *shouldn't* be using it. But OK, I'll accept that some 
might.

If there is a problem with some kind of race condition importing (I don't see 
how there could be, but I'll accept it if someone confirms), or with people 
using urlparse.unquote directly, then I'd propose an alternate solution which 
removes the circular dependency entirely: Move unquote into a separate module 
_urlunquote, which is imported by both urllib and urlparse. No code breakage.

Patch attached. Commit log: "Fixed duplication of urllib.unquote in urlparse. 
Moved function to a separate module _urlunquote."

----------
Added file: http://bugs.python.org/file16553/urlparse-unquote-newmodule.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8143>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to