-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Migration from redis to valkey #12618
Comments
Thanks for working on valkey! In my experience working on the redis stubs, typing for it was quite hard, since it uses some API patterns that didn't mix well with typing. So I understand the challenges valkey-py faces. I basically see two possible avenues:
There's also a hybrid approach, which uses typeshed as an incubator. Start with stubs in typeshed, and once they are in a good shape, transfer the annotations over to the upstream package. Maintaining high quality annotations is easier than creating them in the first place. |
+1 it's essentially what I'm doing with I'd like to add that if the valkey maintainer(s) themselve(s) contribute to typeshed stubs, it's a lot easier to know what was the intent behind certain type restrictions, focusing more on type completion and correctness, maybe even bringing fixes upstream (I've had I'm also always a bit wary of adding stubs that could've been proposed upstream in the first place, but I don't have any issue using typeshed as an "incubator" or "proving grounds" That being said, it would also mean that typing in Valkey would be subject to the whims of typeshed maintainers' availability. For your linked
(see python/mypy#1693) |
On behalf of valkey-py's maintainers I can say that we certainly want the typing to be part of the project (now or at some point later). |
I'm going to close this now. The possible solutions have been discussed. If there are anymore questions, please let us know. |
As you may know, redis cannot really be considered opensource anymore, and pretty much everything and everyone moved to valkey and that includes the python module, now called valkey-py.
The other issue is that the typing provided by redis-py/valkey-py does not work at all, for anyone: valkey-io/valkey-py#84 (comment), which is why everyone is using
types-redis
, but that's not an option with valkey-py anymore.The plan is to avoid requiring the
types-redis
all together (which is good, as it is flagged for removal), but this is going to require some work (valkey-io/valkey-py#84).Do you have any recommandations on how to proceed? The package is a bit tricky (see the issue again), and I think the proper way to do it will be to copy the pyi files in the valkey-py repo, do the renaming, and work from there. But do you have any recommandations on how to proceed?
The text was updated successfully, but these errors were encountered: