def str_list_from_io(stream):
    """Turn stream into a str generator."""
    while True:
        line = stream.readline()
        if line == '':
            break
        if isinstance(line, bytes):
            line = line.decode('utf-8')
        yield line
