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

supabase / supabase-py / 43032356741
98%

Build:
DEFAULT BRANCH: main
Ran 11 Nov 2026 01:48PM UTC
Jobs 35
Files 134
Run time 1min
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.428% (+0.005%) from 97.423%
43032356741

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)

12726 of 13062 relevant lines covered (97.43%)

5.05 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
96.64
0.52% src/realtime/client.py
5
96.88
-0.67% src/realtime/channel.py
2
98.35
0.02% src/supabase/client.py
Jobs
ID Job ID Ran Files Coverage
1 supabase-py3.12-lowest-direct - 43032356741.1 11 Nov 2026 01:48PM UTC 20
99.42
GitHub Action Run
2 supabase-py3.14-highest - 43032356741.2 11 Nov 2026 01:48PM UTC 20
99.42
GitHub Action Run
3 utils-py3.13-highest - 43032356741.3 11 Nov 2026 01:48PM UTC 24
99.67
GitHub Action Run
4 functions-py3.15-highest - 43032356741.4 11 Nov 2026 01:48PM UTC 14
99.12
GitHub Action Run
5 utils-py3.15-highest - 43032356741.5 11 Nov 2026 01:48PM UTC 24
99.66
GitHub Action Run
6 functions-py3.14-highest - 43032356741.6 11 Nov 2026 01:48PM UTC 14
99.12
GitHub Action Run
7 functions-py3.12-lowest-direct - 43032356741.7 11 Nov 2026 01:48PM UTC 14
99.12
GitHub Action Run
8 postgrest-py3.14-highest - 43032356741.8 11 Nov 2026 01:49PM UTC 29
98.45
GitHub Action Run
9 supabase-py3.15-highest - 43032356741.9 11 Nov 2026 01:49PM UTC 20
99.42
GitHub Action Run
10 storage-py3.12-highest - 43032356741.10 11 Nov 2026 01:49PM UTC 24
95.99
GitHub Action Run
11 supabase-py3.13-highest - 43032356741.11 11 Nov 2026 01:48PM UTC 20
99.42
GitHub Action Run
12 utils-py3.12-lowest-direct - 43032356741.12 11 Nov 2026 01:48PM UTC 24
99.67
GitHub Action Run
13 postgrest-py3.13-highest - 43032356741.13 11 Nov 2026 01:49PM UTC 29
98.45
GitHub Action Run
14 postgrest-py3.12-highest - 43032356741.14 11 Nov 2026 01:49PM UTC 29
98.45
GitHub Action Run
15 storage-py3.12-lowest-direct - 43032356741.15 11 Nov 2026 01:49PM UTC 24
95.99
GitHub Action Run
16 postgrest-py3.15-highest - 43032356741.16 11 Nov 2026 01:49PM UTC 29
98.45
GitHub Action Run
17 storage-py3.14-highest - 43032356741.17 11 Nov 2026 01:49PM UTC 24
95.99
GitHub Action Run
18 auth-py3.13-highest - 43032356741.18 11 Nov 2026 01:49PM UTC 43
95.74
GitHub Action Run
19 realtime-py3.13-highest - 43032356741.19 11 Nov 2026 01:49PM UTC 10
97.5
GitHub Action Run
20 realtime-py3.12-lowest-direct - 43032356741.20 11 Nov 2026 01:49PM UTC 10
97.62
GitHub Action Run
21 auth-py3.12-lowest-direct - 43032356741.21 11 Nov 2026 01:49PM UTC 43
95.74
GitHub Action Run
22 auth-py3.15-highest - 43032356741.22 11 Nov 2026 01:49PM UTC 43
95.73
GitHub Action Run
23 storage-py3.13-highest - 43032356741.23 11 Nov 2026 01:49PM UTC 24
95.99
GitHub Action Run
24 utils-py3.12-highest - 43032356741.24 11 Nov 2026 01:48PM UTC 24
99.67
GitHub Action Run
25 postgrest-py3.12-lowest-direct - 43032356741.25 11 Nov 2026 01:49PM UTC 29
98.45
GitHub Action Run
26 functions-py3.12-highest - 43032356741.26 11 Nov 2026 01:48PM UTC 14
99.12
GitHub Action Run
27 realtime-py3.12-highest - 43032356741.27 11 Nov 2026 01:49PM UTC 10
97.5
GitHub Action Run
28 auth-py3.12-highest - 43032356741.28 11 Nov 2026 01:49PM UTC 43
95.74
GitHub Action Run
29 supabase-py3.12-highest - 43032356741.29 11 Nov 2026 01:48PM UTC 20
99.42
GitHub Action Run
30 realtime-py3.14-highest - 43032356741.30 11 Nov 2026 01:49PM UTC 10
97.25
GitHub Action Run
31 auth-py3.14-highest - 43032356741.31 11 Nov 2026 01:49PM UTC 43
95.73
GitHub Action Run
32 realtime-py3.15-highest - 43032356741.32 11 Nov 2026 01:49PM UTC 10
97.25
GitHub Action Run
33 functions-py3.13-highest - 43032356741.33 11 Nov 2026 01:48PM UTC 14
99.12
GitHub Action Run
34 utils-py3.14-highest - 43032356741.34 11 Nov 2026 01:48PM UTC 24
99.66
GitHub Action Run
35 storage-py3.15-highest - 43032356741.35 11 Nov 2026 01:50PM UTC 24
95.99
GitHub Action Run
Source Files on build 43032356741
  • Tree
  • List 134
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43032356741
  • 60ce5457 on github
  • Prev Build on main (#43031171023)
  • Next Build on main (#43038314079)
  • 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