From 0ec41da989d1e3a1130c9ff4ebd89b96ae6c23aa Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Mon, 13 Jul 2026 23:31:35 +0300 Subject: [PATCH] docs(release): add 2.1.0 release notes --- planning/releases/2.1.0.md | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 planning/releases/2.1.0.md diff --git a/planning/releases/2.1.0.md b/planning/releases/2.1.0.md new file mode 100644 index 0000000..8e37629 --- /dev/null +++ b/planning/releases/2.1.0.md @@ -0,0 +1,62 @@ +# modern-di-arq 2.1.0 — adopt the modern-di integration kit + +Maintenance release. **No public API change** — `FromDI`, `inject`, +`setup_di`, and `fetch_di_container` keep their signatures and behavior. +Swaps this package's hand-rolled `FromDI` marker and its parse/resolve pair +for the shared primitives in +[`modern_di.integrations`](https://github.com/modern-python/modern-di/blob/main/architecture/integration-kit.md), +shipped in +[modern-di 2.28.0](https://github.com/modern-python/modern-di/releases/tag/2.28.0). +Tenth of 13 planned adapter conversions across the `modern-di` ecosystem +(after +[`modern-di-starlette` 2.2.0](https://github.com/modern-python/modern-di-starlette/releases/tag/2.2.0), +[`modern-di-fastapi` 2.10.0](https://github.com/modern-python/modern-di-fastapi/releases/tag/2.10.0), +[`modern-di-litestar` 2.13.0](https://github.com/modern-python/modern-di-litestar/releases/tag/2.13.0), +[`modern-di-aiohttp` 2.2.0](https://github.com/modern-python/modern-di-aiohttp/releases/tag/2.2.0), +[`modern-di-flask` 2.1.0](https://github.com/modern-python/modern-di-flask/releases/tag/2.1.0), +[`modern-di-faststream` 2.10.0](https://github.com/modern-python/modern-di-faststream/releases/tag/2.10.0), +[`modern-di-typer` 2.3.0](https://github.com/modern-python/modern-di-typer/releases/tag/2.3.0), +[`modern-di-grpc` 2.1.0](https://github.com/modern-python/modern-di-grpc/releases/tag/2.1.0), +and +[`modern-di-celery` 2.1.0](https://github.com/modern-python/modern-di-celery/releases/tag/2.1.0)). +Like typer/celery, arq has no connection/context object — its per-job `ctx` +is a bare `dict` — so this is a **Layer-2-only** conversion. Unlike celery, +arq has no double-wrap guard either, so `is_injected`/`mark_injected` don't +apply. + +## Internal refactors + +- **`_FromDI` is gone; `FromDI = integrations.from_di`.** +- **`inject` now calls `integrations.parse_markers` directly** — + `_parse_inject_params` is deleted entirely, its body having been an exact + duplicate. +- **Resolution goes through `integrations.resolve_markers(child, di_params)`** + in place of the manual dict comprehension. +- The task-specific mechanism — the `*args`/`**kwargs` decoration-time + `TypeError` guard, by-name signature binding, `functools.wraps`, and the + `async def wrapper` shape — is preserved exactly unchanged; none of it is + part of the kit. +- `setup_di` and all four lifecycle-hook wrappers + (`on_startup`/`on_shutdown`/`on_job_start`/`on_job_end`) are untouched, as + is the existing `_WRAPPED_MARKER` double-`setup_di` guard (a different + concern from the kit's injection double-wrap guard). +- Dead imports removed: `dataclasses`, `providers`, `T_co`. +- `architecture/dependency-injection.md`'s "Resolution" section promoted to + describe the new internals. + +## Packaging + +- Bumps the `modern-di` floor to `>=2.28,<3`. + +## Downstream + +No action needed — the public API (`FromDI`, `inject`, `setup_di`, +`fetch_di_container`) is unchanged. Upgrading only requires +`modern-di>=2.28.0`. + +## Internals + +- 100% line coverage; `ruff`, `ty` clean across Python 3.10–3.14. Tests run + against a live Redis. +- Built via `subagent-driven-development`: 4 planned tasks, each with an + independent spec+quality review; a whole-branch review before merge.