def http_connect(ipaddr, port, device, partition, method, path,
                 headers=None, query_string=None, ssl=False):
    if isinstance(path, six.text_type):
        try:
            path = path.encode("utf-8")
        except UnicodeError as e:
            logging.exception(_('Error encoding to UTF-8: %s'), str(e))
    if isinstance(device, six.text_type):
        try:
            device = device.encode("utf-8")
        except UnicodeError as e:
            logging.exception(_('Error encoding to UTF-8: %s'), str(e))
    path = quote('/' + device + '/' + str(partition) + path)
    return http_connect_raw(
        ipaddr, port, method, path, headers, query_string, ssl)
A convenience wrapper for memoizing properties.
dataset/ETHPy150Open openstack/swift/swift/common/bufferedhttp.py/http_connect--crossover with--dataset/ETHPy150Open pantsbuild/pants/src/python/pants/util/memo.py/memoized_property