Skip to content

Resolve deprecation warnings about uri DEFAULT_PARSER#2242

Merged
ioquatix merged 1 commit into
rack:mainfrom
Earlopain:uri-default-parser
Aug 29, 2024
Merged

Resolve deprecation warnings about uri DEFAULT_PARSER#2242
ioquatix merged 1 commit into
rack:mainfrom
Earlopain:uri-default-parser

Conversation

@Earlopain

Copy link
Copy Markdown
Contributor

Ruby switches the default parser from RFC2396 to RFC3986. This parser contains all methods from the old parser but delegates to RFC2396 for a few and warns. Namely extract, make_regexp, escape,and unescape.

Since the RFC2396 alias is not available for old rubies, do a defined check and select the appropriate one. This will work for all versions without warnings.

Additional info:

While this removes the warning and passes tests, I can't describe the possible impact for continuing to use the older parser like this. I'll leave that up to someone with more domain knowledge, consider this a notice about the warning if that turns out to be important.

@ioquatix

Copy link
Copy Markdown
Member

This looks good to me, but I'll fix the external tests tomorrow.

@ioquatix ioquatix force-pushed the uri-default-parser branch from e882c52 to 5b22114 Compare August 29, 2024 02:00
Ruby switches the default parser from RFC2396 to RFC3986. This parser contains
all methods from the old parser but delegates to RFC2396 for a few and warns.
Namely `extract`, `make_regexp`, `escape`,and `unescape`.

Since the RFC2396 alias is not available for old rubies, do a defined check and select the appropriate one.
This will work for all versions without warnings.
@ioquatix ioquatix force-pushed the uri-default-parser branch from 5b22114 to 29adcec Compare August 29, 2024 02:01
@ioquatix ioquatix merged commit 3d0b9f3 into rack:main Aug 29, 2024
@ioquatix

Copy link
Copy Markdown
Member

Thanks for your contribution and the great commit message.

@Earlopain Earlopain deleted the uri-default-parser branch September 27, 2024 15:13
Earlopain added a commit to Earlopain/rack that referenced this pull request Oct 2, 2024
Ruby switches the default parser from RFC2396 to RFC3986. This parser contains
all methods from the old parser but delegates to RFC2396 for a few and warns.
Namely `extract`, `make_regexp`, `escape`,and `unescape`.

Since the RFC2396 alias is not available for old rubies, do a defined check and select the appropriate one.
This will work for all versions without warnings.
ioquatix pushed a commit that referenced this pull request Oct 14, 2024
Ruby switches the default parser from RFC2396 to RFC3986. This parser contains
all methods from the old parser but delegates to RFC2396 for a few and warns.
Namely `extract`, `make_regexp`, `escape`,and `unescape`.

Since the RFC2396 alias is not available for old rubies, do a defined check and select the appropriate one.
This will work for all versions without warnings.
Earlopain pushed a commit to Earlopain/rack that referenced this pull request Jan 30, 2025
Ruby switches the default parser from RFC2396 to RFC3986. This parser contains
all methods from the old parser but delegates to RFC2396 for a few and warns.
Namely `extract`, `make_regexp`, `escape`,and `unescape`.

Since the RFC2396 alias is not available for old rubies, do a defined check and select the appropriate one.
This will work for all versions without warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants