piptools._compat.path_compat module#

Compatibility helpers for working with paths and pathlib across platforms and Python versions.

piptools._compat.path_compat.relative_to_walk_up(path: Path, start: Path) Path#

Compute a relative path allowing for the input to not be a subpath of the start.

This is a compatibility helper for pathlib.Path.relative_to(..., walk_up=True) on all Python versions. (walk_up: bool is Python 3.12+)