(cls, uri_string, encoding='utf-8')
return cls(
            split_uri['scheme'], split_uri['authority'],
            normalizers.encode_component(split_uri['path'], encoding),
            normalizers.encode_component(split_uri['query'], encoding),
            normalizers.encode_component(split_uri['fragment'], encoding),
            encoding,
        )
Parse a URI reference from the given unicode URI string.

        :param str uri_string: Unicode URI to be parsed into a reference.
        :param str encoding: The encoding of the string provided
        :returns: :class:`URIReference` or subclass thereof
Parse a URI reference from the given unicode URI string.
Parse a URI reference from the given unicode URI string .
def from_string(cls, uri_string, encoding='utf-8'):
        """Parse a URI reference from the given unicode URI string.

        :param str uri_string: Unicode URI to be parsed into a reference.
        :param str encoding: The encoding of the string provided
        :returns: :class:`URIReference` or subclass thereof
        """
        uri_string = compat.to_str(uri_string, encoding)

        split_uri = misc.URI_MATCHER.match(uri_string).groupdict()
        return cls(
            split_uri['scheme'], split_uri['authority'],
            normalizers.encode_component(split_uri['path'], encoding),
            normalizers.encode_component(split_uri['query'], encoding),
            normalizers.encode_component(split_uri['fragment'], encoding),
            encoding,
        )
def from_string ( cls , uri_string , encoding = 'utf-8' ) : uri_string = compat . to_str ( uri_string , encoding ) split_uri = misc . URI_MATCHER . match ( uri_string ) . groupdict ( ) return cls ( split_uri [ 'scheme' ] , split_uri [ 'authority' ] , normalizers . encode_component ( split_uri [ 'path' ] , encoding ) , normalizers . encode_component ( split_uri [ 'query' ] , encoding ) , normalizers . encode_component ( split_uri [ 'fragment' ] , encoding ) , encoding , )