canonical / canonical/sphinx-stack

Migrate dependencies from `requirements.txt` to `pyproject.toml`

Open
#498 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
37
Forks
77
Avg merge
8d 13h
Merged PRs (30d)
5

Description

Propose migrating the starter pack's dependencies from `requirements.txt` to `pyproject.toml` (PEP 621) for better dependency management.

## Motivation

The starter pack currently uses `requirements.txt` for dependency management, which is essentially just a list of package names and version ranges. This approach has significant limitations:

* supporting multiple systems and Python versions
The starter pack must support all active Ubuntu LTS versions, which implies multiple Python versions (3.10, 3.11, 3.12). It is also designed to run on different build environments. Multiple `requirement.txt` files will be required for pinning package versions on different Python versions.
* no optional dependencies

## Benefits

* Python version requirements: explicitly state compatible Python versions and package requirements
* Dependencies groups: separate dev/docs/test dependencies cleanly in one file
* Lockfile: lock transitive dependencies for reproducibility
* Tool integration: some projects already use tools like `uv` or `poetry` to manage code packages.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.