Use RFC2396_PARSER explicitly to avoid the warning.#2509
Merged
solnic merged 4 commits intogetsentry:masterfrom Jan 20, 2025
Merged
Use RFC2396_PARSER explicitly to avoid the warning.#2509solnic merged 4 commits intogetsentry:masterfrom
solnic merged 4 commits intogetsentry:masterfrom
Conversation
4d06152 to
53716e0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2509 +/- ##
=======================================
Coverage 98.16% 98.16%
=======================================
Files 128 128
Lines 4848 4849 +1
=======================================
+ Hits 4759 4760 +1
Misses 89 89
|
solnic
reviewed
Jan 17, 2025
Collaborator
solnic
left a comment
There was a problem hiding this comment.
Thank you for the PR! Please update to latest master though as we had some issues with the spec suite that should be fixed on master now.
53716e0 to
db9bab0
Compare
solnic
requested changes
Jan 20, 2025
Collaborator
solnic
left a comment
There was a problem hiding this comment.
Looks like in older rubies the constant does not exist:
uninitialized constant URI::RFC2396_PARSER
This is from 2.5 tests. There are more failing test suites with this error unfortunately, so we gotta have a fallback mechanism to make this work for old rubies too.
Contributor
Author
|
Thanks for checking the tests so quickly, great catch! |
solnic
reviewed
Jan 20, 2025
solnic
approved these changes
Jan 20, 2025
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.
Description
The URI library recently changed the
URI::DEFAULT_PARSERtoURI::RFC3986_PARSER.https://github.com/ruby/uri/blob/master/lib/uri/common.rb#L22
Additionally, when using the
URI::RFC3986_PARSER.escapemethod a warning is logged, telling that the method is obsolete and thatURI::RFC2396_PARSER.escapeshould be used explicitly instead.https://github.com/ruby/uri/blob/master/lib/uri/rfc3986_parser.rb#L155-L159
This results in a lot of warnings logged to stderr. This simple fix should do the trick :)