From 2c4790d223cc9640957d3faaa9e0e98658ae3f32 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Mon, 20 Jul 2026 21:25:48 +0300 Subject: [PATCH 1/2] chore(deps): require modern-di 3.x No test edits needed: the existing suite already opens child containers with `with` and never used the removed cache_settings= argument. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cf57312..d134174 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Testing", ] -dependencies = ["modern-di>=2.25,<3", "pytest>=7"] +dependencies = ["modern-di>=3,<4", "pytest>=7"] version = "0" [project.urls] From 0278d37a45aba152faf88998b31ddb98e56e7044 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Mon, 20 Jul 2026 21:25:52 +0300 Subject: [PATCH 2/2] docs(release): add 3.0.0 notes (require modern-di 3.x) --- planning/releases/3.0.0.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 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..1be4f0e --- /dev/null +++ b/planning/releases/3.0.0.md @@ -0,0 +1,24 @@ +# modern-di-pytest 3.0.0 — modern-di 3.x + +Requires **modern-di >= 3, < 4**. **No public API change** — `expose` and +`modern_di_fixture` keep their signatures and behavior. This is a pytest +fixture integration, not a framework adapter — there is no per-connection +container lifecycle to drive. The `tests/conftest.py` fixtures already opened +their containers with `with`, so the fixture layer is unchanged 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.