(self, use_idna=False)
return uri.encode(self.encoding)
Create a URI bytes object from the components.

        :returns: The parsed URI reconstituted as a string.
        :rtype: bytes
Create a URI bytes object from the components.
Create a URI bytes object from the components .
def unsplit(self, use_idna=False):
        """Create a URI bytes object from the components.

        :returns: The parsed URI reconstituted as a string.
        :rtype: bytes
        """
        parse_result = self
        if use_idna and self.host:
            # self.host is bytes, to encode to idna, we need to decode it
            # first
            host = self.host.decode(self.encoding)
            hostbytes = host.encode('idna')
            parse_result = self.copy_with(host=hostbytes)
        if self.lazy_normalize:
            parse_result = parse_result.copy_with(lazy_normalize=False)
        uri = parse_result.reference.unsplit()
        return uri.encode(self.encoding)
def unsplit ( self , use_idna = False ) : parse_result = self if use_idna and self . host : # self.host is bytes, to encode to idna, we need to decode it # first host = self . host . decode ( self . encoding ) hostbytes = host . encode ( 'idna' ) parse_result = self . copy_with ( host = hostbytes ) if self . lazy_normalize : parse_result = parse_result . copy_with ( lazy_normalize = False ) uri = parse_result . reference . unsplit ( ) return uri . encode ( self . encoding )