@classmethod
def __unsplit(cls, username, password, hostname, port):
    """Put together a :class:`Netloc` from its constituent parts."""
    auth_string = ''
    if username:
        auth_string = username
        if password:
            auth_string += ':' + password
        auth_string += '@'
    port_string = ''
    if port is not None:
        port_string = ':%d' % port
    return cls(auth_string + hostname + port_string)
