-
Notifications
You must be signed in to change notification settings - Fork 2.6k
AbstractConnection.register_connect_callback was made private in version 5.0.1 #2965
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
Comments
Ping @kristjanvalur |
Ah, this was done as a result to this comment here: #2870 (comment) |
Same goes for |
Yes, that one was problematic because it clears them all, not just the one you registered. But it is not really needed because the callbacks are weak anyway. |
Hello @kristjanvalur, |
Well, I'm not a maintainer here, just a submitter of pull-requests. I can prepare one where we move these functions back, but it is up to the maintainers whether they want them. I think it would help your argument if you could explain your use case, because as I understand, these apis were only ever intended to be private to begin with. |
@chayim Need your opinion on restoring these functions, please kindly take a look at this thread, thanks. |
We use it for client side caching in which you need to set TRACKING on upon connecting (off when disconnecting) to invalidate client side cache when a value changes on the server. |
cool use case. Yes, I totally get it, the client needs to know when the connection was automatically re-connected in order to enable tracking again. Who knows what other ephemeral connection state a client might want to set on a re-connected connection? I'll prepare a PR making those non-semi-private again, lets see what the maintainers think. I can't be bothered to document those though :) |
ping @chayim |
in the mean-time, these aren't private-private, you can continue to use them with the leading underscore. It is called hacking and all the cool kids are doing it, I'm told. |
Just to add here, So with redis-py 5.0.1 we see errors with checking celery results in some cases I can dig deeper if more information is needed, will skip 5.0.1 as a quickfix |
Thanks for this post, I just ran into this bug and wasn't sure what to make of it:
|
Fixed in #2980 |
Version: redis-py 5.0.1
Platform: Ubuntu 20.04
Description:
In #2870 the public API of
AbstractConnection
changedWe use the public method
register_connect_callback
in our code:The text was updated successfully, but these errors were encountered: