def _sans_ext(path):
    """
    Removes the file extension.
    This differs from Path.stem, which returns the final path component
    stripped of its extension. This returns the full path stripped of its
    extension.
    >>> Path('a/b.c').sans_ext()
    PosixPath('a/b')
    """
    return path.parent / path.stem