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
Fix many ruby 2.7 warnings for the 6.0 stable branch #37935
Conversation
since RedisCacheStore#write_entry takes kwargs, we needed to kwargsify all these methods in order to eliminate Ruby 2.7 warnings. It's a little bit bigger patch than I expected, but it doesn't warn on Ruby 3, and it doesn't introduce any incompatibility on loder rubies, so it may not be a bad thing anyway.
3655932
to
5b62385
Compare
Looks like the build is green, do you want to get this part merged and start up a PR for the remaining warnings or just all in one? |
5b62385
to
f9633cd
Compare
@kaspth there was only one actionable warning left in activesupport, so I update the PR. I think it should be good to go after that. There is still a huge chunk of warnings coming from |
Oh and the suite breaks because of a Deadlock, but it's also the case on master. |
Thanks!
Yeah, that'll probably take some work. What do you mean about tiny release? Should be perfectly safe to require a newer tzinfo for 6.1, no? |
Tiny as in So it would be complicated to bump tzinfo to 2.0 in Rails 6.0.X. That's why I started working on a PR to tzinfo to get a new 2.7 compatible 1.x release: tzinfo/tzinfo#111 |
Perfect! |
## Summary This PR suppresses the following keyword arguments warning for Ruby 2.7.0. ```console % ruby -v ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin17] % DB=sqlite bundle exec appraisal activerecord_6.0.0 rake /Users/koic/src/github.com/CanCanCommunity/cancancan/lib/cancan/unauthorized_message_resolver.rb:9: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/koic/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/i18n-1.8.0/lib/i18n.rb:195: warning: The called method `translate' is defined here ``` For Ruby 2.8.0-dev (Ruby 3.0) the warning will be `ArgumentError`. ruby/ruby#2794 ## Other Infromation There are other similar warnings against Active Record, but Rails 6.0 stable branch is WIP. rails/rails#37935 It is not subject to changes in this repository.
## Summary This PR suppresses the following keyword arguments warning for Ruby 2.7.0. ```console % ruby -v ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin17] % DB=sqlite bundle exec appraisal activerecord_6.0.0 rake /Users/koic/src/github.com/CanCanCommunity/cancancan/lib/cancan/unauthorized_message_resolver.rb:9: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/koic/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/i18n-1.8.0/lib/i18n.rb:195: warning: The called method `translate' is defined here ``` For Ruby 2.8.0-dev (Ruby 3.0) the warning will be `ArgumentError`. ruby/ruby#2794 ## Other Infromation There are other similar warnings against Active Record, but Rails 6.0 stable branch is WIP. rails/rails#37935 It is not subject to changes in this repository.
Hi there! 👋 Is there any plans to release this fix in a Thanks! |
I can't say when |
Got it, thanks @casperisfine! I thought it was fully fixed already :) |
Rails 6.0.3 has been released 🎉 To @lucascaton and everyone else who is subscribed and waiting. |
When possible I simply cherry-picked fixes from the master branch, but sometimes I had to redo them manually.
Here I started with ActiveSupport, I'm not sure I eliminated them all yet because the test suite is segfaulting on my machine.
This is still a work in progress, but opening a PR give me a CI run which is helpful.
cc @rafaelfranca @Edouard-chin