Skip to content

Releases: modern-python/modern-di-pytest

3.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Jul 18:33
efc671c

modern-di-pytest 3.0.0 — modern-di 3.x

Requires modern-di >= 3, < 4. No public API changeexpose 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-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.

Internals

  • 100% line coverage; ruff, ty clean.

2.1.0

Choose a tag to compare

@github-actions github-actions released this 07 Jul 19:39
bea6254

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_fixture delegates to container.resolve_dependency. The
    inline isinstance(dependency, AbstractProvider) dispatch — resolve_provider
    for a Provider, resolve for a type — is now container.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-di floor is bumped to >=2.25,<3 accordingly. This plugin never
    reached into container.providers_registry, so the sibling add_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

Choose a tag to compare

@github-actions github-actions released this 01 Jul 20:44
fbb5d83

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_TOKEN secret. uv publish auto-detects the GitHub Actions id-token; the release job runs under a pypi environment that scopes the trusted publisher (#20).

Downstream

No action required. Nothing about the installed package changes.

2.0.2

Choose a tag to compare

@github-actions github-actions released this 26 Jun 08:07
55c1785

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_fixtures seam. expose() is split into a pure decision —
    _collect_fixtures(*groups) (discovery, skip-non-Provider, cross-group
    collision detection; returns a name -> provider mapping) — and a thin
    installer that builds fixtures and setattrs 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
    successful expose() call behaves exactly as before.

Behavior

  • Atomic collision. A duplicate fixture name across groups now raises
    before any fixture is installed, so a failed expose() leaves the target
    module untouched. Previously the first group's fixtures were already
    setattr-ed by the time the ValueError fired.

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) and architecture/,
    with just check-planning wired into lint-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

Choose a tag to compare

@lesnik512 lesnik512 released this 13 Jun 10:12
a43cf90

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

Choose a tag to compare

@lesnik512 lesnik512 released this 25 May 06:01
4ef325f

What's Changed

  • allow expose() to accept multiple groups by @lesnik512 in #2

Full Changelog: 0.1.0...2.0.0

0.1.1

Choose a tag to compare

@lesnik512 lesnik512 released this 24 May 19:29
4ef325f

What's Changed

  • allow expose() to accept multiple groups by @lesnik512 in #2

Full Changelog: 0.1.0...0.1.1

0.1.0

Choose a tag to compare

@lesnik512 lesnik512 released this 24 May 18:53
eda942c

What's Changed

New Contributors

Full Changelog: https://github.com/modern-python/modern-di-pytest/commits/0.1.0