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

supabase / supabase-py / 41625746008
98%

Build:
DEFAULT BRANCH: main
Ran 03 Nov 2026 11:13AM UTC
Jobs 30
Files 167
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 11:13AM UTC coverage: 95.748% (-0.01%) from 95.758%
41625746008

push

github

web-flow
fix(postgrest): keep the http client and basic auth in schema() (#1672)

## What kind of change does this PR introduce?

Bug fix (postgrest).

## What is the current behavior?

`AsyncPostgrestClient.schema()` and `SyncPostgrestClient.schema()` build
a new client from `base_url`, `headers`, `timeout`, `verify` and `proxy`
only:

```python
return AsyncPostgrestClient(
    base_url=str(self.base_url),
    schema=schema,
    headers=dict(self.headers),
    timeout=self.timeout,
    verify=self.verify,
    proxy=self.proxy,
)
```

The `http_client` is not passed, so the new client creates its own
default httpx client. This has two effects:

- `supabase.schema("x")` delegates to `postgrest.schema("x")`. So every
query on another schema ignores the `httpx_client` set in
`ClientOptions`: its transport, proxy, TLS settings, event hooks and
connection limits are all skipped. Each `schema()` call also opens a new
connection pool that is never closed.
- Basic auth set with `client.auth(None, username=..., password=...)` is
dropped too. `basic_auth` is not copied, so requests on the new schema
go out without credentials.

I reproduced this end to end with `create_client(...,
options=ClientOptions(httpx_client=...))` against PostgREST v12.2.3. The
custom transport is the only route to the API, as it would be behind a
proxy or gateway.

```
== main
public  : [{'id': 1, 'name': 'public-item'}]
personal: ERROR ConnectError [Errno 8] nodename nor servname provided, or not known
requests through custom client: [('GET', '/rest/v1/items', 'public')]
== this branch
public  : [{'id': 1, 'name': 'public-item'}]
personal: [{'id': 1, 'name': 'personal-item'}]
requests through custom client: [('GET', '/rest/v1/items', 'public'), ('GET', '/rest/v1/items', 'personal')]
```

## What is the new behavior?

`schema()` passes the current session as `http_client` and copies
`basic_auth` onto the new client. The schema is still selected per
request through `Accept-Profile` / `Content-Pr... (continued)

12699 of 13263 relevant lines covered (95.75%)

4.96 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
94.34
-1.49% src/postgrest/_async/client.py
2
94.34
-1.49% src/postgrest/_sync/client.py
Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest-3.12-functions - 41625746008.1 03 Nov 2026 11:13AM UTC 18
97.98
GitHub Action Run
2 run-ubuntu-latest-3.15-supabase - 41625746008.2 03 Nov 2026 11:14AM UTC 20
96.84
GitHub Action Run
3 run-ubuntu-latest-3.14-supabase - 41625746008.3 03 Nov 2026 11:13AM UTC 20
96.84
GitHub Action Run
4 run-ubuntu-latest-3.13-postgrest - 41625746008.4 03 Nov 2026 11:14AM UTC 39
97.7
GitHub Action Run
5 run-ubuntu-latest-3.14-storage - 41625746008.5 03 Nov 2026 11:14AM UTC 40
95.69
GitHub Action Run
6 run-ubuntu-latest-3.11-supabase - 41625746008.6 03 Nov 2026 11:13AM UTC 20
96.85
GitHub Action Run
7 run-ubuntu-latest-3.11-storage - 41625746008.7 03 Nov 2026 11:14AM UTC 40
95.71
GitHub Action Run
8 run-ubuntu-latest-3.15-auth - 41625746008.8 03 Nov 2026 11:14AM UTC 57
93.9
GitHub Action Run
9 run-ubuntu-latest-3.15-realtime - 41625746008.9 03 Nov 2026 11:15AM UTC 17
90.95
GitHub Action Run
10 run-ubuntu-latest-3.14-auth - 41625746008.10 03 Nov 2026 11:14AM UTC 57
93.9
GitHub Action Run
11 run-ubuntu-latest-3.13-realtime - 41625746008.11 03 Nov 2026 11:15AM UTC 17
91.52
GitHub Action Run
12 run-ubuntu-latest-3.13-auth - 41625746008.12 03 Nov 2026 11:14AM UTC 57
93.92
GitHub Action Run
13 run-ubuntu-latest-3.14-functions - 41625746008.13 03 Nov 2026 11:13AM UTC 18
97.98
GitHub Action Run
14 run-ubuntu-latest-3.11-realtime - 41625746008.14 03 Nov 2026 11:15AM UTC 17
91.62
GitHub Action Run
15 run-ubuntu-latest-3.11-auth - 41625746008.15 03 Nov 2026 11:14AM UTC 57
93.92
GitHub Action Run
16 run-ubuntu-latest-3.13-supabase - 41625746008.16 03 Nov 2026 11:13AM UTC 20
96.85
GitHub Action Run
17 run-ubuntu-latest-3.14-postgrest - 41625746008.17 03 Nov 2026 11:14AM UTC 39
97.7
GitHub Action Run
18 run-ubuntu-latest-3.13-functions - 41625746008.18 03 Nov 2026 11:13AM UTC 18
97.98
GitHub Action Run
19 run-ubuntu-latest-3.15-storage - 41625746008.19 03 Nov 2026 11:16AM UTC 40
95.69
GitHub Action Run
20 run-ubuntu-latest-3.13-storage - 41625746008.20 03 Nov 2026 11:14AM UTC 40
95.71
GitHub Action Run
21 run-ubuntu-latest-3.12-storage - 41625746008.21 03 Nov 2026 11:14AM UTC 40
95.71
GitHub Action Run
22 run-ubuntu-latest-3.11-postgrest - 41625746008.22 03 Nov 2026 11:14AM UTC 39
97.7
GitHub Action Run
23 run-ubuntu-latest-3.15-postgrest - 41625746008.23 03 Nov 2026 11:15AM UTC 39
97.7
GitHub Action Run
24 run-ubuntu-latest-3.11-functions - 41625746008.24 03 Nov 2026 11:13AM UTC 18
97.98
GitHub Action Run
25 run-ubuntu-latest-3.15-functions - 41625746008.25 03 Nov 2026 11:13AM UTC 18
97.98
GitHub Action Run
26 run-ubuntu-latest-3.12-realtime - 41625746008.26 03 Nov 2026 11:15AM UTC 17
91.52
GitHub Action Run
27 run-ubuntu-latest-3.14-realtime - 41625746008.27 03 Nov 2026 11:15AM UTC 17
90.95
GitHub Action Run
28 run-ubuntu-latest-3.12-supabase - 41625746008.28 03 Nov 2026 11:13AM UTC 20
96.85
GitHub Action Run
29 run-ubuntu-latest-3.12-auth - 41625746008.29 03 Nov 2026 11:14AM UTC 57
93.92
GitHub Action Run
30 run-ubuntu-latest-3.12-postgrest - 41625746008.30 03 Nov 2026 11:15AM UTC 39
97.7
GitHub Action Run
Source Files on build 41625746008
  • Tree
  • List 167
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41625746008
  • c4e440cc on github
  • Prev Build on main (#41625202713)
  • Next Build on main (#41626959553)
  • 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