Skip to content

Commit ae6ecba

Browse files
WilliamBergaminClaude
andcommitted
fix(deps): split starlette pin so Python 3.9 stays installable
starlette 1.6.0 requires Python >=3.10 (floor jumped to >=3.9 at 0.45.0 and to >=3.10 at 0.50.0), so the Dependabot two-way replacement stranded Python 3.9 on a release it can't install and broke "Unit tests (3.9)". Split the requirement three ways to partition the matrix: 3.7/3.8 keep <0.45, 3.9 takes the last compatible 0.49.x line (<0.50), and 3.10+ takes the >=1.6.0,<2 bump. Drop the redundant note to match chalice/fastapi. Also codify in the managing-dependencies skill that the # Note: comment is extremely optional and must not restate what the requirement lines already make explicit. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 60d15ee commit ae6ecba

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎.claude/skills/managing-dependencies/SKILL.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The convention resolves this without dropping old-Python support: pin each inter
1919

2020
## File-layout convention
2121

22-
Each file starts with a `# pip install -r requirements/<file>.txt` header, then lists **one dependency per section**: the name of the dependency (as a `# name` header), an optional rationale note (starting with `# Note:`, explaining why a version is pinned or split), then the requirement line(s), separated from the next section by a blank line. This makes every pin self-documenting.
22+
Each file starts with a `# pip install -r requirements/<file>.txt` header, then lists **one dependency per section**: the name of the dependency (as a `# name` header), an **extremely optional** rationale note (starting with `# Note:` — see below), then the requirement line(s), separated from the next section by a blank line. This makes every pin self-documenting.
2323

2424
```
2525
# pip install -r requirements/test.txt
@@ -34,6 +34,8 @@ pytest-cov>=7.1.0,<8; python_version >= "3.14"
3434

3535
Keep this layout when adding or editing dependencies. Never leave an empty trailing `;` (a fossil of a collapsed split; delete it — the old `pytest-asyncio<2;` line was exactly this).
3636

37+
**On the `# Note:` — omit it by default.** The requirement lines and their `python_version` markers already state *what* is pinned and *which interpreter gets which release*, and this skill already establishes that an old-side ceiling marks a floor jump. A note must never restate any of that. Write one only to record rationale the lines cannot express on their own — a non-obvious cap, or a coupling invisible from the specifier. The archetype is the `tracerite` pin (see "a coupled companion dependency" below): a companion dependency that breaks with no `requires_python` metadata, which no reader could infer from the line itself. A routine floor-jump split (like `chalice`, `fastapi`, or `starlette`) needs no note at all. Several older sections still carry notes that merely restate their lines; treat those as legacy, not a template to copy.
38+
3739
## Which files need Python-version markers
3840

3941
A marker split is only needed for requirements files installed across the **full** Python matrix. Which file you are editing decides this. To see where a file is installed, read `.github/workflows/ci-build.yml`. It is the source of truth for which Python versions install which requirements files. Everything except `dev_tools.txt` is installed by the `unittest` matrix job across 3.7–3.14.

‎requirements/adapter_dev.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ sanic>=25.3.0,<25.12.0; python_version >= "3.9" and python_version < "3.10"
6464
sanic>=25.12.1,<26; python_version >= "3.10"
6565

6666
# starlette
67-
# Note: starlette 0.49.3 requires Python >=3.9; 3.7/3.8 stay on the older pinned release.
6867
starlette>=0.19.1,<0.45; python_version < "3.9"
69-
starlette>=1.6.0,<2; python_version >= "3.9"
68+
starlette>=0.49.3,<0.50; python_version >= "3.9" and python_version < "3.10"
69+
starlette>=1.6.0,<2; python_version >= "3.10"
7070

7171
# tornado
7272
# Note: tornado 6.5.6 requires Python >=3.9; 3.7/3.8 stay on the older pinned release.

0 commit comments

Comments
 (0)