Skip to content

fix: annotate context managers with Generator for ty 0.0.85 - #206

Merged
lesnik512 merged 1 commit into
mainfrom
fix/ty-0-0-85
Oct 7, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/ty-0-0-85

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

Fixes the scheduled CI failure. Closes #205

ty 0.0.85 ships a typeshed that deprecates the contextmanager and asynccontextmanager overloads for functions annotated -> Iterator[T] or -> AsyncIterator[T]. ty check reported 12 such warnings, which fail lint-ci.

Changes

  • Annotate the 12 decorated functions in faststream_outbox/, tests/ and benchmarks/ as Generator[T] / AsyncGenerator[T].
  • Import them from collections.abc. typing.Generator needs all three type arguments before Python 3.13.
  • Keep Iterator / AsyncIterator imports only where other code still uses them.

Checklist

  • Lint and format pass (ruff)
  • Type check passes (ty)
  • Tests pass and new behavior is covered
  • Build succeeds (uv build) if packaging or build config changed
  • Repo metadata stays consistent across the three surfaces (GitHub description, pyproject description, profile blurb) if this touches packaging

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Benchmark gate

✅ gate passed

scenario msg/s delete/msg WALrec/msg WALB/msg fpi upd del dead_tup
consumer/w1/b10 1002 1.000 6.79 920 242 5000 5000 10000
consumer/w1/b100 994 1.000 6.84 918 243 5000 5000 10000
consumer/w2/b10 1175 1.000 6.80 959 242 5000 5000 10000
consumer/w2/b100 1390 1.000 6.72 954 243 5000 5000 10000
consumer/w4/b10 1066 1.000 6.78 961 244 5000 5000 10000
consumer/w4/b100 1608 1.000 6.87 1034 243 5000 5000 10000
consumer/w1/b100/tfbs100 5605 0.010 6.07 1116 243 5000 5000 10000
producer/w1/b100 2233 0.000 3.04 584 0 0 0 0

Gated (fails the build): delete_calls + tuple counters (upd/del/ins) + the producer's insert_calls, exact; select_calls within +2; wal_records within a 10% band. msg/s, WAL bytes and total calls are informational (timing/FPI noise).

@lesnik512
lesnik512 merged commit 4ae1c82 into main Oct 7, 2026
13 checks passed
@lesnik512
lesnik512 deleted the fix/ty-0-0-85 branch October 7, 2026 16:24
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