docs: def _safe_urlsplit(s):
      """the urlparse.urlsplit cache breaks if it contains unicode and
      we cannot control that.  So we force type cast that thing back
      to what we think it is.
      """
      rv = urlparse.urlsplit(s)
      # we have to check rv[2] here and not rv[1] as rv[1] will be
      # an empty bytestring in case no domain was given.
      if type(rv[2]) is not type(s):
          assert hasattr(urlparse, 'clear_cache')
          urlparse.clear_cache()
          rv = urlparse.urlsplit(s)
          assert type(rv[2]) is type(s)
      return rv