Skip to content

chore(postgrest): remove v2 deprecation shims and pydantic wrappers - #1975

Merged
spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-2707-remove-v2-leftovers
Nov 4, 2026
Merged

spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-2707-remove-v2-leftovers

Conversation

@spydon

@spydon spydon commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

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.

Breaking change

postgrest.utils.SyncClient no longer exists.

Linear: SDK-2707

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

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.

Share
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • 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.

@spydon
spydon merged commit cafef87 into main Nov 4, 2026
57 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-2707-remove-v2-leftovers branch November 4, 2026 14:59
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.

1 participant