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

Deprecation warning for ruby 2.5.0 fixed #189

Merged
merged 7 commits into from
Feb 15, 2018

Conversation

webhoernchen
Copy link
Contributor

  • httpi/auth/ssl.rb:13: warning: constant OpenSSL::SSL::SSLContext::METHODS deprecated

   * httpi/auth/ssl.rb:13: warning: constant OpenSSL::SSL::SSLContext::METHODS deprecated
@espen
Copy link

espen commented Jan 2, 2018

Looks good but should probably add 2.5.0 to .travis.yml to ensure test coverage.

SSL_VERSIONS = if ssl_context.const_defined? :METHODS_MAP
ssl_context.const_get(:METHODS_MAP).keys
else
ssl_context::METHODS.reject { |method| method.match(/server|client/) }
Copy link

Choose a reason for hiding this comment

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

Why are you using const_get in one case and :: in other?

Copy link

Choose a reason for hiding this comment

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

because METHODS_MAP is a private constant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because METHODS_MAP is marked as private
Look at: https://github.com/ruby/ruby/blob/trunk/ext/openssl/lib/openssl/ssl.rb#L222

Copy link

Choose a reason for hiding this comment

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

Well, it sucks that we are using private constants from other libs :(

Copy link
Member

Choose a reason for hiding this comment

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

Well, it sucks that we are using private constants from other libs :(

@tycooon I agree with you.

Someone suggests a better approach?

These values change by different OpenSSL::SSL::SSLContext? We can't set this values on SSL_VERSIONS directly?

Copy link

Choose a reason for hiding this comment

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

I only see either fetching it from the OpenSSL lib as @webhoernchen is doing it or defining it directly SSL_VERSIONS = [:TLSv1_2, :TLSv1_1, :TLSv1, :SSLv3, :SSLv23] but having to update it manually if anything changes.

Copy link
Member

Choose a reason for hiding this comment

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

@webhoernchen what do you think? I see no problem with SSL_VERSIONS = [:TLSv1_2, :TLSv1_1, :TLSv1, :SSLv3, :SSLv23] approach.

@bakku
Copy link

bakku commented Jan 11, 2018

I think it makes sense to fix the deprecation warnings in the specs as well

https://github.com/savonrb/httpi/blob/master/spec/httpi/auth/ssl_spec.rb#L6
https://github.com/savonrb/httpi/blob/master/spec/httpi/adapter/curb_spec.rb#L260

Is it possible to get a release after merging? We have a lot of cronjobs executing rake tasks and I get emails for every cronjob because of the deprecation warning 😅

@coveralls
Copy link

coveralls commented Jan 11, 2018

Coverage Status

Coverage increased (+0.03%) to 97.156% when pulling 3fedfb6 on webhoernchen:master into 7bc8ed8 on savonrb:master.

@savonrb savonrb deleted a comment from coveralls Jan 11, 2018
@savonrb savonrb deleted a comment from coveralls Jan 11, 2018
SSL_VERSIONS = if ssl_context.const_defined? :METHODS_MAP
ssl_context.const_get(:METHODS_MAP).keys
else
ssl_context::METHODS.reject { |method| method.match(/server|client/) }
Copy link
Member

Choose a reason for hiding this comment

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

Well, it sucks that we are using private constants from other libs :(

@tycooon I agree with you.

Someone suggests a better approach?

These values change by different OpenSSL::SSL::SSLContext? We can't set this values on SSL_VERSIONS directly?

@rogerleite
Copy link
Member

Is it possible to get a release after merging?

@bakku for sure! 👍
I need to check what is on master. 🤔

@rogerleite
Copy link
Member

Travis is failing with jruby. https://travis-ci.org/savonrb/httpi/jobs/327656334

Seems some problem on install ...

$ rvm use jruby --install --binary --fuzzy
curl: (22) The requested URL returned error: 404 Not Found
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Required jruby-9.1.15.0200 is not installed - installing.
curl: (22) The requested URL returned error: 404 Not Found
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Searching for binary rubies, this might take some time.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Unknown ruby string (do not know how to handle): jruby-9.1.15.0200.
Requested binary installation but no rubies are available to download, consider skipping --binary flag.
Gemset '' does not exist, 'rvm jruby-9.1.15.0200 do rvm gemset create ' first, or append '--create'.
The command "rvm use jruby --install --binary --fuzzy" failed and exited with 2 during .
Your build has been stopped.

Optional quest: should be good to check if tests are ok locally with jruby.

@rogerleite
Copy link
Member

rogerleite commented Jan 11, 2018

@bakku next version should enter:

   * ssl versions improved
@savonrb savonrb deleted a comment from coveralls Jan 11, 2018
@savonrb savonrb deleted a comment from coveralls Jan 11, 2018
@savonrb savonrb deleted a comment from coveralls Jan 11, 2018
@savonrb savonrb deleted a comment from coveralls Jan 11, 2018
   * jruby fixed
   * jruby fixed
   * gemset fixed
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 97.156% when pulling cb2711e on webhoernchen:master into 7bc8ed8 on savonrb:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 97.156% when pulling cb2711e on webhoernchen:master into 7bc8ed8 on savonrb:master.

@coveralls
Copy link

coveralls commented Jan 11, 2018

Coverage Status

Coverage increased (+0.03%) to 97.156% when pulling cb2711e on webhoernchen:master into 7bc8ed8 on savonrb:master.

@coveralls
Copy link

coveralls commented Jan 11, 2018

Coverage Status

Coverage increased (+0.03%) to 97.156% when pulling 8513213 on webhoernchen:master into 7bc8ed8 on savonrb:master.

@lleger
Copy link

lleger commented Feb 11, 2018

Is this likely to get merged/released soon? Would like to clean the deprecation notice from our logs 😄

@pcai
Copy link
Member

pcai commented Feb 13, 2018

@rogerleite thanks for reviewing, does this look good now? I have permissions to merge, and can make a new release, if you'd like a hand.

@rogerleite
Copy link
Member

@pcai thanks for the help. Feel free to merge and make a new release, don't forget to update changelog and bump version like this commit 7a81287

@Wardrop
Copy link

Wardrop commented Feb 14, 2018

The guy who monitors a shared IT mailbox here at work will appreciate the reduction in Cron Daemon emails. Eagerly awaiting this release...

@savonrb savonrb deleted a comment from coveralls Feb 15, 2018
@savonrb savonrb deleted a comment from coveralls Feb 15, 2018
@rogerleite rogerleite merged commit 0358921 into savonrb:master Feb 15, 2018
@bakku
Copy link

bakku commented Apr 9, 2018

hi guys, any update on when we will see a release? Additionally the savon gem should probably be updated since it uses the httpi gem and therefore shows the deprecation message aswell

@rogerleite
Copy link
Member

Hi @bakku, this fix is already released on version https://github.com/savonrb/httpi/releases/tag/v2.4.3

Savon needs to change add_dependency "httpi", "~> 2.3" to add_dependency "httpi", "~> 2.4"

@bakku
Copy link

bakku commented Apr 9, 2018

You're right, I'm sorry. I somehow thought that the mentioned release was before this pull request. Thanks @rogerleite

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

Successfully merging this pull request may close these issues.

9 participants