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

supabase / supabase-py / 42219341804
98%

Build:
DEFAULT BRANCH: main
Ran 06 Nov 2026 12:39PM UTC
Jobs 35
Files 121
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

06 Nov 2026 12:39PM UTC coverage: 95.631% (+0.04%) from 95.587%
42219341804

push

github

web-flow
fix(supabase): stop sending new-format api keys as bearer to edge functions (#2005)

## What

New-format API keys (`sb_publishable_…`, `sb_secret_…` and any other
`sb_` key) are not JWTs and should never be sent as `Authorization:
Bearer`. Before this change, a client created with a new-format key and
no session sent the key both in `apikey` and in `Authorization` to Edge
Functions.

This ports
[supabase-js#2511](https://github.com/supabase/supabase-js/pull/2511)
(commit `558c1f5`).

## Changes

- `SupabaseClient` builds the functions sub-client from its own header
set. When the `Authorization` header is only the fallback `Bearer
<new-format key>`, it is left out, so `functions.invoke()` sends the key
in `apikey` only.
- On auth events, functions gets the session JWT on sign-in. On
sign-out, the `Authorization` header is removed again instead of being
set back to the key.
- Legacy JWT keys, session tokens and custom `Authorization` headers
behave as before. PostgREST, Storage, Auth and Realtime are unchanged.
- Every key that starts with `sb_` is treated as a new-format key, so a
future key type is never sent as a bearer either. Unlike supabase-js,
unrecognized `sb_` keys are not rejected at construction, since they
still work as `apikey` for the other services.
- Adds `Headers.remove` to `supabase_utils`.
- The functions README now shows the publishable key in the `apikey`
header.

## Tests

Unit tests for the sync and async clients send real `invoke` requests
through an `httpx.MockTransport` and cover:

| Case | `Authorization` sent to functions |
| -------------------------------------- |
--------------------------------- |
| New-format key, no session | none |
| Legacy JWT key, no session | `Bearer <key>` |
| New-format key, signed in | `Bearer <session jwt>` |
| New-format key, after signing out | none |
| New-format key, custom `Authorization` | the custom header |

Linear: SDK-1325

9785 of 10232 relevant lines covered (95.63%)

4.88 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
97.62
0.17% src/supabase/client.py
Jobs
ID Job ID Ran Files Coverage
1 postgrest-py3.14-highest - 42219341804.1 06 Nov 2026 12:41PM UTC 25
97.88
GitHub Action Run
2 functions-py3.15-highest - 42219341804.2 06 Nov 2026 12:39PM UTC 15
97.61
GitHub Action Run
3 supabase-py3.12-lowest-direct - 42219341804.3 06 Nov 2026 12:39PM UTC 20
99.53
GitHub Action Run
4 supabase-py3.13-highest - 42219341804.4 06 Nov 2026 12:39PM UTC 20
99.53
GitHub Action Run
5 functions-py3.14-highest - 42219341804.5 06 Nov 2026 12:39PM UTC 15
97.61
GitHub Action Run
6 utils-py3.12-lowest-direct - 42219341804.6 06 Nov 2026 12:39PM UTC 19
99.51
GitHub Action Run
7 supabase-py3.12-highest - 42219341804.7 06 Nov 2026 12:39PM UTC 20
99.53
GitHub Action Run
8 utils-py3.12-highest - 42219341804.8 06 Nov 2026 12:39PM UTC 19
99.51
GitHub Action Run
9 realtime-py3.13-highest - 42219341804.9 06 Nov 2026 12:41PM UTC 9
96.05
GitHub Action Run
10 storage-py3.12-lowest-direct - 42219341804.10 06 Nov 2026 12:41PM UTC 22
93.82
GitHub Action Run
11 realtime-py3.12-highest - 42219341804.11 06 Nov 2026 12:41PM UTC 9
96.05
GitHub Action Run
12 auth-py3.14-highest - 42219341804.12 06 Nov 2026 12:40PM UTC 36
91.5
GitHub Action Run
13 utils-py3.14-highest - 42219341804.13 06 Nov 2026 12:39PM UTC 19
99.5
GitHub Action Run
14 utils-py3.15-highest - 42219341804.14 06 Nov 2026 12:39PM UTC 19
99.5
GitHub Action Run
15 auth-py3.12-lowest-direct - 42219341804.15 06 Nov 2026 12:40PM UTC 36
91.53
GitHub Action Run
16 functions-py3.12-lowest-direct - 42219341804.16 06 Nov 2026 12:39PM UTC 15
97.61
GitHub Action Run
17 auth-py3.12-highest - 42219341804.17 06 Nov 2026 12:40PM UTC 36
91.53
GitHub Action Run
18 functions-py3.13-highest - 42219341804.18 06 Nov 2026 12:39PM UTC 15
97.61
GitHub Action Run
19 functions-py3.12-highest - 42219341804.19 06 Nov 2026 12:39PM UTC 15
97.61
GitHub Action Run
20 realtime-py3.14-highest - 42219341804.20 06 Nov 2026 12:41PM UTC 9
95.56
GitHub Action Run
21 postgrest-py3.12-lowest-direct - 42219341804.21 06 Nov 2026 12:41PM UTC 25
97.89
GitHub Action Run
22 realtime-py3.12-lowest-direct - 42219341804.22 06 Nov 2026 12:41PM UTC 9
95.91
GitHub Action Run
23 storage-py3.15-highest - 42219341804.23 06 Nov 2026 12:42PM UTC 22
93.8
GitHub Action Run
24 auth-py3.15-highest - 42219341804.24 06 Nov 2026 12:40PM UTC 36
91.5
GitHub Action Run
25 supabase-py3.15-highest - 42219341804.25 06 Nov 2026 12:41PM UTC 20
99.53
GitHub Action Run
26 postgrest-py3.12-highest - 42219341804.26 06 Nov 2026 12:41PM UTC 25
97.89
GitHub Action Run
27 supabase-py3.14-highest - 42219341804.27 06 Nov 2026 12:39PM UTC 20
99.53
GitHub Action Run
28 utils-py3.13-highest - 42219341804.28 06 Nov 2026 12:39PM UTC 19
99.51
GitHub Action Run
29 realtime-py3.15-highest - 42219341804.29 06 Nov 2026 12:41PM UTC 9
95.56
GitHub Action Run
30 auth-py3.13-highest - 42219341804.30 06 Nov 2026 12:40PM UTC 36
91.53
GitHub Action Run
31 storage-py3.14-highest - 42219341804.31 06 Nov 2026 12:41PM UTC 22
93.8
GitHub Action Run
32 postgrest-py3.13-highest - 42219341804.32 06 Nov 2026 12:41PM UTC 25
97.89
GitHub Action Run
33 storage-py3.12-highest - 42219341804.33 06 Nov 2026 12:41PM UTC 22
93.82
GitHub Action Run
34 postgrest-py3.15-highest - 42219341804.34 06 Nov 2026 12:41PM UTC 25
97.88
GitHub Action Run
35 storage-py3.13-highest - 42219341804.35 06 Nov 2026 12:41PM UTC 22
93.82
GitHub Action Run
Source Files on build 42219341804
  • Tree
  • List 121
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42219341804
  • 213ae34a on github
  • Prev Build on main (#42211691419)
  • Next Build on main (#42219365473)
  • 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