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

supabase / supabase-py / 42026860620
98%

Build:
DEFAULT BRANCH: main
Ran 05 Nov 2026 12:24PM UTC
Jobs 42
Files 124
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

05 Nov 2026 12:24PM UTC coverage: 95.481% (+0.02%) from 95.462%
42026860620

push

github

web-flow
fix(storage)!: take upsert as a bool in upload and create_signed_upload_url (#1997)

## What

The storage upload methods took `upsert` as a string and copied it
straight into the `x-upsert` header. This PR types it as a `bool`, in
line with storage-js (`upsert?: boolean`).

- `upload()`: `upsert: bool = False`, sent as `x-upsert: true` or
`x-upsert: false`.
- `create_signed_upload_url()`: `upsert: bool | None = None`. The header
is only sent when the argument is set, so the server default still
applies when it is omitted. Passing `upsert=False` now sends `x-upsert:
false` instead of being dropped.
- `update()`: the `upsert` argument is removed. `update()` uses `PUT`,
which never sent the header, so the argument did nothing.
- A non-`bool` `upsert` raises `TypeError`. Without this check, a
leftover `upsert="false"` would be truthy and be sent as `x-upsert:
true`, overwriting files silently.
- `MIGRATION.md` gets a section on the storage `upsert` change.

## Why

- `upsert=True` failed inside httpx with `TypeError: Header value must
be str or bytes, not <class 'bool'>`.
- Any string passed the type check, so values like `"True"` or `"yes"`
were sent unchanged and could silently fail to overwrite.

## Breaking change

- Callers passing `upsert="true"` or `upsert="false"` must pass `True`
or `False`.
- Callers passing `upsert=` to `update()` must remove it.

This targets `main` (v3) only.

## Tests

Added unit tests for the `x-upsert` header value of `upload()` and
`create_signed_upload_url()`, and for the `TypeError` on a string
`upsert`, for both the sync and async clients.

Closes #1996

9656 of 10113 relevant lines covered (95.48%)

5.82 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
96.76
0.62% src/storage3/file_api.py
2
98.55
0.19% tests/test_file_api.py
Jobs
ID Job ID Ran Files Coverage
1 utils-py3.14-highest - 42026860620.1 05 Nov 2026 12:24PM UTC 19
99.5
GitHub Action Run
2 auth-py3.11-lowest-direct - 42026860620.2 05 Nov 2026 12:25PM UTC 36
91.55
GitHub Action Run
3 functions-py3.15-highest - 42026860620.3 05 Nov 2026 12:25PM UTC 15
97.61
GitHub Action Run
4 supabase-py3.13-highest - 42026860620.4 05 Nov 2026 12:24PM UTC 22
97.77
GitHub Action Run
5 supabase-py3.11-highest - 42026860620.5 05 Nov 2026 12:24PM UTC 22
97.77
GitHub Action Run
6 supabase-py3.12-highest - 42026860620.6 05 Nov 2026 12:25PM UTC 22
97.77
GitHub Action Run
7 functions-py3.11-lowest-direct - 42026860620.7 05 Nov 2026 12:24PM UTC 15
97.61
GitHub Action Run
8 auth-py3.14-highest - 42026860620.8 05 Nov 2026 12:25PM UTC 36
91.52
GitHub Action Run
9 postgrest-py3.12-highest - 42026860620.9 05 Nov 2026 12:26PM UTC 25
97.89
GitHub Action Run
10 storage-py3.11-lowest-direct - 42026860620.10 05 Nov 2026 12:26PM UTC 22
93.81
GitHub Action Run
11 functions-py3.14-highest - 42026860620.11 05 Nov 2026 12:24PM UTC 15
97.61
GitHub Action Run
12 utils-py3.15-highest - 42026860620.12 05 Nov 2026 12:24PM UTC 19
99.5
GitHub Action Run
13 utils-py3.12-highest - 42026860620.13 05 Nov 2026 12:24PM UTC 19
99.51
GitHub Action Run
14 functions-py3.13-highest - 42026860620.14 05 Nov 2026 12:24PM UTC 15
97.61
GitHub Action Run
15 utils-py3.11-highest - 42026860620.15 05 Nov 2026 12:24PM UTC 19
99.51
GitHub Action Run
16 realtime-py3.11-lowest-direct - 42026860620.16 05 Nov 2026 12:26PM UTC 9
96.24
GitHub Action Run
17 supabase-py3.11-lowest-direct - 42026860620.17 05 Nov 2026 12:24PM UTC 22
97.77
GitHub Action Run
18 functions-py3.12-highest - 42026860620.18 05 Nov 2026 12:25PM UTC 15
97.61
GitHub Action Run
19 realtime-py3.15-highest - 42026860620.19 05 Nov 2026 12:26PM UTC 9
95.61
GitHub Action Run
20 postgrest-py3.14-highest - 42026860620.20 05 Nov 2026 12:26PM UTC 25
97.89
GitHub Action Run
21 postgrest-py3.13-highest - 42026860620.21 05 Nov 2026 12:26PM UTC 25
97.89
GitHub Action Run
22 supabase-py3.15-highest - 42026860620.22 05 Nov 2026 12:26PM UTC 22
97.76
GitHub Action Run
23 storage-py3.11-highest - 42026860620.23 05 Nov 2026 12:26PM UTC 22
93.81
GitHub Action Run
24 auth-py3.13-highest - 42026860620.24 05 Nov 2026 12:25PM UTC 36
91.55
GitHub Action Run
25 utils-py3.13-highest - 42026860620.25 05 Nov 2026 12:24PM UTC 19
99.51
GitHub Action Run
26 utils-py3.11-lowest-direct - 42026860620.26 05 Nov 2026 12:24PM UTC 19
99.51
GitHub Action Run
27 auth-py3.11-highest - 42026860620.27 05 Nov 2026 12:25PM UTC 36
91.55
GitHub Action Run
28 realtime-py3.12-highest - 42026860620.28 05 Nov 2026 12:26PM UTC 9
95.95
GitHub Action Run
29 realtime-py3.13-highest - 42026860620.29 05 Nov 2026 12:26PM UTC 9
96.09
GitHub Action Run
30 storage-py3.15-highest - 42026860620.30 05 Nov 2026 12:26PM UTC 22
93.79
GitHub Action Run
31 realtime-py3.14-highest - 42026860620.31 05 Nov 2026 12:25PM UTC 9
95.45
GitHub Action Run
32 postgrest-py3.11-highest - 42026860620.32 05 Nov 2026 12:26PM UTC 25
97.89
GitHub Action Run
33 postgrest-py3.11-lowest-direct - 42026860620.33 05 Nov 2026 12:26PM UTC 25
97.89
GitHub Action Run
34 realtime-py3.11-highest - 42026860620.34 05 Nov 2026 12:26PM UTC 9
96.24
GitHub Action Run
35 supabase-py3.14-highest - 42026860620.35 05 Nov 2026 12:24PM UTC 22
97.76
GitHub Action Run
36 storage-py3.12-highest - 42026860620.36 05 Nov 2026 12:26PM UTC 22
93.81
GitHub Action Run
37 auth-py3.12-highest - 42026860620.37 05 Nov 2026 12:25PM UTC 36
91.55
GitHub Action Run
38 storage-py3.14-highest - 42026860620.38 05 Nov 2026 12:26PM UTC 22
93.79
GitHub Action Run
39 auth-py3.15-highest - 42026860620.39 05 Nov 2026 12:25PM UTC 36
91.52
GitHub Action Run
40 postgrest-py3.15-highest - 42026860620.40 05 Nov 2026 12:26PM UTC 25
97.89
GitHub Action Run
41 storage-py3.13-highest - 42026860620.41 05 Nov 2026 12:26PM UTC 22
93.81
GitHub Action Run
42 functions-py3.11-highest - 42026860620.42 05 Nov 2026 12:24PM UTC 15
97.61
GitHub Action Run
Source Files on build 42026860620
  • Tree
  • List 124
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42026860620
  • 0331c57e on github
  • Prev Build on main (#42026831817)
  • Next Build on main (#42035907963)
  • 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