Skip to content

fix: migrate to modern-di 3.0 and adopt ruff 0.16.0 - #54

Merged
lesnik512 merged 2 commits into
mainfrom
fix/modern-di-3.0-and-ruff-0.16
Jul 27, 2026
Merged

fix: migrate to modern-di 3.0 and adopt ruff 0.16.0#54
lesnik512 merged 2 commits into
mainfrom
fix/modern-di-3.0-and-ruff-0.16

Conversation

@lesnik512

Copy link
Copy Markdown
Member

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 to Factory(cache=...). semvertag/ioc.py:104,110 still used the old name, so importing semvertag.ioc raised TypeError and 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, which modern-di-typer handles).

ruff 0.16.0 (2026-07-23) — the lint break

  • CPY001 (missing-copyright-notice) left preview, so select = ["ALL"] now selects it — 51 hits. Ignored, matching the existing entry in modern-di.
  • PLR0917 (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.
  • Markdown formatting is new in 0.16.0 — 12 files reformatted.

Verified against ruff 0.15.22 (last week's green run): both check and format were clean, so every lint finding here is new in 0.16.0.

just lint-ci and just test green locally (473 passed, 100% coverage).

🤖 Generated with Claude Code

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.
@lesnik512

Copy link
Copy Markdown
Member Author

Pushed two follow-ups after finding that published semvertag 0.8.2 is broken outrightuvx 'semvertag>=0.5.0,<1' semvertag --help raises the same TypeError, so every user of the modern-python/semvertag action is currently failing.

  • Bounded modern-di-typer to >=3,<4. It was unbounded, which is exactly how a modern-di major reached a published semvertag without a release. Every other repo in the org already pins modern-di>=3,<4; this was the sole outlier, and the sole casualty.
  • Added planning/releases/0.8.3.md.

Note on the red check: action-smoke runs uvx 'semvertag>=0.5.0,<1', which installs from PyPI, not this branch. It cannot go green until 0.8.3 is published — merging this PR alone will not clear it.

just lint-ci and just test green locally (473 passed, 100% coverage).

@lesnik512
lesnik512 merged commit 3bedc1f into main Jul 27, 2026
6 of 7 checks passed
@lesnik512
lesnik512 deleted the fix/modern-di-3.0-and-ruff-0.16 branch July 27, 2026 11:06
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.

Scheduled dependency check failed

1 participant