Releases: modern-python/modern-di-pytest
Release list
3.0.0
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.
Packaging
- Bumped the
modern-didependency 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.
Internals
- 100% line coverage;
ruff,tyclean.
2.1.0
modern-di-pytest 2.1.0 — adopt modern-di's resolve_dependency seam
A maintenance release. No public API changes — expose and modern_di_fixture
keep the same signatures and behavior.
Internal refactors
modern_di_fixturedelegates tocontainer.resolve_dependency. The
inlineisinstance(dependency, AbstractProvider)dispatch —resolve_provider
for a Provider,resolvefor a type — is nowcontainer.resolve_dependency(dependency),
the single provider-or-type entry point modern-di 2.25 added for integrations
(add_providers/resolve_dependency, modern-python/modern-di#283).
Overrides, caching, scope checks, and "did you mean" suggestions behave
exactly as before.- The
modern-difloor is bumped to>=2.25,<3accordingly. This plugin never
reached intocontainer.providers_registry, so the siblingadd_providers
seam does not apply here.
Downstream
Upgrade modern-di to >=2.25 (or let this bump pull it in). No code changes
needed — the fixture and expose() contracts are unchanged.
2.0.3
modern-di-pytest 2.0.3 — release pipeline on PyPI Trusted Publishing
No library changes. The package is identical to 2.0.2; this release exercises the new publish path end-to-end.
CI
- Releases now authenticate to PyPI via Trusted Publishing (OIDC) instead of a long-lived
PYPI_TOKENsecret.uv publishauto-detects the GitHub Actions id-token; the release job runs under apypienvironment that scopes the trusted publisher (#20).
Downstream
No action required. Nothing about the installed package changes.
2.0.2
modern-di-pytest 2.0.2 — internal refactor, no API changes
A maintenance release. No public API changes and nothing new to import —
expose and modern_di_fixture keep the same signatures. The only
user-observable difference is on the error path (atomic collision, below).
Internal refactors
_collect_fixturesseam.expose()is split into a pure decision —
_collect_fixtures(*groups)(discovery, skip-non-Provider, cross-group
collision detection; returns aname -> providermapping) — and a thin
installer that builds fixtures andsetattrs them onto the module. The rules
are now verified through a return value instead of module side effects, so the
expose test suite collapsed from four near-identical files to three. A
successfulexpose()call behaves exactly as before.
Behavior
- Atomic collision. A duplicate fixture name across groups now raises
before any fixture is installed, so a failedexpose()leaves the target
module untouched. Previously the first group's fixtures were already
setattr-ed by the time theValueErrorfired.
Downstream
No action needed — no API change. The collision behavior differs only on a call
that was already going to raise.
Internals
- Adopted the portable
planning-convention:
planning/(changes, decisions, releases, templates) andarchitecture/,
withjust check-planningwired intolint-ci. The sole ADR moved into
planning/decisions/. Repo-only — none of it ships in the wheel. - Coverage gate stays at 100%.
2.0.1
Require modern-di>=2.16.1, which fixes a clean-install ModuleNotFoundError: No module named 'typing_extensions' (modern-di's runtime import is now guarded under TYPE_CHECKING).
Also: docs link → modern-di.modern-python.org, CI alignment, 100% coverage enforced.
🤖 Generated with Claude Code
2.0.0
What's Changed
- allow expose() to accept multiple groups by @lesnik512 in #2
Full Changelog: 0.1.0...2.0.0
0.1.1
What's Changed
- allow expose() to accept multiple groups by @lesnik512 in #2
Full Changelog: 0.1.0...0.1.1
0.1.0
What's Changed
- update README.md by @lesnik512 in #1
New Contributors
- @lesnik512 made their first contribution in #1
Full Changelog: https://github.com/modern-python/modern-di-pytest/commits/0.1.0