[issue20271] urllib.parse.urlparse() accepts wrong URLs
Serhiy Storchaka
report at bugs.python.org
Tue Mar 3 19:40:15 CET 2015
Serhiy Storchaka added the comment:
With optimizations in issue23563 and weaken IPv6 check the implementation of urlsplit() can be faster.
$ ./python -m timeit -s "from urllib.parse import urlparse, clear_cache" -- "urlparse('http://python.org:80'); clear_cache()"
10000 loops, best of 3: 86.3 usec per loop
$ ./python -m timeit -s "from urllib.parse import urlparse, clear_cache" -- "urlparse('http://[2001:4802:7901:0:e60a:1375:0:5]:80'); clear_cache()"
10000 loops, best of 3: 88.6 usec per loop
----------
Added file: http://bugs.python.org/file38322/urlparse_2.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20271>
_______________________________________
More information about the Python-bugs-list
mailing list