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

Async object store support #6

Merged
merged 5 commits into from
Jun 9, 2024
Merged

Async object store support #6

merged 5 commits into from
Jun 9, 2024

Conversation

kylebarron
Copy link
Contributor

@kylebarron kylebarron commented Feb 7, 2024

Change list

  • Add async methods for each existing function.
  • Remove superfluous vec clone. PyBytes::new(py, &Bytes::to_vec()) had two clones, I believe, where only one was needed.
  • Automatically convert to PyBytes from Cow<[u8]> instead of converting manually. At least for the async version this was a lot easier; I struggled with manually constructing PyBytes objects inside the async closure.

Another option for the API would be to have a separate class AsyncObjectStore that has only the async methods. This might keep the methods cleaner (we wouldn't need to have an async suffix on each method). But alternatively, there's no reason why someone couldn't use the same store for both synchronous and async calls.

This is implemented on top of #5, so ignore the first several commits. It's expected for #5 to be merged first, and then this PR can be squashed.

Closes #2

object-store/src/lib.rs Outdated Show resolved Hide resolved
@ion-elgreco
Copy link

This looks interesting! Any chance to get this merged and released? @roeap

@simonbutt
Copy link

Any progress getting this released?

@jhamman

This comment has been minimized.

@dark0dave
Copy link
Contributor

No progress here. The store API has managed to mature a bit so if someone wanted to come and pick this up (@kylebarron or otherwise), now would be a good time.

I have picked it up.

@ion-elgreco
Copy link

Maybe it's easier to fork, and then merge all open PRs into that fork and release it

Copy link
Owner

@roeap roeap left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this @kylebarron! And sorry for letting this sit for so long.

@roeap roeap merged commit 8ed1da1 into roeap:main Jun 9, 2024
5 checks passed
@kylebarron kylebarron deleted the kyle/async branch June 12, 2024 14:05
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.

Async interface
6 participants