Skip to content

chore: switch to supabase_auth and supabase_functions #1192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 12, 2025

Conversation

o-santi
Copy link
Contributor

@o-santi o-santi commented Aug 7, 2025

What kind of change does this PR introduce?

Switch to supabase-auth instead of gotrue, and supabase-functions instead of supafunc. Fixes #1166.

Should be merge after both of the packages are properly deprecated.

What is the current behavior?

Using gotrue and supafunc packages.

What is the new behavior?

Using supabase_auth and supabase_functions packages.

instead of `gotrue` and `supafunc`
@o-santi o-santi requested a review from silentworks August 7, 2025 19:17
@silentworks silentworks mentioned this pull request Aug 7, 2025
o-santi added 3 commits August 8, 2025 10:05
in order for people to get warnings if they are importing things
directly from them, instead of `supabase-py`.

see: supabase#1166 (comment)
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16835162139

Details

  • 14 of 16 (87.5%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.88%

Changes Missing Coverage Covered Lines Changed/Added Lines %
supabase/client.py 0 2 0.0%
Totals Coverage Status
Change from base Build 16758175435: 0.0%
Covered Lines: 371
Relevant Lines: 432

💛 - Coveralls

Copy link
Contributor

@silentworks silentworks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR by itself doesn't guarantee BC. Let's discuss this a bit further first.

@o-santi
Copy link
Contributor Author

o-santi commented Aug 11, 2025

@silentworks I do think that its good that we're talking about warning people for that edge case, but overall I don't think that that specific case breaking means that the change is not backwards compatible, as it is abusing the fact that python transitive dependencies leak to the final project.

The interface we're trying to maintain is the one declared in supabase/__init__.py, and we're explictly re-exporting gotrue definitions through that. If the user is correctly importing the definitions from supabase, then no error is thrown. Sadly, we cannot prohibit the user from importing gotrue even if its not declared as a package, but internal dependencies are certainly not part of the public interface.

In a similar vein, if a user is using supabase's dev environment's unasync-cli without explicitly declaring it, and we decide to switch our tooling, then it certainly isn't a breaking change (if the client functions stay the same overall), as we do not promise at any point that unasync-cli is part of the public interface, and anyone relying on it is wrong in doing so.

@o-santi o-santi merged commit 6cd4f6a into supabase:main Aug 12, 2025
9 checks passed
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.

Packages name change
3 participants