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

Update to net/http/persistent 3.0 #51

Closed
pvalena opened this issue May 31, 2018 · 3 comments
Closed

Update to net/http/persistent 3.0 #51

pvalena opened this issue May 31, 2018 · 3 comments

Comments

@pvalena
Copy link
Contributor

pvalena commented May 31, 2018

Current errors:

+ ruby -Ilib -e 'Dir.glob "./test/test_*.rb", &method(:require)'
/usr/share/gems/gems/psych-3.0.2/lib/psych.rb:232: warning: already initialized constant Psych::LIBYAML_VERSION
/usr/share/ruby/psych.rb:232: warning: previous definition of LIBYAML_VERSION was here
/usr/share/gems/gems/psych-3.0.2/lib/psych.rb:234: warning: already initialized constant Psych::FALLBACK
/usr/share/ruby/psych.rb:234: warning: previous definition of FALLBACK was here
Run options: --seed 18021
# Running:
EEE
Finished in 0.409732s, 7.3219 runs/s, 0.0000 assertions/s.
  1) Error:
TestGemMirror#test_delete_gems:
ArgumentError: wrong number of arguments (given 2, expected 0)
    /usr/share/gems/gems/net-http-persistent-3.0.0/lib/net/http/persistent.rb:505:in `initialize'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror/fetcher.rb:9:in `new'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror/fetcher.rb:9:in `initialize'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror.rb:19:in `new'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror.rb:19:in `initialize'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/test/test_gem_mirror.rb:49:in `new'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/test/test_gem_mirror.rb:49:in `block in test_delete_gems'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror/test_setup.rb:182:in `with_server'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/test/test_gem_mirror.rb:48:in `test_delete_gems'
  2) Error:
TestGemMirror#test_update_gems:
ArgumentError: wrong number of arguments (given 2, expected 0)
    /usr/share/gems/gems/net-http-persistent-3.0.0/lib/net/http/persistent.rb:505:in `initialize'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror/fetcher.rb:9:in `new'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror/fetcher.rb:9:in `initialize'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror.rb:19:in `new'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror.rb:19:in `initialize'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/test/test_gem_mirror.rb:27:in `new'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/test/test_gem_mirror.rb:27:in `block in test_update_gems'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror/test_setup.rb:182:in `with_server'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/test/test_gem_mirror.rb:26:in `test_update_gems'
  3) Error:
TestGemMirror#test_update_specs:
ArgumentError: wrong number of arguments (given 2, expected 0)
    /usr/share/gems/gems/net-http-persistent-3.0.0/lib/net/http/persistent.rb:505:in `initialize'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror/fetcher.rb:9:in `new'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror/fetcher.rb:9:in `initialize'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror.rb:19:in `new'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror.rb:19:in `initialize'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/test/test_gem_mirror.rb:17:in `new'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/test/test_gem_mirror.rb:17:in `block in test_update_specs'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/lib/rubygems/mirror/test_setup.rb:182:in `with_server'
    /usr/share/gems/gems/rubygems-mirror-1.1.0/test/test_gem_mirror.rb:16:in `test_update_specs'
3 runs, 0 assertions, 0 failures, 3 errors, 0 skips
@8vius
Copy link

8vius commented Dec 7, 2018

Also having this issue with anything from 3.9.0 and up

@olleolleolle
Copy link
Member

The change was that a constructor began using keyword arguments (not positional arguments).

Here's some code which worked around that: https://github.com/lostisland/faraday/blob/master/lib/faraday/adapter/net_http_persistent.rb#L13-L22

@zenspider
Copy link
Contributor

Please close. This seems to be addressed in 292a6b2

@raggi raggi closed this as completed Jul 20, 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

No branches or pull requests

5 participants