Skip to content

feat!: major v3 release#1370

Draft
o-santi wants to merge 5 commits intomainfrom
v3
Draft

feat!: major v3 release#1370
o-santi wants to merge 5 commits intomainfrom
v3

Conversation

@o-santi
Copy link
Contributor

@o-santi o-santi commented Feb 3, 2026

v3 tracking PR

Tracking PR for all changes that are to come in the next major release.

Summary by CodeRabbit

  • New Features

    • Added a utilities package with HTTP helpers and JSON types; new Storage file, vectors, and analytics client APIs.
  • Breaking Changes

    • CI no longer tests Python 3.9 (now >=3.10).
    • Functions and Storage client surfaces consolidated and APIs renamed/adjusted (sync/async unified, some signatures changed).
  • Improvements

    • Stricter static typing and mypy rules.
    • Enhanced function-invocation error handling to surface relay vs HTTP errors.

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Consolidates and reworks HTTP/client layers: adds a new supabase_utils package with typed request/response abstractions and executors; centralizes Functions and Storage clients into executor-backed implementations; removes many legacy async/sync modules and unasync scripts; updates packaging, Makefiles, tests, and CI (drops Python 3.9).

Changes

Cohort / File(s) Summary
CI
\.github/workflows/ci.yml
Removed Python 3.9 from CI matrix.
Top-level build & workspace
Makefile, pyproject.toml
Added utils package to PACKAGES and workspace members; added utils.% Make target.
New utils package
src/utils/Makefile, src/utils/pyproject.toml, src/utils/src/supabase_utils/*
Added supabase_utils: typed HTTP request/response dataclasses, ResponseHandler, Sync/Async executors, JSON type adapter, packaging and Make targets.
Functions — new central client
src/functions/src/supabase_functions/client.py, src/functions/src/supabase_functions/__init__.py
Introduced generic FunctionsClient with Async/Sync wrappers and create_client factory; moved request mapping and error dispatch to central module; re-exported create_client.
Functions — removals & build changes
src/functions/src/supabase_functions/_async/*, src/functions/src/supabase_functions/_sync/*, src/functions/run-unasync.py, src/functions/Makefile, src/functions/pyproject.toml, src/functions/tests/*
Deleted legacy per-runtime clients and run-unasync script; enabled mypy --strict; removed unasync/build-sync targets; added pydantic and supabase-utils deps; updated tests to new executor/client shapes and types.
Functions — errors & utils tweaks
src/functions/src/supabase_functions/errors.py, src/functions/src/supabase_functions/utils.py, _async/__init__.py, _sync/__init__.py
Added on_error_response and refined FunctionsRelayError; removed BASE64URL_REGEX/is_http_url; removed future annotations in two modules.
Storage — unified clients added
src/storage/src/storage3/client.py, src/storage/src/storage3/file_api.py, src/storage/src/storage3/vectors.py, src/storage/src/storage3/analytics.py, src/storage/src/storage3/types.py, src/storage/src/storage3/exceptions.py
Added unified executor-backed StorageClient, StorageFileApiClient, StorageVectorsClient, StorageAnalyticsClient, updated models and error parsing; integrated supabase_utils request/response tooling.
Storage — legacy removals
src/storage/src/storage3/_async/*, src/storage/src/storage3/_sync/*, src/storage/src/storage3/constants.py, src/storage/src/storage3/utils.py, src/storage/run-unasync.py
Removed many legacy async/sync modules (bucket, file_api, vectors, analytics, request builders), constants and deprecated SyncClient wrapper and run-unasync scripts.
Storage tests & fixtures
src/storage/tests/*, src/storage/tests/_async/*, src/storage/tests/_sync/*
Updated tests/fixtures to new StorageClient/StorageFileApiClient shapes, models (Bucket, MessageResponse), executor.session usage, and removed tests for deprecated utilities.
Supabase client adjustments
src/supabase/src/supabase/*, src/supabase/src/supabase/_async/client.py, src/supabase/src/supabase/_sync/client.py, src/supabase/src/supabase/lib/client_options.py
Made storage_client_timeout optional, pass http_client through, removed DEFAULT_TIMEOUT dependency, and changed import path to storage3.exceptions.StorageException.
Miscellaneous
src/realtime/*, small tests
Minor formatting, typing annotation, and attribute renames (url→base_url, internal _client → executor.session) across tests and small modules.

Sequence Diagram(s)

sequenceDiagram
    participant Caller as Client (Sync/Async)
    participant Functions as FunctionsClient
    participant Executor as SyncExecutor/AsyncExecutor
    participant Httpx as httpx.Client/AsyncClient
    participant Handler as ResponseHandler
    rect rgba(200,200,255,0.5)
    Caller->>Functions: invoke(function_name, body?, region?)
    Functions->>Functions: _invoke_options_to_request() -> ToHttpxRequest
    Functions->>Handler: build ResponseHandler(request, on_success, on_failure)
    Functions->>Executor: executor.communicate(request)
    Executor->>Httpx: send httpx.Request
    Httpx-->>Executor: httpx.Response
    Executor->>Handler: call on_success or on_failure (uses on_error_response)
    Handler-->>Caller: return parsed result or raise error
    end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Suggested reviewers

  • mandarini
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.19% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat!: major v3 release' accurately reflects the main change: a major version release (v3) with breaking changes, as evidenced by extensive API restructuring across storage, functions, and utils packages.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch v3

Comment @coderabbitai help to get the list of available commands and usage tips.

@coveralls
Copy link

coveralls commented Feb 3, 2026

Pull Request Test Coverage Report for Build 21905305159

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 27 unchanged lines in 11 files lost coverage.
  • Overall coverage increased (+0.5%) to 91.775%

Files with Coverage Reduction New Missed Lines %
src/supabase_auth/_sync/gotrue_client.py 1 72.9%
src/supabase_auth/_async/gotrue_client.py 1 73.76%
src/postgrest/_sync/client.py 1 92.0%
src/storage3/exceptions.py 1 95.83%
src/realtime/_async/client.py 1 71.29%
src/postgrest/_async/client.py 1 92.0%
run-unasync.py 3 0.0%
src/storage3/init.py 3 70.0%
src/supabase/_async/client.py 5 95.31%
src/supabase/_sync/client.py 5 95.24%
Totals Coverage Status
Change from base Build 21866328687: 0.5%
Covered Lines: 8558
Relevant Lines: 9325

💛 - Coveralls

coderabbitai[bot]

This comment was marked as spam.

@timonrieger

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as spam.

this was likely a merge mishap when merging main into storage's branch
coderabbitai[bot]

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants