Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions planning/releases/2.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# modern-di-typer 2.3.0 — adopt the modern-di integration kit

Maintenance release. **No public API change** — `FromDI`, `inject`,
`action_scope`, `fetch_di_container`, and `setup_di` 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).
Seventh 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),
and
[`modern-di-faststream` 2.10.0](https://github.com/modern-python/modern-di-faststream/releases/tag/2.10.0)).
First conversion where the kit's Layer 1 (`bind`/`classify_connection`) has
nothing to attach to at all — a CLI invocation has no connection object
analogous to a web `Request` or broker `StreamMessage`. This is a
**Layer-2-only** conversion.

## Internal refactors

- **`_FromDI` is gone; `FromDI = integrations.from_di`.**
- **`_parse_inject_params` keeps its hand-rolled `typer.Context`-detection
scan** (the kit has no equivalent for this typer-specific concern) **but
delegates marker-finding to `integrations.parse_markers`.**
- **`_resolve_di_params` is gone; `inject`'s wrapper calls
`integrations.resolve_markers` directly.**
- Dead imports removed: `dataclasses`, `providers` (this repo has no
module-level connection provider, unlike every prior web/broker
conversion), and the `T_co` TypeVar.
- `architecture/injection.md` promoted; `architecture/scopes.md`
deliberately left untouched (it describes the App/Command/Action
container hierarchy behaviorally and names none of the changed
internals).

## Packaging

- Bumps the `modern-di` floor to `>=2.28.0,<3`.

## Downstream

No action needed — the public API (`FromDI`, `inject`, `action_scope`,
`fetch_di_container`, `setup_di`) is unchanged. Upgrading only requires
`modern-di>=2.28.0`.

## Internals

- 100% line coverage; `ruff`, `ty` clean across Python 3.10–3.14.
- Built via `subagent-driven-development`: 4 planned tasks, each with an
independent spec+quality review; a whole-branch review before merge.