New submission from Feng A:

=====================================================
BUG:

run : urlparse.urlparse('http://google.com]')
then: raise ValueError("Invalid IPv6 URL")

=====================================================
SOURCE:

    if url[:2] == '//':

        netloc, url = _splitnetloc(url, 2)

        if (('[' in netloc and ']' not in netloc) or

                (']' in netloc and '[' not in netloc)):

            raise ValueError("Invalid IPv6 URL")

=====================================================
SOLUTION:

I THINK IT IS BETTER TO JUST REMOVE THE LAST 3 LINES ABOVE

----------
components: Library (Lib)
messages: 266125
nosy: Feng A
priority: normal
severity: normal
status: open
title: I think this is a small bug in urlparse.py
type: behavior
versions: Python 2.7, Python 3.4

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

Reply via email to