From 24263f7e67e76ccdc70a91c943ae085f3011279d Mon Sep 17 00:00:00 2001 From: Harini Date: Mon, 17 Aug 2026 12:18:21 +0530 Subject: [PATCH] fix: move dev dependencies to hatch env so they don't leak into runtime pre-commit was leaking into `requires_dist` since v0.24.2 because the dev deps were declared under [tool.poetry.group.dev.dependencies] while the build backend is hatchling. Some versions of hatchling/pip treat [tool.poetry.group.*.dependencies] as optional/extra dependencies, causing pre-commit (and its transitive deps) to be installed as a runtime requirement for all users of the library. Replace [tool.poetry.group.dev.dependencies] with a proper [tool.hatch.envs.dev.dependencies] section, which is the native way to declare development-only dependencies when using hatchling as the build backend. These entries are never included in the wheel's metadata, so they will not appear in `requires_dist` or in `pip show diagrams`. Fixes #1193 --- pyproject.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0a43e988..4b26d56a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,13 +23,13 @@ diagrams = "diagrams.cli:main" Homepage = "https://diagrams.mingrammer.com" Repository = "https://github.com/mingrammer/diagrams" -[tool.poetry.group.dev.dependencies] -pytest = "^8.3" -pylint = "^3.3" -rope = "^1.13" -isort = "^6.0" -black = "^24.4" -pre-commit = "^4.0" +[tool.hatch.envs.dev.dependencies] +pytest = ">=8.3,<9" +pylint = ">=3.3,<4" +rope = ">=1.13,<2" +isort = ">=6.0,<7" +black = ">=24.4,<25" +pre-commit = ">=4.0,<5" [tool.hatch.build] only-include = ["diagrams", "resources"]