Skip to content

Remove userinfo support from URL - #154

Open
inanpy wants to merge 1 commit into
mainfrom
refactor/remove-url-userinfo
Open

inanpy wants to merge 1 commit into
mainfrom
refactor/remove-url-userinfo

Conversation

@inanpy

@inanpy inanpy commented Nov 21, 2026 •

Copy link
Copy Markdown
  • Removed username, password, userinfo attributes and keyword arguments from URL, including copy_with().

  • Userinfo URLs are still supported, but the credentials are dropped on parse and excluded from the resulting URL:

url = hip.URL("https://user:password@example.com/path") 
print(url)
# https://example.com/path
  • Removed code that was encoding usernames and passwords.

  • Updated the docstrings and the related examples.

  • Added tests that userinfo is ignored and removed properties and arguments are not accepted.

Tests include =>

  • Copying and joining URLs
  • IPv6 Addressing
  • Ignoring URL encoded user names and passwords.
  • Rejecting the removed keyword arguments.
  • Verify the deleted properties are no longer accessible.

221 tests passed, plus ruff and mypy checks.

Closes #122

@inanpy
inanpy requested review from cgl and lovelydinosaur November 21, 2026 22:32

This branch has not been deployed

No deployments
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.

🛑 Deprecate username/password support in URL.

1 participant