Skip to content
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

Make get_public_url sync #169

Closed
wants to merge 1 commit into from
Closed

Make get_public_url sync #169

wants to merge 1 commit into from

Conversation

masylum
Copy link

@masylum masylum commented Dec 1, 2023

What kind of change does this PR introduce?

Simplify get_public_url signature by removing async

What is the current behavior?

It's async

What is the new behavior?

It's not async

Additional context

There is no need to since there is nothing to await. It makes the consumers more complicated and it looks like it will have a side effect which it does not.

There is no need to since there is nothing to await. It makes the consumers more complicated and it looks like it will have a side effect which it does not.
@J0
Copy link
Contributor

J0 commented Dec 1, 2023

Hey @masylum!

Thanks for the PR! If it helps there's actually a corresponding sync version of the method on the Sync client

@silentworks
Copy link
Collaborator

We ship both sync and async version of this library. If you need the sync version you should import that instead, if you are using this through supabase-py then by default it exports the sync version.

@masylum
Copy link
Author

masylum commented Jan 3, 2024

I'm aware of the both versions, it's just that it does not make much sense for this method to be async since there is no await in the body. This just improves the API by making explicit that this does actually not have any I/O, it's a pure function.

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