In python3 it's in `urllib.parse`, you can use `compat_urlparse`.