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

Model version setting option and Faraday deprecation fixes #75

Merged
merged 4 commits into from
Dec 22, 2021

Conversation

evgeniy-b
Copy link
Contributor

@evgeniy-b evgeniy-b commented Dec 3, 2021

Purpose

When using the current release (1.0.1), I've encountered some problems which this PR fixes:

  1. model_version setting was not properly treated in faraday_client helper method due to operator priority (&& operator has higher priority than assignment operator)
  2. model_version check expects numeric values, but module load treated the value as a string (by using gsub method)
  3. Faraday has changed how basic auth should be setup and was printing a deprecation warning
  4. gemspec used deprecated has_rdoc setting

Faraday deprecation message:

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.

Gemspec deprecation message:

NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2018-12-01. Gem::Specification#has_rdoc= called from trino-client-ruby/trino-client.gemspec:18.

Overview

  • Fix model_version setting
  • Fix faraday deprecation
  • Fix gemspec deprecation

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary

NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It 
will be removed on or after 2018-12-01. Gem::Specification#has_rdoc= 
called from 
/Users/evgeniy.belyaev/Projects/trino-client-ruby/trino-client.gemspec:18.
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.
@evgeniy-b evgeniy-b requested a review from a team as a code owner December 3, 2021 13:39
@yuokada
Copy link
Contributor

yuokada commented Dec 22, 2021

Copy link
Member

@takezoe takezoe left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for fixing these!

@takezoe takezoe merged commit 4cdd21f into treasure-data:master Dec 22, 2021
composerinteralia added a commit to composerinteralia/trino-client-ruby that referenced this pull request Jun 4, 2024
Trino 1.0.2 includes some Faraday compatibility changes:

treasure-data#73
treasure-data#75

But neither of those changes make the gem incompatible with Faraday
0.6.6.

This commit relaxes the version so we can upgrade Presto and Faraday
independently. Once we are on Faraday 1.x we can go back to the official
release of this gem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants