Skip to content

Commit 6a1f2f4

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pin-actions-by-sha
2 parents e9e5cc2 + 1b10c65 commit 6a1f2f4

File tree

5 files changed

+245
-168
lines changed

5 files changed

+245
-168
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@ repos:
4040
require_serial: true
4141
language: unsupported
4242
pass_filenames: false
43+
44+
- id: add-release-date
45+
language: unsupported
46+
name: add date to latest release header
47+
entry: uv run python scripts/add_latest_release_date.py
48+
files: ^release-notes\.md$
49+
pass_filenames: false

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ github-actions = [
6767
tests = [
6868
"coverage[toml]>=6.2,<8.0",
6969
"fastapi>=0.128.0",
70-
"mypy==1.19.1",
70+
"mypy==1.20.0",
7171
"pytest>=7.4.0,<10.0.0",
72-
"ruff==0.15.8",
72+
"ruff==0.15.9",
7373
"uvicorn>=0.39.0",
7474
"ty>=0.0.25",
7575
]

release-notes.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
### Internal
66

7+
* 🔨 Add pre-commit hook to ensure latest release header has date. PR [#323](https://github.com/fastapi/fastapi-cli/pull/323) by [@YuriiMotov](https://github.com/YuriiMotov).
8+
* ⬆ Bump ruff from 0.15.8 to 0.15.9. PR [#354](https://github.com/fastapi/fastapi-cli/pull/354) by [@dependabot[bot]](https://github.com/apps/dependabot).
9+
* ⬆ Bump ty from 0.0.27 to 0.0.28. PR [#355](https://github.com/fastapi/fastapi-cli/pull/355) by [@dependabot[bot]](https://github.com/apps/dependabot).
10+
* ⬆ Bump mypy from 1.19.1 to 1.20.0. PR [#351](https://github.com/fastapi/fastapi-cli/pull/351) by [@dependabot[bot]](https://github.com/apps/dependabot).
11+
* ⬆ Bump fastapi from 0.135.2 to 0.135.3. PR [#353](https://github.com/fastapi/fastapi-cli/pull/353) by [@dependabot[bot]](https://github.com/apps/dependabot).
12+
* ⬆ Bump ty from 0.0.26 to 0.0.27. PR [#352](https://github.com/fastapi/fastapi-cli/pull/352) by [@dependabot[bot]](https://github.com/apps/dependabot).
713
* ⬆ Bump ruff from 0.15.7 to 0.15.8. PR [#347](https://github.com/fastapi/fastapi-cli/pull/347) by [@dependabot[bot]](https://github.com/apps/dependabot).
814
* ⬆ Bump fastapi from 0.135.1 to 0.135.2. PR [#345](https://github.com/fastapi/fastapi-cli/pull/345) by [@dependabot[bot]](https://github.com/apps/dependabot).
915
* ⬆ Bump ty from 0.0.25 to 0.0.26. PR [#348](https://github.com/fastapi/fastapi-cli/pull/348) by [@dependabot[bot]](https://github.com/apps/dependabot).
@@ -45,7 +51,7 @@
4551
* ⬆ Bump typer from 0.23.1 to 0.24.0. PR [#312](https://github.com/fastapi/fastapi-cli/pull/312) by [@dependabot[bot]](https://github.com/apps/dependabot).
4652
* ⬆ Bump uvicorn from 0.40.0 to 0.41.0. PR [#311](https://github.com/fastapi/fastapi-cli/pull/311) by [@dependabot[bot]](https://github.com/apps/dependabot).
4753

48-
## 0.0.23
54+
## 0.0.23 (2026-02-16)
4955

5056
### Breaking Changes
5157

@@ -55,7 +61,7 @@
5561

5662
* 🎨 Update format and types for Python 3.10. PR [#310](https://github.com/fastapi/fastapi-cli/pull/310) by [@tiangolo](https://github.com/tiangolo).
5763

58-
## 0.0.22
64+
## 0.0.22 (2026-02-16)
5965

6066
### Internal
6167

@@ -69,7 +75,7 @@
6975
* ⬆ Bump rich-toolkit from 0.19.2 to 0.19.3. PR [#303](https://github.com/fastapi/fastapi-cli/pull/303) by [@dependabot[bot]](https://github.com/apps/dependabot).
7076
* ➕ Replace test dependency on `fastapi-slim` with `fastapi`. PR [#301](https://github.com/fastapi/fastapi-cli/pull/301) by [@musicinmybrain](https://github.com/musicinmybrain).
7177

72-
## 0.0.21
78+
## 0.0.21 (2026-02-11)
7379

7480
### Internal
7581

@@ -103,19 +109,19 @@
103109
* ⬆ Bump actions/download-artifact from 6 to 7. PR [#260](https://github.com/fastapi/fastapi-cli/pull/260) by [@dependabot[bot]](https://github.com/apps/dependabot).
104110
* 👷 Add pre-commit workflow. PR [#266](https://github.com/fastapi/fastapi-cli/pull/266) by [@YuriiMotov](https://github.com/YuriiMotov).
105111

106-
## 0.0.20
112+
## 0.0.20 (2025-12-22)
107113

108114
### Features
109115

110116
* ✨ Add --reload-dir option to dev command. PR [#267](https://github.com/fastapi/fastapi-cli/pull/267) by [@patrick91](https://github.com/patrick91).
111117

112-
## 0.0.19
118+
## 0.0.19 (2025-12-22)
113119

114120
### Breaking Changes
115121

116122
* 🔧 Drop support for Python 3.8. PR [#269](https://github.com/fastapi/fastapi-cli/pull/269) by [@patrick91](https://github.com/patrick91).
117123

118-
## 0.0.18
124+
## 0.0.18 (2025-12-22)
119125

120126
### Features
121127

@@ -125,7 +131,7 @@
125131

126132
* 🐛 Fix log alignment when pressing Ctrl+C to stop server. PR [#253](https://github.com/fastapi/fastapi-cli/pull/253) by [@savannahostrowski](https://github.com/savannahostrowski).
127133

128-
## 0.0.17
134+
## 0.0.17 (2025-12-22)
129135

130136
### Upgrades
131137

@@ -146,13 +152,13 @@
146152
* ⬆ Bump ruff from 0.14.2 to 0.14.4. PR [#239](https://github.com/fastapi/fastapi-cli/pull/239) by [@dependabot[bot]](https://github.com/apps/dependabot).
147153
*[pre-commit.ci] pre-commit autoupdate. PR [#238](https://github.com/fastapi/fastapi-cli/pull/238) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
148154

149-
## 0.0.16
155+
## 0.0.16 (2025-11-10)
150156

151157
### Fixes
152158

153159
* 🐛 Fix support for Pydantic v1. PR [#240](https://github.com/fastapi/fastapi-cli/pull/240) by [@patrick91](https://github.com/patrick91).
154160

155-
## 0.0.15
161+
## 0.0.15 (2025-11-10)
156162

157163
### Features
158164

@@ -177,7 +183,7 @@ entrypoint = "some.importable_module:app_name"
177183
* 🔧 Configure reminder for `waiting` label in `issue-manager`. PR [#227](https://github.com/fastapi/fastapi-cli/pull/227) by [@YuriiMotov](https://github.com/YuriiMotov).
178184
*[pre-commit.ci] pre-commit autoupdate. PR [#215](https://github.com/fastapi/fastapi-cli/pull/215) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
179185

180-
## 0.0.14
186+
## 0.0.14 (2025-10-20)
181187

182188
### Upgrades
183189

@@ -187,13 +193,13 @@ entrypoint = "some.importable_module:app_name"
187193

188194
* ⬆ Bump tiangolo/issue-manager from 0.5.1 to 0.6.0. PR [#220](https://github.com/fastapi/fastapi-cli/pull/220) by [@dependabot[bot]](https://github.com/apps/dependabot).
189195

190-
## 0.0.13
196+
## 0.0.13 (2025-09-20)
191197

192198
### Features
193199

194200
* ✨ Allow to use `-h` for help. PR [#191](https://github.com/fastapi/fastapi-cli/pull/191) by [@patrick91](https://github.com/patrick91).
195201

196-
## 0.0.12
202+
## 0.0.12 (2025-09-17)
197203

198204
### Features
199205

@@ -207,7 +213,7 @@ entrypoint = "some.importable_module:app_name"
207213
*[pre-commit.ci] pre-commit autoupdate. PR [#208](https://github.com/fastapi/fastapi-cli/pull/208) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
208214
*[pre-commit.ci] pre-commit autoupdate. PR [#205](https://github.com/fastapi/fastapi-cli/pull/205) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
209215

210-
## 0.0.11
216+
## 0.0.11 (2025-09-09)
211217

212218
### Features
213219

@@ -239,7 +245,7 @@ $ fastapi run --entrypoint some.importable_module:app_name
239245
* ⬆ Bump pypa/gh-action-pypi-publish from 1.12.4 to 1.13.0. PR [#200](https://github.com/fastapi/fastapi-cli/pull/200) by [@dependabot[bot]](https://github.com/apps/dependabot).
240246
* 👷 Detect and label merge conflicts on PRs automatically. PR [#204](https://github.com/fastapi/fastapi-cli/pull/204) by [@svlandeg](https://github.com/svlandeg).
241247

242-
## 0.0.10
248+
## 0.0.10 (2025-08-31)
243249

244250
### Features
245251

@@ -254,13 +260,13 @@ $ fastapi run --entrypoint some.importable_module:app_name
254260
* ⬆ Bump tiangolo/latest-changes from 0.3.2 to 0.4.0. PR [#188](https://github.com/fastapi/fastapi-cli/pull/188) by [@dependabot[bot]](https://github.com/apps/dependabot).
255261
* ⬆ Bump astral-sh/setup-uv from 5 to 6. PR [#176](https://github.com/fastapi/fastapi-cli/pull/176) by [@dependabot[bot]](https://github.com/apps/dependabot).
256262

257-
## 0.0.9
263+
## 0.0.9 (2025-08-31)
258264

259265
### Fixes
260266

261267
* 🔧 Remove command script `fastapi`, let it be provided by the `fastapi` package. PR [#197](https://github.com/fastapi/fastapi-cli/pull/197) by [@tiangolo](https://github.com/tiangolo).
262268

263-
## 0.0.8
269+
## 0.0.8 (2025-07-07)
264270

265271
### Features
266272

@@ -285,7 +291,7 @@ If you want to install `fastapi` with the standard dependencies except for `fast
285291
* ⬆ Bump astral-sh/setup-uv from 4 to 5. PR [#140](https://github.com/fastapi/fastapi-cli/pull/140) by [@dependabot[bot]](https://github.com/apps/dependabot).
286292
* ⬆ Bump mypy from 1.13.0 to 1.14.0. PR [#141](https://github.com/fastapi/fastapi-cli/pull/141) by [@dependabot[bot]](https://github.com/apps/dependabot).
287293

288-
## 0.0.7
294+
## 0.0.7 (2024-12-15)
289295

290296
### Fixes
291297

@@ -298,7 +304,7 @@ If you want to install `fastapi` with the standard dependencies except for `fast
298304
*[pre-commit.ci] pre-commit autoupdate. PR [#62](https://github.com/fastapi/fastapi-cli/pull/62) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
299305
* ⬆ Bump ruff from 0.5.5 to 0.8.1. PR [#128](https://github.com/fastapi/fastapi-cli/pull/128) by [@dependabot[bot]](https://github.com/apps/dependabot).
300306

301-
## 0.0.6
307+
## 0.0.6 (2024-12-04)
302308

303309
### Features
304310

@@ -334,7 +340,7 @@ If you want to install `fastapi` with the standard dependencies except for `fast
334340
* 🔧 Update GitHub Action add-to-project. PR [#66](https://github.com/fastapi/fastapi-cli/pull/66) by [@tiangolo](https://github.com/tiangolo).
335341
* 👷 Add GitHub Action add-to-project. PR [#65](https://github.com/fastapi/fastapi-cli/pull/65) by [@tiangolo](https://github.com/tiangolo).
336342

337-
## 0.0.5
343+
## 0.0.5 (2024-08-02)
338344

339345
### Breaking Changes
340346

@@ -388,7 +394,7 @@ In a future version, `fastapi-cli` will not include Uvicorn unless it is install
388394
* 👷 Enable CI tests for Python 3.12. PR [#27](https://github.com/tiangolo/fastapi-cli/pull/27) by [@tiangolo](https://github.com/tiangolo).
389395
* 👷 Update Upload/Download artifacts GitHub Actions. PR [#26](https://github.com/tiangolo/fastapi-cli/pull/26) by [@tiangolo](https://github.com/tiangolo).
390396

391-
## 0.0.4
397+
## 0.0.4 (2024-05-19)
392398

393399
### Fixes
394400

@@ -399,7 +405,7 @@ In a future version, `fastapi-cli` will not include Uvicorn unless it is install
399405
* ⬆ Bump actions/cache from 3 to 4. PR [#5](https://github.com/tiangolo/fastapi-cli/pull/5) by [@dependabot[bot]](https://github.com/apps/dependabot).
400406
* ⬆ Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.8.14. PR [#2](https://github.com/tiangolo/fastapi-cli/pull/2) by [@dependabot[bot]](https://github.com/apps/dependabot).
401407

402-
## 0.0.3
408+
## 0.0.3 (2024-05-07)
403409

404410
### Features
405411

@@ -419,7 +425,7 @@ In a future version, `fastapi-cli` will not include Uvicorn unless it is install
419425
* ⬆ Update pytest requirement from <8.0.0,>=4.4.0 to >=4.4.0,<9.0.0. PR [#4](https://github.com/tiangolo/fastapi-cli/pull/4) by [@dependabot[bot]](https://github.com/apps/dependabot).
420426
* ⬆ Bump mypy from 1.4.1 to 1.10.0. PR [#7](https://github.com/tiangolo/fastapi-cli/pull/7) by [@dependabot[bot]](https://github.com/apps/dependabot).
421427

422-
## 0.0.2
428+
## 0.0.2 (2024-05-02)
423429

424430
First public working version. 🚀
425431

scripts/add_latest_release_date.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"""Check release-notes.md and add today's date to the latest release header if missing."""
2+
3+
import re
4+
import sys
5+
from datetime import date
6+
7+
RELEASE_NOTES_FILE = "release-notes.md"
8+
RELEASE_HEADER_PATTERN = re.compile(r"^## (\d+\.\d+\.\d+)\s*(\(.*\))?\s*$")
9+
10+
11+
def main() -> None:
12+
with open(RELEASE_NOTES_FILE) as f:
13+
lines = f.readlines()
14+
15+
for i, line in enumerate(lines):
16+
match = RELEASE_HEADER_PATTERN.match(line)
17+
if not match:
18+
continue
19+
20+
version = match.group(1)
21+
date_part = match.group(2)
22+
23+
if date_part:
24+
print(f"Latest release {version} already has a date: {date_part}")
25+
sys.exit(0)
26+
27+
today = date.today().isoformat()
28+
lines[i] = f"## {version} ({today})\n"
29+
print(f"Added date: {version} ({today})")
30+
31+
with open(RELEASE_NOTES_FILE, "w") as f:
32+
f.writelines(lines)
33+
sys.exit(0)
34+
35+
print("No release header found")
36+
sys.exit(1)
37+
38+
39+
if __name__ == "__main__":
40+
main()

0 commit comments

Comments
 (0)