Skip to content

Reject text paths in decoded replace#193

Open
Mirochill wants to merge 1 commit into
python-hyper:masterfrom
Mirochill:fix-176-decoded-path-text
Open

Reject text paths in decoded replace#193
Mirochill wants to merge 1 commit into
python-hyper:masterfrom
Mirochill:fix-176-decoded-path-text

Conversation

@Mirochill
Copy link
Copy Markdown

Summary

Make DecodedURL.replace(path=...) reject plain text strings for path, matching the existing behavior of URL(path=...).

Without this guard, DecodedURL.replace(path="support/woo") treats the string as an iterable and encodes it one character at a time, producing a character-by-character path.

Fixes #176.

Validation

Local tests were not run because this workspace policy forbids running third-party project tests locally.

Static validation allowed by the workspace policy:

  • git diff --check HEAD~1..HEAD

@Mirochill Mirochill marked this pull request as ready for review May 20, 2026 12:18
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.

if path-parameter in functions like replace is a string-like object, the function treats each character as path element

1 participant