Skip to content

feat: deprecate url_encode/url_decode/parse_url URL surface (PUNY-vpegoytz)#22

Merged
bart-turczynski merged 3 commits into
mainfrom
feature/deprecate-url-surface
Jun 16, 2026
Merged

feat: deprecate url_encode/url_decode/parse_url URL surface (PUNY-vpegoytz)#22
bart-turczynski merged 3 commits into
mainfrom
feature/deprecate-url-surface

Conversation

@bart-turczynski

Copy link
Copy Markdown
Owner

Summary

Phase 2a of item C (parent audit PUNY-emjvtzlr): deprecate the best-effort URL surface ahead of removal next release. Confirmed safe — nothing upstack consumes punycoder's URL functions (rurl parses via curl::curl_parse_url and only calls puny_encode/puny_decode for the host; pslr uses host_normalize/puny_decode). Pure API wind-down, not a migration.

  • url_encode() / url_decode() / parse_url() now emit a .Deprecated() warning pointing callers at rurl (URL parsing/canonicalization) and host_normalize()/puny_encode()/puny_decode() (host-only needs).
  • The three are marked @keywords internal but remain exported and fully functional this release.
  • NEWS.md announces the deprecation and planned removal.
  • C++ (punycoder_url.cpp), Rcpp shims, and runtime behaviour are unchanged.

Tests

  • New dedicated test asserts the deprecatedWarning is emitted and its message names the replacement surface.
  • Behavioural tests wrap their bodies in a deprecatedWarning muffler (suppress_url_deprecation()) so they stay focused on behaviour; NA-input warnings still surface for the tests that expect them.
  • Full suite green: [ FAIL 0 | WARN 0 | SKIP 0 | PASS 382 ]. Zero new lint violations.

Removal is tracked separately as phase 2b (PUNY-rumdaymk).

🤖 Generated with Claude Code

bart-turczynski and others added 3 commits June 16, 2026 22:03
…goytz)

Phase 2a of item C: wind down the best-effort URL surface in favour of
`rurl` for URL parsing/canonicalization and host_normalize()/puny_encode()/
puny_decode() for host-only needs.

- Add .Deprecated() warnings to the three R wrappers, pointing callers at
  the replacement surface; mark them @Keywords internal (kept exported and
  fully functional this release).
- NEWS.md: announce deprecation + planned removal next release.
- Tests: assert the deprecation warning (class + replacement-surface hints);
  wrap the behavioural tests in a deprecatedWarning muffler so the suite
  stays green and NA-input warnings still surface where expected.

C++ (punycoder_url.cpp), Rcpp shims, and runtime behaviour are unchanged.
Removal is tracked separately as phase 2b (PUNY-rumdaymk).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ytz)

The dev heading embedded both the version and '(development version)',
which the news-version gate accepts in neither form. Use the standard
'# punycoder (development version)' so the check passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The lint gate (LINTR_ERROR_ON_LINT) surfaced 8 pre-existing line-length
violations in normalize.R and the normalize/idna-conformance test files,
unrelated to the deprecation slice but blocking this PR's CI. Rewrap the
long lines (and split one long profile-token literal via paste0) so
lint_package() reports zero. No behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bart-turczynski bart-turczynski merged commit 695379f into main Jun 16, 2026
5 checks passed
@bart-turczynski bart-turczynski deleted the feature/deprecate-url-surface branch June 16, 2026 21:08
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.

1 participant