-
Notifications
You must be signed in to change notification settings - Fork 982
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
deprecate three methods for version 2.0 #1446
Conversation
Thank you @hyuraku, one thing I'm not entirely happy about is that the existing warnings not only communicate which method has been deprecated and from where it was called, but they also provide a hint as to how to address them, and a link to the relevant documentation. Do you think it would be possible to extend |
I guess it's better to add
def deprecate(name, repl, ver)
--< omitted >--
msg = [
"NOTE: #{target_message} is deprecated",
repl == :none ? ' with no replacement' : "; use #{repl} instead. ",
"It will be removed in or after version #{gem_ver}",
"\n#{target}#{name} called from #{Gem.location_of_caller.join(':')}"
]
def deprecate(name, repl, ver, custom_message)
--< omitted >--
msg = [
"NOTE: #{target_message} is deprecated",
repl == :none ? ' with no replacement' : "; use #{repl} instead. ",
"It will be removed in or after version #{gem_ver}",
custom_message
"\n#{target}#{name} called from #{Gem.location_of_caller.join(':')}"
]
end |
Yeah, that would be perfect to share the link to the documentation or any other free-text valuable context on the deprecation 🙏! |
@iMacTia |
aa8e4a2
to
6df89e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @hyuraku for the changes and @olleolleolle for spotting the leftover line. LGTM!
Description
apply
Faraday#deprecate
to three deprecated methods for version 2.0.Request#method
Connection#token_auth
Connection#authorization
related with #1438
Todos
List any remaining work that needs to be done, i.e:
Additional Notes
Optional section