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

Ruby 2.3.0 Timeout Deprecation Warnings #289

Closed
hcatlin opened this Issue Dec 26, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@hcatlin

hcatlin commented Dec 26, 2015

It seems that in Ruby 2.3.0, the Object#timeout method is fully deprecated, and was only a helper method aliasing Timeout#timeout.

It seems that replacing timeout with Timeout.timeout should work for all versions that you might be concerned with.

A quick way to solve this would be to include the module into the session.rb file.

Currently, my application gives these:

/Users/hcatlin/.rvm/gems/ruby-2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:787:in `parse_header': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/hcatlin/.rvm/gems/ruby-2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:867:in `read_body_length': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/hcatlin/.rvm/gems/ruby-2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:500:in `query': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/hcatlin/.rvm/gems/ruby-2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:787:in `parse_header': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/hcatlin/.rvm/gems/ruby-2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:867:in `read_body_length': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/hcatlin/.rvm/gems/ruby-2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:500:in `query': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/hcatlin/.rvm/gems/ruby-2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:787:in `parse_header': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/hcatlin/.rvm/gems/ruby-2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:867:in `read_body_length': Object#timeout is deprecated, use Timeout.timeout instead.
@elifoster

This comment has been minimized.

Show comment
Hide comment
@elifoster

elifoster Dec 26, 2015

This was resolved by #287. @nahi You should close this.

elifoster commented Dec 26, 2015

This was resolved by #287. @nahi You should close this.

@hcatlin

This comment has been minimized.

Show comment
Hide comment
@hcatlin

hcatlin Dec 26, 2015

Yeah, I just saw that.

hcatlin commented Dec 26, 2015

Yeah, I just saw that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment