From 5b71474b5d365f14ef087b7a9b88b112331847a3 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Mon, 20 Jul 2026 21:25:59 +0300 Subject: [PATCH 1/2] chore(deps): require modern-di 3.x No test edits needed; suite is green under modern-di 3.0.0 unchanged. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ec59a31..786c908 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ "Typing :: Typed", "Topic :: Software Development :: Libraries", ] -dependencies = ["taskiq>=0.11,<0.13", "modern-di>=2.28,<3"] +dependencies = ["taskiq>=0.11,<0.13", "modern-di>=3,<4"] version = "0" [project.urls] From 50433ed75f2d5b13ea7a04ad1ed15eefcb19adf5 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Mon, 20 Jul 2026 21:26:02 +0300 Subject: [PATCH 2/2] docs(release): add 3.0.0 notes (require modern-di 3.x) --- planning/releases/3.0.0.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 planning/releases/3.0.0.md diff --git a/planning/releases/3.0.0.md b/planning/releases/3.0.0.md new file mode 100644 index 0000000..1b364f5 --- /dev/null +++ b/planning/releases/3.0.0.md @@ -0,0 +1,26 @@ +# modern-di-taskiq 3.0.0 — modern-di 3.x + +Requires **modern-di >= 3, < 4**. **No public API change** — `FromDI`, +`fetch_di_container`, `setup_di`, and `taskiq_message_provider` keep their +signatures and behavior. The adapter already drove the explicit open/close +container lifecycle (`async with` around the per-task child container, and +`container.open()` / `await container.close_async()` on the root container +via the `WORKER_STARTUP` / `WORKER_SHUTDOWN` event handlers), so no adapter +code changed for +[modern-di 3.0's mandatory-open lifecycle](https://modern-di.modern-python.org/migration/to-3.x/). + +## Packaging + +- **Bumped the `modern-di` dependency to `>=3,<4`.** Requires modern-di 3.x; + drops support for modern-di 2.x. + +## Downstream + +No action needed beyond raising your own `modern-di` floor to `>=3`. If your +code builds child containers, open them with `with` / `async with` (or +`open()`) before resolving — see the +[modern-di 3.x migration guide](https://modern-di.modern-python.org/migration/to-3.x/). + +## Internals + +- 100% line coverage; `ruff`, `ty` clean.