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
chore(postgrest): remove v2 deprecation shims and pydantic wrappers - #1975
Removes the remaining v2 leftovers that v3 still carried.
Changes
postgrest: removes the deprecated SyncClient class (and its aclose method) from postgrest.utils. Both were marked for removal in 3.0.0. Use httpx.Client instead. The httpx re-exports in that module are gone too.
postgrest, storage: drops the deprecation dependency, which only the shim used.
postgrest, auth: removes the private _model_validate_json, _model_validate, _model_dump and _model_dump_json helpers left over from the pydantic v1 compatibility layer, and calls model_validate_json directly.
Removes the test that checked SyncClient was still present.
The strenum dependency and the pydantic >=1.9 pin mentioned in the ticket were already removed on main.
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Removals
Removed the deprecated synchronous client from the PostgREST utilities. Applications that relied on this client will need to use another supported client.
Maintenance
Simplified internal JSON validation while preserving existing validation behavior. No user-facing changes to SSO or API error validation are expected.
The changes remove generic validation helpers and update auth and PostgREST call sites to use Pydantic model validation directly. They also remove the deprecated PostgREST SyncClient wrapper, its test, and the deprecation runtime dependency from PostgREST and Storage.
Possibly related PRs
supabase/supabase-py#1370: Removes the storage3.utils.SyncClient compatibility layer, related to this change’s removal of the PostgREST SyncClient.
supabase/supabase-py#1950: Makes auth and PostgREST validation helpers private, preceding this change’s removal of those helpers and direct validation calls.
Change: Other
Merge Risk: Minimal · up to 12c06
No merge-blocking issue is established. The removal of postgrest.utils.SyncClient is an explicit breaking change; merge after normal checks pass.
- [ ] 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: 63a9ba1a-017a-41a3-8823-74a4e35e49a2
Commits
Reviewing files that changed from the base of the PR and between 9ec8e52 and 12c0669.
Files ignored due to path filters: 1
uv.lock is excluded by !**/*.lock
Files selected for processing: 6
src/auth/src/supabase_auth/helpers.py
src/postgrest/pyproject.toml
src/postgrest/src/postgrest/request_builder.py
src/postgrest/src/postgrest/utils.py
src/postgrest/tests/test_utils.py
src/storage/pyproject.toml
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 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.
Removes the remaining v2 leftovers that v3 still carried.
Changes
SyncClientclass (and itsaclosemethod) frompostgrest.utils. Both were marked for removal in 3.0.0. Usehttpx.Clientinstead. Thehttpxre-exports in that module are gone too.deprecationdependency, which only the shim used._model_validate_json,_model_validate,_model_dumpand_model_dump_jsonhelpers left over from the pydantic v1 compatibility layer, and callsmodel_validate_jsondirectly.SyncClientwas still present.The
strenumdependency and thepydantic >=1.9pin mentioned in the ticket were already removed onmain.Breaking change
postgrest.utils.SyncClientno longer exists.Linear: SDK-2707