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 since Faraday 1.7.1 #1357

Closed
ybiquitous opened this issue Aug 31, 2021 · 5 comments · Fixed by #1359
Closed

Deprecation warning since Faraday 1.7.1 #1357

ybiquitous opened this issue Aug 31, 2021 · 5 comments · Fixed by #1359

Comments

@ybiquitous
Copy link
Contributor

Since Faraday 1.7.1, the following methods of the Faraday::Connection class emits a deprecation warning:

  • #basic_auth
  • #token_auth
  • #authorization

See also PR lostisland/faraday#1306

When running the specs on my local machine with the current HEAD revision (605a08a), we can see the many warnings:

$ bundle exec rspec
...
WARNING: `Faraday::Connection#authorization` is deprecated; it will be removed in version 2.0.
While initializing your connection, use `#request(:authorization, ...)` instead.
See https://lostisland.github.io/faraday/middleware/authentication for more usage info.
...

Used gem versions are as below:

$ bundle list | grep faraday
  * faraday (1.7.1)
  * faraday-em_http (1.0.0)
  * faraday-em_synchrony (1.0.0)
  * faraday-excon (1.1.0)
  * faraday-httpclient (1.0.1)
  * faraday-net_http (1.0.1)
  * faraday-net_http_persistent (1.2.0)
  * faraday-patron (1.0.0)
  * faraday-rack (1.0.0)

I think Octokit needs to fix the warnings to prevent users' application logs from being flooded with them.

@ybiquitous
Copy link
Contributor Author

These methods have been deleted on Faraday HEAD: lostisland/faraday#1308

@xiaoxipang
Copy link

Thanks for the fix! Looking forward to seeing this PR merging in soon because we use tons of octokit APIs and got tons of warnings now :p

@unicornzero
Copy link

I'm seeing a lot of deprecation warnings now that I've had to update faraday because of a critical dependency. Is there any word on getting this change into a release soon?

@claybridges
Copy link

In the meantime, I fixed this in my own usage (scripts) by putting this in my Gemfile:

gem 'octokit'
gem 'faraday', '1.7.0'

@kaiomagalhaes
Copy link

@ybiquitous thanks for your solution on: https://github.com/ybiquitous/octokit.rb/tree/issue-1357

I'll be using it until we get a final solution on master.

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 a pull request may close this issue.

5 participants