You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(supabase): split helpers and re-exports out of client.py - #2085
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Documentation
Updated the migration guide with the recommended import paths for errors, retry policies, response types, and version information.
Changes
The supabase.client module now exports only client classes. Import SupabaseException, other errors, RetryPolicy, response types, and __version__ from supabase instead.
The client module now exports only the client classes. SupabaseException is defined in errors and imported at the package level. Key helpers and shared HTTP session wrappers are moved into separate modules, and the HTTP adapters import validation helpers from _keys. The migration guide and export tests reflect the updated import paths and exports.
Possibly related PRs
supabase/supabase-py#1998: Both PRs change the SupabaseException contract and the structure of supabase/client.py.
supabase/supabase-py#1979: This PR establishes package-root error exports that this PR documents as the import path.
Change: Refactor
Merge Risk: Minimal · up to b6029
This refactor moves internal helpers and narrows what supabase.client exports. The breaking import change is documented in MIGRATION.md. No concrete merge-blocking risk was found.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 9ee2aed6-18d6-46e5-afa9-c469a4ec2070
Commits
Reviewing files that changed from the base of the PR and between 56af8b0 and b60294c.
Files selected for processing: 10
MIGRATION.md
src/supabase/src/supabase/__init__.py
src/supabase/src/supabase/_keys.py
src/supabase/src/supabase/aiohttp.py
src/supabase/src/supabase/client.py
src/supabase/src/supabase/errors.py
src/supabase/src/supabase/httpx.py
src/supabase/tests/test_client.py
src/supabase/tests/test_exports.py
src/utils/src/supabase_utils/http/io.py
Files with no reviewable changes: 2
src/supabase/tests/test_client.py
src/supabase/tests/test_exports.py
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trims
client.pydown to the client classes. SDK-3088supabase.clientno longer re-exports the errors,RetryPolicyand response types. Import them fromsupabase(breaking, noted inMIGRATION.md).SupabaseExceptionmoves tosupabase/errors.py.supabase/_keys.py._SharedHttpSessionand_SharedAsyncHttpSessionmove tosupabase_utils.http.io.