Skip to content

Fix replacement of named provider injections - #982

Open
be-student wants to merge 1 commit into
ets-labs:developfrom
be-student:codex/974-async-kwargs
Open

Fix replacement of named provider injections#982
be-student wants to merge 1 commit into
ets-labs:developfrom
be-student:codex/974-async-kwargs

Conversation

@be-student

Copy link
Copy Markdown

Fixes #974.

add_kwargs() retained duplicate named injections. An older async dependency could finish after its replacement and overwrite the result; with extra call-time kwargs, the older entry could win immediately. Merge named injections when registering them so the latest value wins and superseded providers are never invoked. Apply the same rule to attribute injection and Dict mapping/keyword inputs.

Validation: 25 regression cases fail before the fix; all 35 focused cases pass afterward, including async replacements and call-time overrides. Full suite: 1,412 passed, 2 skipped before adding the final 10 focused controls. Cython limited-API build, flake8, pydocstyle, and strict mypy pass on Python 3.12/macOS. Other Python/platform combinations are left to CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant