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

supabase / supabase-py / 41662786735
98%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 03:20PM UTC
Jobs 30
Files 187
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 03:20PM UTC coverage: 99.047% (+0.008%) from 99.039%
41662786735

push

github

web-flow
fix(postgrest): accept generated typeddict types in insert, upsert and update (#1939)

## What

Fixes #1443. SDK-831.

`insert`, `upsert` and `update` were typed to take `JSON`, so the
`Insert` and `Update` TypedDicts generated by `supabase gen types --lang
python` failed type checking. This PR fixes both the types and the
runtime serialization.

## Why the previous attempt was not enough

PR #1514 added `datetime` and `UUID` to the `JSON` alias. That has two
problems:

1. mypy (and pyright) treat a TypedDict as a `Mapping[str, object]`
only, never as `Mapping[str, <recursive alias>]`, so even a widened
`JSON` still rejects generated TypedDicts. I verified this against a
CLI-style TypedDict.
2. The body was sent with httpx's `json=`, which uses `json.dumps`, so
`datetime`, `UUID` and the other generated types raised `TypeError` at
request time.

## Changes

- New `RequestBody` type alias, `JSON | Mapping[str, object] |
Sequence[Mapping[str, object]]`, used by `insert`, `upsert` and `update`
(async and sync). It is a superset of the old `JSON` annotation, so
existing callers keep type-checking.
- Request bodies are now encoded by a private `_encode_json_body` helper
in `base_request_builder` and sent as `content=`, keeping the same
compact UTF-8 output httpx produced (`ensure_ascii=False`,
`allow_nan=False`). On top of plain JSON it encodes every non-JSON type
the generator emits:

  | Python type                | Encoded as                         |
  | -------------------------- | ---------------------------------- |
  | `datetime.datetime`/`date` | ISO 8601 string                    |
  | `datetime.time`            | ISO 8601 string                    |
  | `uuid.UUID`                | canonical string                   |
  | `bytes`                    | `\x` hex string (PostgreSQL bytea) |

  Any other unsupported type still raises `TypeError`, as before.
- `Content-Type: application/json` is set when a body is sent and the
caller has not set one.
... (continued)

15692 of 15843 relevant lines covered (99.05%)

5.13 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest-3.15-storage - 41662786735.1 03 Nov 2026 03:23PM UTC 43
98.5
GitHub Action Run
2 run-ubuntu-latest-3.15-auth - 41662786735.2 03 Nov 2026 03:21PM UTC 68
98.83
GitHub Action Run
3 run-ubuntu-latest-3.13-supabase - 41662786735.3 03 Nov 2026 03:20PM UTC 22
97.93
GitHub Action Run
4 run-ubuntu-latest-3.14-postgrest - 41662786735.4 03 Nov 2026 03:21PM UTC 42
99.57
GitHub Action Run
5 run-ubuntu-latest-3.11-functions - 41662786735.5 03 Nov 2026 03:20PM UTC 18
97.98
GitHub Action Run
6 run-ubuntu-latest-3.12-auth - 41662786735.6 03 Nov 2026 03:21PM UTC 68
98.83
GitHub Action Run
7 run-ubuntu-latest-3.15-realtime - 41662786735.7 03 Nov 2026 03:21PM UTC 17
97.97
GitHub Action Run
8 run-ubuntu-latest-3.11-auth - 41662786735.8 03 Nov 2026 03:21PM UTC 68
98.83
GitHub Action Run
9 run-ubuntu-latest-3.14-functions - 41662786735.9 03 Nov 2026 03:20PM UTC 18
97.98
GitHub Action Run
10 run-ubuntu-latest-3.13-functions - 41662786735.10 03 Nov 2026 03:20PM UTC 18
97.98
GitHub Action Run
11 run-ubuntu-latest-3.14-supabase - 41662786735.11 03 Nov 2026 03:20PM UTC 22
97.92
GitHub Action Run
12 run-ubuntu-latest-3.11-realtime - 41662786735.12 03 Nov 2026 03:21PM UTC 17
98.09
GitHub Action Run
13 run-ubuntu-latest-3.12-realtime - 41662786735.13 03 Nov 2026 03:21PM UTC 17
98.09
GitHub Action Run
14 run-ubuntu-latest-3.12-functions - 41662786735.14 03 Nov 2026 03:20PM UTC 18
97.98
GitHub Action Run
15 run-ubuntu-latest-3.14-auth - 41662786735.15 03 Nov 2026 03:21PM UTC 68
98.83
GitHub Action Run
16 run-ubuntu-latest-3.15-postgrest - 41662786735.16 03 Nov 2026 03:21PM UTC 42
99.57
GitHub Action Run
17 run-ubuntu-latest-3.12-storage - 41662786735.17 03 Nov 2026 03:21PM UTC 43
98.5
GitHub Action Run
18 run-ubuntu-latest-3.12-supabase - 41662786735.18 03 Nov 2026 03:20PM UTC 22
97.93
GitHub Action Run
19 run-ubuntu-latest-3.15-functions - 41662786735.19 03 Nov 2026 03:20PM UTC 18
97.98
GitHub Action Run
20 run-ubuntu-latest-3.11-postgrest - 41662786735.20 03 Nov 2026 03:21PM UTC 42
99.57
GitHub Action Run
21 run-ubuntu-latest-3.14-realtime - 41662786735.21 03 Nov 2026 03:21PM UTC 17
97.97
GitHub Action Run
22 run-ubuntu-latest-3.12-postgrest - 41662786735.22 03 Nov 2026 03:21PM UTC 42
99.57
GitHub Action Run
23 run-ubuntu-latest-3.11-supabase - 41662786735.23 03 Nov 2026 03:20PM UTC 22
97.93
GitHub Action Run
24 run-ubuntu-latest-3.13-storage - 41662786735.24 03 Nov 2026 03:21PM UTC 43
98.5
GitHub Action Run
25 run-ubuntu-latest-3.11-storage - 41662786735.25 03 Nov 2026 03:21PM UTC 43
98.5
GitHub Action Run
26 run-ubuntu-latest-3.13-postgrest - 41662786735.26 03 Nov 2026 03:21PM UTC 42
99.57
GitHub Action Run
27 run-ubuntu-latest-3.13-realtime - 41662786735.27 03 Nov 2026 03:21PM UTC 17
98.09
GitHub Action Run
28 run-ubuntu-latest-3.14-storage - 41662786735.28 03 Nov 2026 03:21PM UTC 43
98.5
GitHub Action Run
29 run-ubuntu-latest-3.15-supabase - 41662786735.29 03 Nov 2026 03:22PM UTC 22
97.92
GitHub Action Run
30 run-ubuntu-latest-3.13-auth - 41662786735.30 03 Nov 2026 03:21PM UTC 68
98.83
GitHub Action Run
Source Files on build 41662786735
  • Tree
  • List 187
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41662786735
  • 1ae57b89 on github
  • Prev Build on main (#41662624502)
  • Next Build on main (#41667435053)
  • 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