Repository navigation
chore: upgrade to modern-di 4 - #45
Merged
Merged
Conversation
Closing a root container keeps overrides in modern-di 4, so the test that overrides settings now scopes the override with its handle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves release-scope from modern-di 3 to 4 by bumping
modern-di-typerto>=4,<5. The lock resolves modern-di 4.3.0 and modern-di-typer 4.0.3.Changes
pyproject.toml:modern-di-typer>=4,<5.pyproject.toml: thetyperfloor goes from 0.13 to 0.26, which modern-di-typer 4 requires. The floors job failed to resolve without it.tests/test_units.py:test_container_builds_a_real_client_from_settingsnow uses the override handle as a context manager. In modern-di 4, closing a root container keeps its overrides (migration guide). Without the handle, every later test resolved the overridden settings and calledhttps://gitlab.test.The app code needs no change:
ioc.pyusesFactory(cache=True)andCacheSettings(finalizer=...), both still valid in 4.x.Testing
The floors job (lowest direct versions) passes locally on 3.11 and 3.14.
just test-ci: 140 passed, 100% coverage.just test-smoke: 16 passed.just lintis clean.