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

Add cross-support for Faraday 1.x.x and 2.x.x #1388

Closed
ashishkeshan opened this issue Jan 10, 2022 · 6 comments
Closed

Add cross-support for Faraday 1.x.x and 2.x.x #1388

ashishkeshan opened this issue Jan 10, 2022 · 6 comments
Labels
Type: Feature New feature or request

Comments

@ashishkeshan
Copy link
Contributor

With the merge of: #1359 to silenece deprecation warnings, and based on the comment here: #1359 (comment), we will need to modify the code to cross-support Faraday 1.x.x and 2.x.x when octokit pulls in the latest version of Faraday. Opening this issue now to track the work necessary when the times comes.

@klueless-io
Copy link

I'm not sure if this is related, but when I run this code

Octokit::Client.new(access_token: token)

I get this warning

WARNING: Faraday::Connection#authorization is deprecated; it will be removed in version 2.0.
While initializing your connection, use #request(:authorization, ...) instead

I'm aware of this Faraday Middleware Guide but I'm not sure how this relates to Octokit::Client

Is there a way of suppressing the warning with Octokit at the moment?

@dsandstrom
Copy link

dsandstrom commented Jan 12, 2022

@klueless-io It's what #1359 addresses. The fix is not published yet, but you could use the github version of the gem.

gem 'octokit', github: 'octokit/octokit.rb', tag: '4-stable'

Edit: I noticed a new version (4.22.0) was published today, so above not required now.

pulkit110 added a commit to gatemedia/github-cookbook that referenced this issue Jan 26, 2022
Octokit 4.22.0 not compatible with legacy faraday versions.

see octokit/octokit.rb#1391
see octokit/octokit.rb#1392
see octokit/octokit.rb#1388

fix gatemedia/gmp-os#218
@professor
Copy link

Thanks for doing this work.

Note that for octokit to be installed with Faraday 2.x.x, we'll need to bump sawyer to either 0.9.0 or 0.9.1

@nickfloyd
Copy link
Contributor

Cross-referencing given that v4.23.0 introduces v2 support via #1411

@nickfloyd
Copy link
Contributor

This is now supported from v4.23.0 and on. I'm closing this issue but if you feel that the latest releases have not solved this please feel free to repoen this and we'll have a look.

@nickfloyd nickfloyd added Type: Feature New feature or request and removed feature labels Oct 28, 2022
pulkit110 added a commit to gatemedia/github-cookbook that referenced this issue Mar 19, 2024
Octokit 4.22.0 not compatible with legacy faraday versions.

see octokit/octokit.rb#1391
see octokit/octokit.rb#1392
see octokit/octokit.rb#1388

fix gatemedia/gmp-os#218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants