• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-py / 41667595084 / 26
98%
main: 98%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 03:51PM UTC
Files 18
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Nov 2026 03:47PM UTC coverage: 97.977%. Remained the same
41667595084.26

push

github

web-flow
fix(realtime): wait for the join reply in subscribe (#1940)

SDK-217

Refs #1209

## Why

`AsyncRealtimeChannel.subscribe()` sent the join and returned straight
away. When `await channel.subscribe(callback)` returned, the callback
had usually not been called yet, so callers had to build their own
`asyncio.Event` plus `wait_for` to find out whether the channel was
joined.

## What changed

- `subscribe()` now waits until the join settles before it returns: an
`ok` reply (`SUBSCRIBED`), an `error` reply or postgres bindings
mismatch (`CHANNEL_ERROR`), the existing join timeout (`TIMED_OUT`), a
channel or socket error while joining (`CHANNEL_ERROR`), or the server
closing the channel (`CLOSED`).
- Leaving the channel (`unsubscribe()`, `client.remove_channel()`,
`client.remove_all_channels()`, including when that call is cancelled
partway) or calling `client.close()` while the join is pending also ends
the wait right away. In those cases `subscribe()` returns before the
`CLOSED` or `TIMED_OUT` callback, which arrives later as it did before.
- Every subscribe state notification goes through one method,
`_notify_subscribe_state`, which calls the user callback and then
releases a pending `subscribe()`. The callback is still called exactly
once per state change, and the waiter is released even if the callback
raises.
- No new timer. The wait is bounded by the join push timeout that
already exists (`AsyncRealtimeClient(timeout=...)`, 10 seconds by
default).
- Cancelling the task that awaits `subscribe()` only stops the wait. The
join keeps going in the background and the callback still fires, the
same as before this change. A `join()` waiting on the same join is not
cancelled with it.
- Reconnect and rejoin are unchanged. Only the first join started by
`subscribe()` is awaited; later rejoins (rejoin timer, reconnect,
presence resubscribe) keep reporting through the callback only.
- The deprecated `join()` now waits for a `subscribe()` that is still in
flight i... (continued)

1017 of 1038 relevant lines covered (97.98%)

0.98 hits per line

Source Files on job run-ubuntu-latest-3.14-functions - 41667595084.26
  • Tree
  • List 18
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 41667595084
  • c725015c on github
  • Prev Job for on main (#41667435053.21)
  • Next Job for on main (#41673893468.20)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc