WHATWG rejects ".://", yeah? It's not the most readable spec, but there's a tester here:
https://jsdom.github.io/whatwg-url/
I recently published bindings for ada (an implementation of the WHATWG URL Spec) for Python with the hope of having something that follows a single standard.