Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment: This is an issue with Python 2 too which I hope can be fixed too. The original logic in the code was committed around 16 years back : https://github.com/python/cpython/commit/bbc0568a5c7d3849a22c78d545823a4b952c0933 and tests are also around 10 years old too.
➜ cpython git:(2bea771609) ✗ ./python.exe Python 2.7.15+ (remotes/upstream/2.7:2bea771609, Jul 30 2018, 18:07:51) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ➜ cpython git:(2bea771609) ✗ ./python.exe bpo34276.py file://root/a [SplitResult(scheme='file', netloc='root', path='/a', query='', fragment='')] file://root/a ROUNDTRIP: True file:///root/a [SplitResult(scheme='file', netloc='', path='/root/a', query='', fragment='')] file:///root/a ROUNDTRIP: True file:////root/a [SplitResult(scheme='file', netloc='', path='//root/a', query='', fragment='')] file://root/a ROUNDTRIP: False file://///root/a [SplitResult(scheme='file', netloc='', path='///root/a', query='', fragment='')] file:///root/a ROUNDTRIP: False Thanks ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34276> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com