Skip to content

[packaging] Dev-only tools end up in install_requires #4109

Description

@skkzsh

Issue

The following are dev-only tools introduced in #3039 and don't need to ship with the package:

ruff >= 0.11.2
pre_commit >= 4.2.0
dennis >= 1.2.0

Note

  • The pytest family (pytest, pytest-flask, pytest-mock) is intentionally bundled per the explicit comment, so it's out of scope here:
    # Include pytest, so if theres a support issue we can ask them to run these tests on their setup
    pytest ~=9.0
    pytest-flask ~=1.3
    pytest-mock ~=3.15
  • pytest-xdist (L163) and psutil (L155, "Needed for testing") are similar candidates.

User impact

  • Unnecessary transitive dependencies pulled into end-user environments (install size and time)
  • Version conflicts with users who already pin ruff, pre_commit, or dennis

Example

For instance, in an LXC container provisioned by the Proxmox community script, the dev tool binaries land system-wide:

# which -a ruff pre-commit
/usr/local/bin/ruff
/usr/local/bin/pre-commit

Possible approach

These can live in a new requirements-dev.txt instead:

-r requirements.txt
ruff
pre_commit
dennis

Developers install them with pip install -r requirements-dev.txt.

Notes

Side note: pyproject.toml has [dependency-groups] for the same kind of split.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions