version_pinning

Reproducible venv: version pinning

Version pinning is delegated to tools like uv, pip, ...

In short, there are two files to control the dependency versions:

  • pyproject.toml lists the dependencies (and version ranges) for all environments

  • constraints.txt pins the dependencies to specific versions for the selected environment

Details:

Technically, only constraints.txt pins the versions.

The role of pyproject.toml is to list required dependency names optionally with possible version ranges.

The content of constraints.txt captures one of the possible outcomes of the dependency resolution considering:

  • selected python version

  • version ranges in pyproject.toml

  • versions pinned in existing constraints.txt

  • versions available in artifact repo (e.g. pypi.org)