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

supabase / supabase-py / 41641867822
98%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 01:10PM UTC
Jobs 30
Files 175
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

03 Nov 2026 01:09PM UTC coverage: 96.969% (+0.002%) from 96.967%
41641867822

push

github

web-flow
fix(supabase): reject non-string url and key in create_client (#1926)

## What

`Client.__init__` (async source and generated sync copy) now checks that
`supabase_url` and `supabase_key` are strings before the existing
checks, and raises `SupabaseException` with a clear message
(`supabase_url must be a string, got int`) otherwise.

Before:
- `create_client(139, "key")` raised a raw `TypeError` from `re.match`.
- `create_client("https://x.supabase.co", 139)` succeeded, and the
integer key only failed later, at request time, from inside the headers.

`None` and empty values still raise the existing `... is required`
messages, and invalid URLs still raise `Invalid URL`. Both
`create_client` and `create_async_client` go through `__init__`, so they
are covered.

## Tests

`test_incorrect_values_dont_instantiate_client` could never fail: it
swallowed the expected exception and was also marked as a non-strict
`xfail`, producing 86 unexpected passes per run. It is replaced by a
parametrized test over invalid URLs (`""`, `None`, `"not-a-url"`,
`"ftp://..."`, `"https://"`, `{}`, `[]`, `139`) and invalid keys (`""`,
`None`, `{}`, `[]`, `139`) that asserts `SupabaseException` with
`pytest.raises` and no `xfail`. A new test checks that a valid URL and
key still create a client. The `139` cases fail without the fix.

`pytest tests`: 81 passed, 0 xpassed. `mypy`: clean.

Fixes SDK-2674

## Self-review changes

A `/code-review` pass led to these changes:
- Validation now runs one field at a time through a `_validate_str_arg`
helper (type check, then required check), so with two bad arguments the
error is about the first one, for example `create_client(None, 139)`
reports `supabase_url is required`.
- The parametrized test asserts the exact error message, so the `{}` and
`[]` cases now prove they hit the new type check rather than the old
falsy check. Cases with both arguments invalid were added.

Not changed, because they are out of scope for this ticket: rejecting
w... (continued)

13371 of 13789 relevant lines covered (96.97%)

5.01 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
95.56
0.1% src/supabase/_async/client.py
6
95.38
0.11% src/supabase/_sync/client.py
Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest-3.11-functions - 41641867822.1 03 Nov 2026 01:10PM UTC 18
97.98
GitHub Action Run
2 run-ubuntu-latest-3.13-supabase - 41641867822.2 03 Nov 2026 01:10PM UTC 22
96.98
GitHub Action Run
3 run-ubuntu-latest-3.14-postgrest - 41641867822.3 03 Nov 2026 01:11PM UTC 39
97.82
GitHub Action Run
4 run-ubuntu-latest-3.12-postgrest - 41641867822.4 03 Nov 2026 01:11PM UTC 39
97.83
GitHub Action Run
5 run-ubuntu-latest-3.15-auth - 41641867822.5 03 Nov 2026 01:11PM UTC 61
96.36
GitHub Action Run
6 run-ubuntu-latest-3.14-auth - 41641867822.6 03 Nov 2026 01:10PM UTC 61
96.36
GitHub Action Run
7 run-ubuntu-latest-3.14-functions - 41641867822.7 03 Nov 2026 01:10PM UTC 18
97.98
GitHub Action Run
8 run-ubuntu-latest-3.11-realtime - 41641867822.8 03 Nov 2026 01:11PM UTC 17
94.3
GitHub Action Run
9 run-ubuntu-latest-3.13-functions - 41641867822.9 03 Nov 2026 01:10PM UTC 18
97.98
GitHub Action Run
10 run-ubuntu-latest-3.13-realtime - 41641867822.10 03 Nov 2026 01:11PM UTC 17
94.21
GitHub Action Run
11 run-ubuntu-latest-3.15-realtime - 41641867822.11 03 Nov 2026 01:11PM UTC 17
93.84
GitHub Action Run
12 run-ubuntu-latest-3.11-supabase - 41641867822.12 03 Nov 2026 01:10PM UTC 22
96.98
GitHub Action Run
13 run-ubuntu-latest-3.13-storage - 41641867822.13 03 Nov 2026 01:11PM UTC 42
96.09
GitHub Action Run
14 run-ubuntu-latest-3.11-auth - 41641867822.14 03 Nov 2026 01:10PM UTC 61
96.37
GitHub Action Run
15 run-ubuntu-latest-3.13-auth - 41641867822.15 03 Nov 2026 01:10PM UTC 61
96.37
GitHub Action Run
16 run-ubuntu-latest-3.15-postgrest - 41641867822.16 03 Nov 2026 01:11PM UTC 39
97.82
GitHub Action Run
17 run-ubuntu-latest-3.15-functions - 41641867822.17 03 Nov 2026 01:10PM UTC 18
97.98
GitHub Action Run
18 run-ubuntu-latest-3.12-functions - 41641867822.18 03 Nov 2026 01:10PM UTC 18
97.98
GitHub Action Run
19 run-ubuntu-latest-3.11-postgrest - 41641867822.19 03 Nov 2026 01:11PM UTC 39
97.83
GitHub Action Run
20 run-ubuntu-latest-3.14-realtime - 41641867822.20 03 Nov 2026 01:11PM UTC 17
93.84
GitHub Action Run
21 run-ubuntu-latest-3.13-postgrest - 41641867822.21 03 Nov 2026 01:11PM UTC 39
97.83
GitHub Action Run
22 run-ubuntu-latest-3.14-storage - 41641867822.22 03 Nov 2026 01:11PM UTC 42
96.08
GitHub Action Run
23 run-ubuntu-latest-3.12-realtime - 41641867822.23 03 Nov 2026 01:11PM UTC 17
94.21
GitHub Action Run
24 run-ubuntu-latest-3.15-storage - 41641867822.24 03 Nov 2026 01:13PM UTC 42
96.08
GitHub Action Run
25 run-ubuntu-latest-3.11-storage - 41641867822.25 03 Nov 2026 01:11PM UTC 42
96.09
GitHub Action Run
26 run-ubuntu-latest-3.14-supabase - 41641867822.26 03 Nov 2026 01:10PM UTC 22
96.97
GitHub Action Run
27 run-ubuntu-latest-3.15-supabase - 41641867822.27 03 Nov 2026 01:10PM UTC 22
96.97
GitHub Action Run
28 run-ubuntu-latest-3.12-storage - 41641867822.28 03 Nov 2026 01:11PM UTC 42
96.09
GitHub Action Run
29 run-ubuntu-latest-3.12-auth - 41641867822.29 03 Nov 2026 01:10PM UTC 61
96.37
GitHub Action Run
30 run-ubuntu-latest-3.12-supabase - 41641867822.30 03 Nov 2026 01:10PM UTC 22
96.98
GitHub Action Run
Source Files on build 41641867822
  • Tree
  • List 175
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41641867822
  • 030cbc9c on github
  • Prev Build on main (#41641760894)
  • Next Build on main (#41641937400)
  • 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