Skip to content

Exercise the ergonomic bindings in the Python client#22

Merged
kixelated merged 1 commit into
mainfrom
claude/python-ergonomic-bindings
Jul 24, 2026
Merged

Exercise the ergonomic bindings in the Python client#22
kixelated merged 1 commit into
mainfrom
claude/python-ergonomic-bindings

Conversation

@kixelated

Copy link
Copy Markdown
Contributor

Follow-up to #21. The Python smoke client — like Go/Kotlin/Swift before it — was written against an older moq-rs and is broken against the published moq-rs 0.4.0 wheel, which is why every python -> * and * -> python cell 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 via client.create_broadcast(path), which returns the producer. The old call raised AttributeError, 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 an AnnouncedBroadcast handle; await handle.available() resolves it to the BroadcastConsumer.
  • subscribe_catalog() and subscribe_media() are now coroutines — the client async for-ed over them without await ('async for' requires __aiter__, got coroutine).
  • subscribe_media's trailing max_latency_ms arg is now an optional Subscription (dropped).

Validation

Ran the harness locally against moq-relay + the real 0.4.0 wheel:

=== publisher: python  broadcast: smoke-python-…hang ===
  PASS  python -> python
smoke: all checks passed

So both the publish and subscribe paths work end-to-end, not just at import time.

(written by Opus 4.8)

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>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @kixelated, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kixelated, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4359979c-e20a-4ebc-a775-80fadf4500a0

📥 Commits

Reviewing files that changed from the base of the PR and between 638a257 and 1c07a45.

📒 Files selected for processing (1)
  • clients/python/smoke.py
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/python-ergonomic-bindings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kixelated
kixelated merged commit 3eaff77 into main Jul 24, 2026
1 of 5 checks passed
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.

1 participant