Senthil Kumaran added the comment: Reading both the RFCs and requirements, I see that this is already taken care.
Note: we are actually have unencoded fragment like # and RFCs talk about fragments with # character only. If you want the behavior of parse with urlencoded to match un-urlencoded one, that's a different requirement and not a scope here. Here is 3.5 output $ ./python.exe Python 3.5.0a0 (default:528234542ff0, Apr 14 2014, 18:25:27) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import urllib.parse >>> p = urllib.parse.urlparse('ws://example.com/something?query=foo#bar') >>> p ParseResult(scheme='ws', netloc='example.com', path='/something', params='', query='query=foo', fragment='bar') >>> p = urllib.parse.urlparse('ws://example.com/something#bar') >>> p ParseResult(scheme='ws', netloc='example.com', path='/something', params='', query='', fragment='bar') Here is 2.7.6 output $ ./python.exe Python 2.7.6+ (2.7:7dab4feec126+, Jan 11 2014, 15:25:20) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import urlparse >>> ^D [localhost 2.7]$ ./python.exe Python 2.7.6+ (2.7:7dab4feec126+, Jan 11 2014, 15:25:20) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from urlparse import urlparse >>> urlparse('ws://example.com/something?query=foo#bar') ParseResult(scheme='ws', netloc='example.com', path='/something', params='', query='query=foo', fragment='bar') >>> urlparse('ws://example.com/something#bar') ParseResult(scheme='ws', netloc='example.com', path='/something', params='', query='', fragment='bar') >>> I find it satisfactory and I think, this bug should be closed. Thank you! ---------- assignee: -> orsenthil resolution: -> works for me status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13244> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com