'Make a L{URLPath} from a L{str} or L{unicode}.
@param url: A L{str} representation of a URL.
@type url: L{str} or L{unicode}.
@return: a new L{URLPath} derived from the given string.
@rtype: L{URLPath}'

@classmethod
def fromString(klass, url):

    if (not isinstance(url, (str, unicode))):
        raise ValueError("'url'    must    be    a    str    or    unicode")
    if isinstance(url, bytes):
        return klass.fromBytes(url)
    return klass._fromURL(_URL.fromText(url))
