◐ Shell
clean mode source ↗

Message 322737 - Python tracker

> The RFC treats empty authority and no authority as different cases.

I'm not well-versed on this. But I guess this means urllib.parse doesn't support this distinction. For example:

  >>> urllib.parse.urlsplit('file:/foo')
  SplitResult(scheme='file', netloc='', path='/foo', query='', fragment='')
  >>> urllib.parse.urlsplit('file:///foo')
  SplitResult(scheme='file', netloc='', path='/foo', query='', fragment='')
  >>> urllib.parse.urlsplit('file:/foo') == \
      urllib.parse.urlsplit('file:///foo')
  True

Both have authority / netloc equal to the empty string, even though in the first example the authority isn't present per your comment.