def _parents(path):
    """
    yield all parents of path including path
    """
    last = None
    while path != last:
        yield path
        last = path
        path, _ = os.path.split(path)

    yield all parents of path including path
    
product/gradle-plugin/src/main/python/pkg_resources/__init__.py