Address warning: URI::RFC3986_PARSER warnings#1620
Merged
radar merged 1 commit intomikel:masterfrom Jan 21, 2025
Merged
Conversation
This commit addresses the following warnings below. ``` /path/to/mail/lib/mail/spec/mail/attachments_list_spec.rb:179: warning: URI::RFC3986_PARSER.escape is obsoleted. Use URI::RFC2396_PARSER.escape explicitly. /path/to/mail/lib/mail/spec/mail/utilities_spec.rb:386: warning: URI::RFC3986_PARSER.escape is obsoleted. Use URI::RFC2396_PARSER.escape explicitly. /path/to/mail/lib/mail/spec/mail/utilities_spec.rb:390: warning: URI::RFC3986_PARSER.unescape is obsoleted. Use URI::RFC2396_PARSER.unescape explicitly. /path/to/mail/lib/mail/utilities.rb:160: warning: URI::RFC3986_PARSER.escape is obsoleted. Use URI::RFC2396_PARSER.escape explicitly. /path/to/mail/lib/mail/utilities.rb:164: warning: URI::RFC3986_PARSER.unescape is obsoleted. Use URI::RFC2396_PARSER.unescape explicitly. /path/to/mail/lib/mail/utilities.rb:452: warning: URI::RFC3986_PARSER.unescape is obsoleted. Use URI::RFC2396_PARSER.unescape explicitly. /path/to/mail/lib/mail/utilities.rb:463: warning: URI::RFC3986_PARSER.escape is obsoleted. Use URI::RFC2396_PARSER.escape explicitly. ``` Ruby 3.4 changes URI::DEFAULT_PARSER to URI::RFC3986_Parser and deprecates some methods. URI::RFC3986_PARSER.make_regexp and URI::RFC3986_PARSER.make_regexp are used in the mail gem. This commit uses URI::RFC2396_PARSER only if it is available for these versions: - uri v0.12.2 for Ruby 3.2/3.1 - uri v0.13.1 for Ruby 3.3 - Ruby 3.4.0dev https://bugs.ruby-lang.org/issues/19266
|
I'm getting this deprecation too, please marge. |
rgaufman
approved these changes
Dec 22, 2024
radar
approved these changes
Jan 21, 2025
Collaborator
|
Thank you for this. ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit addresses the following warnings against Ruby 3.4.0.preview 2 below.
Ruby 3.4 changes URI::DEFAULT_PARSER to URI::RFC3986_Parser and deprecates some methods. URI::RFC3986_PARSER.make_regexp and URI::RFC3986_PARSER.make_regexp are used in the mail gem.
This commit uses URI::RFC2396_PARSER only if it is available for these versions:
Refer to https://bugs.ruby-lang.org/issues/19266