python-trio / python-trio/trio

Switch packaging to PDM/Hatch/Poetry

Open
#2,790 26 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

project meta
Dominant language
Python
Stars
7.3k
Forks
431
Avg merge
2d 17h
Merged PRs (30d)
6

Description

There's some discussion in #2681, and some more in Gitter, but let's make a dedicated issue for this.

Alternatives:

  1. Status quo
    • dependabot is a hassle
    • sort of impossible to properly define different package version requirements on different versions
    • regenerating *-requirements.txt locally, as is currently required to pass CI whenever changing something in *-requirements.in, requires having a matching python version and possibly other requirements on your environment.
  2. Poetry
    • Does not comply with PEP 621: https://github.com/python-poetry/roadmap/issues/3
    • there's an open PR for switching to Poetry: #2595
    • Supports lockfiles, quoting @njsmith on gitter:

      lockfiles for a library are very valuable for keeping CI functioning
      you don't ship them, but if you don't have them in CI and don't have very rapid development, then every time you do try to merge a PR you discover that actually CI has been broken for a while and no-one noticed so now you have to untangle that before you can finish your original thought

  3. Hatch
    • Does not support lockfiles, but there are different ways to get around the above problem
      quoting @apollo13

      Fair enough. But with a nightly run you would also notice if a dependency update is breaking stuff and you could react faster by limiting the dependency till you fixed it

      quoting @agronholm

      what I do in my projects instead is cache the dependencies
      so they only get updated if I update my pyproject.toml or manually delete the caches
      => no constant dependabot churn

  4. PDM
    • supports lockfiles

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading the discussion in #2681, the Gitter discussion, and the existing Poetry pull request #2595. Compare the listed status quo, Poetry, Hatch, and PDM alternatives; work is done only once the project agrees on a packaging approach and the migration scope is defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.