Fix dependency update checks for ty and AnyIO deprecations - #406
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #406 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 71 71
Lines 6243 6243
Branches 377 377
=========================================
Hits 6243 6243 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
The scheduled dependency-update run failed before pytest because ty 0.0.78 reports
asyncio.iscoroutinefunctionas deprecated for Python 3.11 and 3.12. After resolving that, upgraded dependencies exposed a second collection failure: Starlette importsanyio.abc.BlockingPortal, an alias deprecated by AnyIO 4.15.Preserve FastAPI's coroutine detection:
asyncio.iscoroutinefunctionbelow Python 3.13 andinspect.iscoroutinefunctionon Python 3.13 and newer. The asyncio implementation recognizes the legacy_is_coroutinemarker. Cadwyn must agree with FastAPI about whether to await a dependency, so replacing that implementation solely to silence a deprecation diagnostic would change compatibility. The code comment records this reasoning, and local suppressions handle the checker diagnostics.Add a pytest warning filter scoped to Starlette's use of the deprecated AnyIO alias. Update the locked ty and AnyIO versions so regular PR CI checks both failures, and record the typing compatibility fix in the changelog.
Reported run: https://github.com/zmievsa/cadwyn/actions/runs/33707914502
FastAPI's version split: https://github.com/fastapi/fastapi/blob/0.141.1/fastapi/dependencies/models.py#L11-L14
Validation:
uv lock --upgrade.uv run --locked tox run-parallel --parallel-no-spinner -e py3.10,py3.11,py3.12,py3.13,py3.14,lint -- -qpasses, including all lint hooks.The fix preserves the runtime behavior on main, so the existing regression tests remain unchanged.