Skip to content

Comments

Do not IDNA-encode IPv6 literal hosts in to_uri() (#188)#189

Open
mvaught02 wants to merge 1 commit intopython-hyper:masterfrom
mvaught02:ipv6-literal-host-fix
Open

Do not IDNA-encode IPv6 literal hosts in to_uri() (#188)#189
mvaught02 wants to merge 1 commit intopython-hyper:masterfrom
mvaught02:ipv6-literal-host-fix

Conversation

@mvaught02
Copy link

Summary

This PR fixes a long-standing bug in hyperlink.URL.to_uri() where plain IPv6 literal hosts (e.g., [::1]) are incorrectly passed to idna.encode().

This bug was originally reported in #68 and #188 and affects downstream users (e.g., treq) even on current releases.

@mvaught02
Copy link
Author

@wsanchez / @glyph can you give this one a look?

@glyph
Copy link
Collaborator

glyph commented Feb 21, 2026

ugh, looks like our CI needs some updates first, to catch up with more recent pythons and linuxes

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.

2 participants