|
4 | 4 |
|
5 | 5 | - `main` is the current stable line (v2); releases are cut from it (see |
6 | 6 | `RELEASE.md`). |
7 | | -- Removing or replacing an API must be intentional, and what shipped in 2.x |
8 | | - is public surface. Adding a replacement API or `@deprecated` shim is |
9 | | - likewise a deliberate design choice, not bolted on for free. |
10 | | -- Changes that break code written against v1 (including those softened by a |
11 | | - backwards-compatibility shim) must be documented in `docs/migration.md`. |
| 7 | +- v2 is released; its public API is a compatibility contract for the 2.x |
| 8 | + line. Removals, renames, or any change to an existing API's signature or |
| 9 | + observable behaviour (including ones softened by a `@deprecated` shim) is a |
| 10 | + design decision a maintainer makes explicitly, and should generally be |
| 11 | + avoided. |
| 12 | +- `docs/migration.md` is the v1 → v2 record and is closed to new entries. |
| 13 | + Correcting errors or improving clarity in what's there is fine. |
12 | 14 | - `v1.x` is the maintenance branch for the previous major. Backport PRs |
13 | 15 | target it and use a `[v1.x]` title prefix; only critical bug fixes and |
14 | 16 | security fixes land there. |
@@ -128,18 +130,6 @@ What the existing pragmas mean: |
128 | 130 | - `# pragma: no branch` — excludes branch arcs only. coverage.py misreports the |
129 | 131 | `->exit` arc for nested `async with` on Python 3.11+ (worse on 3.14/Windows). |
130 | 132 |
|
131 | | -## Breaking Changes |
132 | | - |
133 | | -When making breaking changes, document them in `docs/migration.md` — including |
134 | | -changes softened by a backwards-compatibility shim. Include: |
135 | | - |
136 | | -- What changed |
137 | | -- Why it changed |
138 | | -- How to migrate existing code |
139 | | - |
140 | | -Search for related sections in the migration guide and group related changes together |
141 | | -rather than adding new standalone sections. |
142 | | - |
143 | 133 | ## Documentation |
144 | 134 |
|
145 | 135 | When a change affects public API or user-visible behaviour, update the relevant |
|
0 commit comments