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

supabase / supabase-py / 41641729152 / 17
98%
main: 98%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 01:11PM UTC
Files 61
Run time 1s
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:08PM UTC coverage: 96.375%. Remained the same
41641729152.17

push

github

web-flow
fix(postgrest): reject strip_nulls combined with csv in either order (#1927)

Fixes SDK-2675.

## Problem

`strip_nulls()` refuses to run after `csv()`, but the opposite order was
not checked. `select("*").strip_nulls().csv()` sent a plain `text/csv`
request and silently dropped `strip_nulls`, because
`RequestConfig.send()` only rewrites JSON `Accept` headers.
`strip_nulls().explain()` had the same problem.

## Change

- New private `RequestConfig._reject_strip_nulls(method)` raises
`ValueError("strip_nulls() cannot be used with <method>()")` when
`strip_nulls` is set.
- Both `csv()` overrides (the RPC builder in `base_request_builder.py`
and the select builder in `_async/`, regenerated into `_sync/`) and the
select builder's `explain()` call it before switching the `Accept`
header.
- The existing guard in `strip_nulls()` stays. It is still reachable
through `rpc(...).csv().strip_nulls()`, since the RPC builder's `csv()`
returns the same builder.
- On the select builder, `csv()` returns a single request builder that
has no `strip_nulls()`, so `select("*").csv().strip_nulls()` keeps
failing with `AttributeError` (and is flagged by type checkers).

Behaviour change: `strip_nulls().csv()` and `strip_nulls().explain()`
used to run and ignore `strip_nulls`. They now raise `ValueError` up
front. Results did not change before, so callers relying on this only
lose a no-op call.

## Comparison with postgrest-js

postgrest-js throws in `stripNulls()` when `Accept` is already
`text/csv`, but its `csv()` does not check `shouldStripNulls`, so
`stripNulls().csv()` is silently ignored there as well. This PR keeps
the matching `csv().strip_nulls()` behaviour and also rejects the
reverse order instead of ignoring it.

## Tests

`tests/test_strip_nulls.py` now runs against both the sync and async
clients with a mock transport. It covers both call orders on the select
and RPC builders, `strip_nulls().explain()`, plus plain `csv()` and
plain `strip_nulls()` (array and si... (continued)

5104 of 5296 relevant lines covered (96.37%)

0.96 hits per line

Source Files on job run-ubuntu-latest-3.12-auth - 41641729152.17
  • Tree
  • List 61
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 41641729152
  • 0ed5b29c on github
  • Prev Job for on main (#41640930194.12)
  • Next Job for on main (#41641760894.25)
  • 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