best-practices-badge icon indicating copy to clipboard operation
best-practices-badge copied to clipboard

Fix Faraday deprecations

Open david-a-wheeler opened this issue 3 years ago • 6 comments

When running the test suite we see deprecation warnings; we need to fix them.

The warnings are:

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

david-a-wheeler avatar Dec 20 '21 17:12 david-a-wheeler

Upgraded Faraday but we get warnings because of https://github.com/vcr/vcr/discussions/922

andrewfader avatar Apr 11 '23 07:04 andrewfader

Hmmm. Not sure what to do here. I wonder if there's a reasonable alternative to vcr.

david-a-wheeler avatar Apr 11 '23 15:04 david-a-wheeler

@david-a-wheeler there are alternatives but I think vcr is the best-maintained and de facto standard gem for this purpose for ruby. It's kind of unfortunate that their license is too restrictive to be usable now. Even though the hippocratic license is actually just an MIT license with some kind of moral good clause that's probably legally moot anyway.

andrewfader avatar Apr 11 '23 16:04 andrewfader

@david-a-wheeler we could also fork the last permissively licensed version of vcr and, having not looked at their fixes, clean-room update and fix the Faraday problems. We could call it vcr-libre and release it too.

andrewfader avatar Apr 11 '23 17:04 andrewfader

That'd be commit 842b2bf89099dc91f2c643d0d85d1abd54eb7e85 of vcr. It's packaged in GNU Guix as ruby-vcr-expat with a prominent comment about not updating it from such commit (due to the license being nonfree for later versions).

Apteryks avatar Apr 11 '23 18:04 Apteryks

I hate to fork, that's not a good long-term solution & cherry-picking commits may have licensing questions as well.

The vcr gem is only used during testing, it's not run in production, and it's not something we create (we're just using it). So maybe we can make an exception for vcr. I'll have to pass it through LF legal.

david-a-wheeler avatar Apr 11 '23 19:04 david-a-wheeler