Adapt bootstrap / conventions to use `pylock.toml`

Open
#54 1 comment 0 reactions 2 assignees View on GitHub

@rgaudin is already working on this.

Since Jul 18, 2025.

Assessment

This issue has not been assessed yet.

Description

enhancement

In many projects we are building (scrapers, zimfarm, ... all besides libraries like python-scraperlib), we use pinned dependencies versions to ensure reproducible builds.

But now the ecosystem has changed and pylock.toml format has landed (see https://packaging.python.org/en/latest/specifications/pylock-toml/)

This file would allow to specify range of versions in pyproject.toml for all projects, and use the pylock.toml to have reproducible builds.

This would allow to simplify significantly dependency upgrades since one will just have to update the pylock.toml to most recent version matching pyproject.toml ranges. This is currently done manually and is quite a pain.

Currently, hatch does not support this pylock.toml file, see e.g. https://github.com/pypa/hatch/issues/749

We could:

  • wait for hatch to support it, and help if possible
    • downside: not ready
  • consider migrating from hatch to uv
    • downside1 : hatch-openzim plugin will not work anymore ... but could probably easily be adapted for uv +
    • downside2: uv uses its own "proprietary" lock file, which is not really future-proof)

I would clearly prefer to wait for hatch support (and contribute to it as much as possible).

WDYT?

Dominant language
Python
Stars
1
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openzim/_python-bootstrap

All issues in openzim/_python-bootstrap

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.