fix: migrate to modern-di 3.0 and adopt ruff 0.16.0 - #54
Merged
Conversation
modern-di 3.0.0 renamed the Factory cache keyword from `cache_settings` to `cache`. semvertag still passed the old name, so importing `semvertag.ioc` raised TypeError and the whole suite failed to collect. ruff 0.16.0 stabilized CPY001 and PLR0917 out of preview, so `select = ["ALL"]` now picks both up. Ignore CPY001 repo-wide, matching modern-di; silence PLR0917 on the typer callback whose parameters are CLI options. 0.16.0 also formats Python code blocks inside Markdown; reformat the 12 affected files.
The dependency was unbounded, which is how modern-di 3.0 landed in a published semvertag without a release and broke every entry point. Bound it to >=3,<4 so a future major fails resolution instead of failing at runtime.
Member
Author
|
Pushed two follow-ups after finding that published semvertag 0.8.2 is broken outright —
Note on the red check:
|
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.
Fixes #53.
Two unrelated upstream releases landed between last Monday's green run and today's failure.
modern-di 3.0.0 (2026-07-20) — the test-suite break
Factory(cache_settings=...)was renamed toFactory(cache=...).semvertag/ioc.py:104,110still used the old name, so importingsemvertag.iocraisedTypeErrorand pytest died at collection (316 items / 2 errors) — the entire suite, not just the DI tests.The rename is the whole fix. After it: 473 passed, 100% coverage, so there is no further 3.0 exposure (notably not the mandatory-
open()lifecycle change, whichmodern-di-typerhandles).ruff 0.16.0 (2026-07-23) — the lint break
missing-copyright-notice) left preview, soselect = ["ALL"]now selects it — 51 hits. Ignored, matching the existing entry inmodern-di.too-many-positional-arguments) also left preview — 1 hit on_main_callback, which already carried# noqa: PLR0913. Added to the same directive: those 10 parameters are typer CLI options, so the count is structural.Verified against ruff 0.15.22 (last week's green run): both
checkandformatwere clean, so every lint finding here is new in 0.16.0.just lint-ciandjust testgreen locally (473 passed, 100% coverage).🤖 Generated with Claude Code