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

supabase / supabase-py / 43032356741 / 30
99%
main: 99%

Build:
DEFAULT BRANCH: main
Ran 11 Nov 2026 01:50PM UTC
Files 10
Run time 0s
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

11 Nov 2026 01:47PM UTC coverage: 97.248% (-0.2%) from 97.403%
43032356741.30

push

github

web-flow
fix(supabase)!: share one lazily connecting realtime client per AsyncClient (#2034)

## What

`AsyncClient.realtime` returned a new `connect_once` every time it was
read. Every read opened its own WebSocket, channels made through one
read were not visible through another, and connections opened with
`await client.realtime` were never closed.

`AsyncClient.realtime` is now one `RealtimeClient` per `AsyncClient`. It
connects when the first channel subscribes, disconnects when the last
channel is removed, and is closed with the `AsyncClient`. A client that
never subscribes opens no connection, so creating one per request stays
cheap on a server.

## Changes

### `realtime`

- `RealtimeClient(url, token_callback, heartbeat_interval=...,
heartbeat_timeout=...)` no longer takes an open connection.
- New `RealtimeClient.connect()` opens the connection unless one is
already open. Concurrent calls share one connection, and a lost
connection is replaced.
- `RealtimeChannel.subscribe()` checks that no other channel owns the
topic, then calls `connect()`. While the join is pending, the channel is
in the `JOINING` state. If `unsubscribe()` runs before the join
completes, while connecting or while waiting for the reply,
`subscribe()` raises `RealtimeError` instead of joining or marking the
channel joined. `aclose()` during a pending join does the same, even
when the join reply already arrived. Cancelling a pending `subscribe()`
sends a leave for that join, so the server does not keep the
subscription.
- When the last channel is unsubscribed or removed, the client closes
the connection, the same as supabase-js. Subscribing again opens a new
one.
- `RealtimeClient.aclose()` stops the heartbeat, closes the socket and
marks the channels as closed. Readers of `channel.messages` and pending
sends fail with `ConnectionClosed` instead of hanging. Calling it
without a connection does nothing.
- A send waits for its reply on the connection it was sent on.
- `RealtimeClient.l... (continued)

742 of 763 relevant lines covered (97.25%)

0.97 hits per line

Source Files on job realtime-py3.14-highest - 43032356741.30
  • Tree
  • List 10
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 43032356741
  • 60ce5457 on github
  • Prev Job for on main (#43031171023.8)
  • Next Job for on main (#43038314079.32)
  • 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