Skip to content

fix: silence ty 0.0.87 override checks on narrowed faststream attributes - #210

Merged
lesnik512 merged 1 commit into
mainfrom
fix/ty-0.0.87
Oct 14, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/ty-0.0.87

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Fixes #209.

The scheduled dependency check picked up ty 0.0.87, which turns on invalid-mutable-override by default and now checks overrides of attributes declared in __init__. It reports six errors on main.

Each one is a subclass narrowing an attribute it inherits from faststream: _outer_config: OutboxBrokerConfig four times, broker: _OutboxBroker on the FastAPI router, and _subscribers: WeakSet[OutboxSubscriber] on the broker. faststream's bases aren't generic over these types, so we can't express the narrowing soundly. Each line gets a # ty: ignore[...] for its rule. Nothing changes at runtime.

Locally with ty 0.0.87, just lint-ci is clean and the full suite passes against Postgres 17 (626 passed, 100% coverage).

@github-actions

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 1369 1.000 6.80 912 242 5000 5000 10000
consumer/w1/b100 1395 1.000 6.86 917 243 5000 5000 10000
consumer/w2/b10 1740 1.000 6.78 954 242 5000 5000 10000
consumer/w2/b100 2164 1.000 6.73 955 243 5000 5000 10000
consumer/w4/b10 1637 1.000 6.68 921 242 5000 5000 10000
consumer/w4/b100 2517 1.000 6.86 1035 243 5000 5000 10000
consumer/w1/b100/tfbs100 9708 0.010 6.07 1116 243 5000 5000 10000
producer/w1/b100 4444 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 970a951 into main Oct 14, 2026
13 checks passed
@lesnik512
lesnik512 deleted the fix/ty-0.0.87 branch October 14, 2026 14:11
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