Exercise the ergonomic bindings in the Python client#22
Conversation
Like the Go/Kotlin/Swift clients, the Python smoke client was written against an
older moq-rs and broke against the published 0.4.0 wheel's ergonomic API:
- publish: moq.Client.publish(broadcast, producer) was removed; the client now
registers a broadcast via client.create_broadcast(path), which returns the
producer. The old call raised AttributeError, so the publisher connected but
never published (every python -> * cell failed).
- subscribe: announced_broadcast() now returns a handle whose available() (a
coroutine) resolves to the BroadcastConsumer, and subscribe_catalog() /
subscribe_media() are themselves coroutines -- the client `async for`-ed over
them without awaiting ("'async for' requires __aiter__, got coroutine"), so
every * -> python cell failed. subscribe_media's trailing max-latency arg was
dropped (it's now an optional Subscription).
Validated end-to-end against moq-relay + the 0.4.0 wheel: `python -> python`
passes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @kixelated, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Warning Review limit reached
Next review available in: 21 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Follow-up to #21. The Python smoke client — like Go/Kotlin/Swift before it — was written against an older
moq-rsand is broken against the publishedmoq-rs 0.4.0wheel, which is why everypython -> *and* -> pythoncell fails on the smoke dashboard.Root cause (introspected against the published 0.4.0 wheel)
Publish:
moq.Client.publish(broadcast, producer)was removed. The ergonomic API registers a broadcast viaclient.create_broadcast(path), which returns the producer. The old call raisedAttributeError, so the publisher connected but never published — subscribers just timed out.Subscribe: the flow changed to match the other languages' ergonomic wrappers:
announced_broadcast(path)returns anAnnouncedBroadcasthandle;await handle.available()resolves it to theBroadcastConsumer.subscribe_catalog()andsubscribe_media()are now coroutines — the clientasync for-ed over them withoutawait('async for' requires __aiter__, got coroutine).subscribe_media's trailingmax_latency_msarg is now an optionalSubscription(dropped).Validation
Ran the harness locally against
moq-relay+ the real0.4.0wheel:So both the publish and subscribe paths work end-to-end, not just at import time.
(written by Opus 4.8)