πŸš€ release: bump to v2.0.9 + full changelog

swadhinbiswas committed 2 months ago
a8adb2e
1 parent 905df9e
commit a8adb2e
4 files changed
+50 -12
β–ΌCHANGELOG.md
+47-9
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
-## [2.0.8] - 2026-08-06
8
+## [2.0.9] - 2026-08-08
9
+
10
+### Added
11
+
12
+**Native async DB awaits β€” the headliner (ADR-093)**
13
+- `app.db.query_async(sql, params)` / `app.db.execute_async(...)` β€” awaitable DB operations that run on the DB's own multi-threaded tokio runtime with the GIL released for the whole execution. The asyncio loop is never blocked, so slow queries (Postgres, network DBs) no longer serialize other requests.
14
+- **Measured: 53Γ— faster than the blocking path on slow queries** (320 vs 6 RPS, 2M-row CTE benchmark).
15
+
16
+**Rust-native SSE streaming (ADR-088)**
17
+- `app.sse_native(path, count=10, interval_ms=100)` β€” events generated entirely in Rust (tokio + mpsc + stream). Zero Python, zero GIL, zero pump per event.
18
+
19
+**`@native_async` decorator (ADR-089)**
20
+- Marks async handlers for the fastest dispatch path; on free-threaded CPython (3.14t) the dispatch runs in true parallel (available_parallelism workers, ADR-087).
21
+
22
+**Callback-driven async resolution (ADR-086)**
23
+- `_DoneNotifier` fires the instant a coroutine completes β€” the async path no longer blocks a thread or polls; one less thread hop per async request.
24
+
25
+**Type-checked DX**
26
+- `py.typed` marker + fully-typed `.pyi` stubs β€” mypy-clean on user code (`app.get`, `app.db`, `native_async`, `sse_native`, `query_async` all typed). Fixed 200+ pre-existing stub errors (implicit-Optional, missing imports, duplicate defs).
27
+
28
+**Scaffold demos the differentiators**
29
+- `justapi create` now generates a CRUD project that exercises `query_async`, `@native_async`, and Rust-native SSE out of the box.
9
30
10
-### Added (2026-08-07)
11
-- **Native async DB awaits** β€” `app.db.query_async(sql, params)` / `app.db.execute_async(...)`: awaitable DB ops on the DB's own tokio runtime, GIL released, loop never blocked. **53Γ— faster than the blocking path on slow queries** (320 vs 6 RPS, ADR-093)
12
-- **Multi-worker prefork verified** β€” `justapi serve --workers N --scale`: 4 workers = 1.88Γ— throughput (99.7k RPS), auto-scale respawns (benchmarked 2026-08-07)
13
-- **Type-checked DX** β€” `py.typed` marker + mypy-clean `.pyi` stubs (routes, `app.db`, `native_async`, `sse_native` all typed)
14
-- **Scaffold demos differentiators** β€” `justapi create` generates a CRUD app exercising `query_async`, `@native_async`, and Rust-native SSE
15
-- **Rust-native SSE streaming** β€” `app.sse_native(path, count, interval_ms)`: events generated entirely in Rust, zero Python per event (ADR-088)
16
-- **`@native_async` decorator** β€” marks async handlers for the fastest dispatch; true parallel dispatch on free-threaded CPython (ADR-089)
17
-- **Callback-driven async resolution** β€” `_DoneNotifier` fires on coroutine completion; no blocking wait, no thread hop (ADR-086)
31
+**Multi-worker prefork β€” verified with data**
32
+- `justapi serve --workers N --scale`: 4 workers = **1.88Γ— throughput** (99.7k RPS vs 53k, keep-alive static), auto-scale respawns verified.
33
+
34
+**Modern README with animated SVG diagrams**
35
+- Animated hero (matrix rain + metrics), request-pipeline diagram, benchmark chart, feature matrix β€” all SMIL-only (GitHub-safe, no scripts).
36
+
37
+### CI & Release Infrastructure
38
+- **OIDC trusted publishing** β€” `wheels.yml` publishes to PyPI with zero tokens (GitHub β†’ PyPI trusted publisher, environment `pypi`). Tag push = build β†’ publish β†’ GitHub Release.
39
+- **9-platform wheel matrix green end-to-end** β€” manylinux/musllinux Γ— x86_64/aarch64, macOS arm64 + x86_64 (zig cross), Windows x64, free-threaded 3.14t. Every row builds, tests, and uploads.
40
+- **Windows build fixed** β€” Unix-only server APIs (`run_on_uds`, `serve_unix`, `bind_unix_listener`, UDS test) are now `#[cfg(unix)]`-gated; the crate compiles clean on Windows.
41
+- **CI hardening** β€” replaced PyO3/maturin-action (unsupported inputs, broken venv dance) with direct maturin + `--zig`; zig downloaded from ziglang.org (setup-zig mirrors were down); fixed GitHub bool-vs-string matrix gotchas; cross-platform wheel smoke tests.
42
+- **Repo hygiene** β€” 160 MB of wheel artifacts + debug logs purged from git history (`.git` 225 MB β†’ 61 MB).
43
+
44
+### Changed
45
+- `pyproject.toml` project URLs corrected to `swadhinbiswas/JustAPI`.
46
+
47
+### Experiments recorded (no code shipped)
48
+- ADR-090 β€” native-awaitables experiment: every bridge/driver approach measured, none beats the asyncio loop; HTTP A/B shows justapi already beats Granian on real async workloads (1ms-sleep: 3.9k vs 2.9k RPS).
49
+- ADR-091 β€” multiplexing Rust coroutine driver: 29Γ— slower per-await than asyncio (16Β΅s vs 0.56Β΅s); asyncio's stepping is the C-API floor.
50
+- ADR-092 β€” multi-loop async dispatch A/B: neutral-to-worse (GIL worker is the single dispatch point); reverted, `JUSTAPI_ASYNC_LOOPS` kept for experiments.
51
+
52
+### Fixed
53
+- **Unix-only server APIs now cfg-gated** (Windows compile fix β€” see CI section).
54
+
55
+## [2.0.8] - 2026-08-06
18
56
19
57
### Security Fixes
20
58
- **CRITICAL:** Fixed global panic hook race condition in `panic.rs` (P0-1)
21
59
β–ΌCargo.toml
+1-1
10
10
exclude = ["fuzz"]
11
11
12
12
[workspace.package]
13
-version = "2.0.8"
13
+version = "2.0.9"
14
14
edition = "2021"
15
15
license = "MIT"
16
16
17
17
β–Όcrates/justapi-py/pyproject.toml
+1-1
4
4
5
5
[project]
6
6
name = "justapi"
7
-version = "2.0.8"
7
+version = "2.0.9"
8
8
description = "JustAPI Runtime β€” a Rust-powered, FastAPI-class web framework for Python. Blazing-fast routing, native JSON validation, dependency injection, OpenAPI, WebSockets, SSE, background tasks, and an embedded DAG engine β€” all from a single pip install."
9
9
readme = "README.md"
10
10
requires-python = ">=3.12"
11
11
β–Όcrates/justapi-py/python/justapi/__init__.py
+1-1
25
25
26
26
"""
27
27
28
-__version__ = "2.0.8"
28
+__version__ = "2.0.9"
29
29
30
30
# The compiled core MUST be imported first: submodules (auth, testing, ...)
31
31
# do `from ._justapi import ...`, and on free-threaded builds a submodule
32
32