-
Notifications
You must be signed in to change notification settings - Fork 173
implement valkey support #975
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
Conversation
notes about this PR:
i'll continue to debug the problems with the tests, they could be something obvious that my tired eyes can't see or something hard, idk, i really appreciate any help and ideas and tips some extra notes: also the packaging and development setup is painful |
Looking good. A bit of cleanup still to do and the tests need to pass, but looks like it's mostly good. |
hi! I'm back so currently i fixed more importatnly tho, i looked into why tests are failing on the discussion about context managers, i have something like this in mind async with ValkeyCache(config=my_config) as cache:
await cache.set(...) where another idea i have is to use a classmethod async with ValkeyCache.with_context_manager(config=congi):
... this way we don't need to change the signature of but i do think config should be provided by the user, so they can configure it as they please p.s: i know the commits have gotten a bit messy, i'm keeping it like this so i can see diff, i'll clean it up before un-drafting |
There is no released version with the current signature. The first version is fine. |
Once the tests actually run in the CI, I might be able to help.
Don't bother, it makes reviewing more difficult. We'll squash commit the PR. |
Ah, that's awkward, there's also no pypy version for valkey-glide? |
https://github.com/valkey-io/valkey-glide/blob/main/python/pyproject.toml#L24 |
Is that a bug in glide? From what I see at a glance, the _reader_loop() task is never awaited on. It looks like it's been cancelled here, which appears to only happen when the client is garbage collected. Either we're not closing the client correctly, or glide is depending on |
Oh, well, pip can't find it to install on the pypy job for some reason. |
Because we fail on warnings, that may be all the errors occurring in the tests. If fixed, that may resolve most of them. |
That's also the reason the tests work when run individually. For a single test run, the garbage collection won't happen until after the test run has completed, so the test ends up passing. |
i did try to install it locally |
hmm, might be |
so that fixed the problem... there are some ut problems, i'll fix that soon then work on the context manager and docs |
Might be, |
Looks like it just missed the close. The close() method should probably await the task though to ensure any exceptions etc. get raised correctly (like https://docs.aiohttp.org/en/stable/web_advanced.html#complex-applications). |
hi @asafpamzn one is the lack of a connection pool that we see in other clients two os the lack of context manager support |
hi again 👋🏼 let me know what you think |
hi 👋 and sadly i don't have the ability to dedicate myself to this project currently, hopefully when things do calm down I'll come back and finish up, hope this pr benefits people, and y'all have a great time ❤️ |
@amirreza8002 This what happens when your country's regime spreads terror across the entire region and tries to acquire nukes. Hope Iranian people will use this opportunity to set themselves free from the religious dictatorship. There can be peace between us as it once was. |
👀 |
Hey @amirreza8002! Hope you are safe! |
hello 👋 |
Thanks for sticking with this PR, it turned into a much larger PR than I originally expected. That's been really helpful. |
What do these changes do?
add support for valkey, using valkey-gilde
Related issue number
Fixes #882
Checklist