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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning: Redis.current is deprecated and will be removed in 5.0 #189

Closed
pedrofurtado opened this issue Feb 14, 2022 · 2 comments 路 Fixed by #190
Closed

Deprecation warning: Redis.current is deprecated and will be removed in 5.0 #189

pedrofurtado opened this issue Feb 14, 2022 · 2 comments 路 Fixed by #190

Comments

@pedrofurtado
Copy link
Contributor

pedrofurtado commented Feb 14, 2022

Hello! 馃憢

Using the latest version of gem redis and redis-namespace, appears a deprecation warning like this below:

`Redis.current=` is deprecated and will be removed in 5.0. (called from: /opt/rubies/3.0/lib/ruby/gems/3.0.0/gems/redis-namespace-1.8.1/lib/redis/namespace.rb:245:in `initialize')

https://github.com/resque/redis-namespace/blob/v1.8.1/lib/redis/namespace.rb#L245

https://github.com/redis/redis-rb/blob/v4.6.0/lib/redis.rb#L39-L48

redis/redis-rb#1064

@byroot
Copy link
Contributor

byroot commented Feb 14, 2022

@redis = options[:redis] || Redis.current

So it's mostly the caller's responsability to pass a Redis instance here.

@pedrofurtado
Copy link
Contributor Author

pedrofurtado commented Feb 14, 2022

@byroot Thanks for feedback! Anyway, when 5.x versions of gem redis be released, the redis-namespace will break because method current will not exists anymore 馃

I've open a PR suggesting a fix, you eyes/review on it will be awesome 馃嵒

#190

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 a pull request may close this issue.

2 participants