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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve "Passing the keyword argument as ..." deprecation warning #875

Merged
merged 2 commits into from
Dec 30, 2020

Conversation

abicky
Copy link
Contributor

@abicky abicky commented Dec 12, 2020

This PR resolves a deprecation warning like below when the Ruby version is 2.7:

/path/to/ruby-kafka/spec/transaction_manager_spec.rb:594: warning: Passing the keyword argument as the last hash parameter is deprecated
/path/to/ruby-kafka/spec/transaction_manager_spec.rb:682: warning: The called method `txn_offset_commit_response' is defined here

Before

% rspec --tag functional spec/transaction_manager_spec.rb:601 spec/functional/consumer_group_spec.rb:438
Run options:
  include {:functional=>true, :locations=>{"./spec/transaction_manager_spec.rb"=>[601], "./spec/functional/consumer_group_spec.rb"=>[438]}}
  exclude {:performance=>true, :fuzz=>true}

Kafka::TransactionManager
  #send_offsets_to_txn
    currently in transaction
/Users/arabiki/ghq/src/github.com/zendesk/ruby-kafka/spec/transaction_manager_spec.rb:594: warning: Passing the keyword argument as the last hash parameter is deprecated
/Users/arabiki/ghq/src/github.com/zendesk/ruby-kafka/spec/transaction_manager_spec.rb:682: warning: The called method `txn_offset_commit_response' is defined here
      notifies transaction coordinator

Consumer API
/Users/arabiki/ghq/src/github.com/zendesk/ruby-kafka/spec/spec_helper.rb:66: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/arabiki/ghq/src/github.com/zendesk/ruby-kafka/spec/spec_helper.rb:70: warning: The called method `create_topic' is defined here
  consuming messages with a custom assignment strategy

Finished in 3.72 seconds (files took 0.72687 seconds to load)
2 examples, 0 failures

After

% rspec --tag functional spec/transaction_manager_spec.rb:601 spec/functional/consumer_group_spec.rb:438
Run options:
  include {:functional=>true, :locations=>{"./spec/transaction_manager_spec.rb"=>[601], "./spec/functional/consumer_group_spec.rb"=>[438]}}
  exclude {:performance=>true, :fuzz=>true}

Kafka::TransactionManager
  #send_offsets_to_txn
    currently in transaction
      notifies transaction coordinator

Consumer API
  consuming messages with a custom assignment strategy

Finished in 3.72 seconds (files took 0.61582 seconds to load)
2 examples, 0 failures

@abicky abicky force-pushed the resolve-deprecation-warning branch 2 times, most recently from 7845184 to 74990e1 Compare December 12, 2020 12:25
Copy link
Contributor

@dasch dasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dasch dasch merged commit fc5c69d into zendesk:master Dec 30, 2020
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 this pull request may close these issues.

2 participants