From 13d73428aa2766b22a7b3494ed8f9915f5bb0110 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Thu, 4 Jun 2026 09:29:20 +0300 Subject: [PATCH] chore: pin faststream <0.7, swap build backend, adopt cov gate, add CLAUDE.md Three independently-motivated changes bundled per the migration design (planning/specs/2026-06-04-faststream-0.7-migration-design.md): 1. Tighten the faststream dependency from "faststream>=0.5,<1" to "faststream>=0.5,<0.7". Guards against the silent pull of 0.7 the previous <1 bound allowed. Companion PR (chore/faststream-0.7-migration) bumps to >=0.7,<0.8 and drops <0.7 support entirely. 2. Swap build backend from hatchling to uv_build. Matches the toolchain used across the modern-python sister projects. 3. Adopt --cov-fail-under=100 in pytest addopts. Hardens the coverage gate before the migration PR disturbs anything. Also creates CLAUDE.md with the standard ## Workflow section so future AI sessions on this repo get the same brief as the sister projects. Co-Authored-By: Claude Opus 4.7 (1M context) --- CLAUDE.md | 10 ++++++++++ pyproject.toml | 13 +++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..157c95e --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,10 @@ +## Workflow + +Per-feature workflow: brainstorming → spec in +`planning/specs/YYYY-MM-DD--design.md` → writing-plans → +plan in `planning/plans/YYYY-MM-DD--plan.md` → +executing-plans / subagent-driven-development → +requesting-code-review → finishing-a-development-branch. + +Topic slugs are kebab-case descriptions (e.g. `faststream-0.7-migration`), +not story IDs. diff --git a/pyproject.toml b/pyproject.toml index 2538657..2e099e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ "Typing :: Typed", "Topic :: Software Development :: Libraries", ] -dependencies = ["faststream>=0.5,<1", "modern-di>=2,<3"] +dependencies = ["faststream>=0.5,<0.7", "modern-di>=2,<3"] version = "0" [project.urls] @@ -39,11 +39,12 @@ lint = [ ] [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.11,<1.0"] +build-backend = "uv_build" -[tool.hatch.build] -include = ["modern_di_faststream"] +[tool.uv.build-backend] +module-name = "modern_di_faststream" +module-root = "" [tool.ruff] fix = false @@ -71,7 +72,7 @@ isort.lines-after-imports = 2 isort.no-lines-before = ["standard-library", "local-folder"] [tool.pytest.ini_options] -addopts = "--cov=. --cov-report term-missing" +addopts = "--cov=. --cov-report term-missing --cov-fail-under=100" asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function"