Rich likes this.
Luise Sanowsky reshared this.
The Collector™ reshared this.
HTTPX errors
@mimi89999 I Saw your PR for httpx at github.com/encode/httpx/pull/3…
I came across a different invalid IDNA domain but it is also still reachable like yours:
xn--lw8h.xn--9s9h.it.com can be reached: xn--lw8h.xn--9s9h.it.com
But httpx causes this:
File "/home/foo/bar/venv/lib/python3.13/site-packages/httpx/_urls.py", line 191, in host
host = idna.decode(host)
File "/usr/lib/python3/dist-packages/idna/core.py", line 430, in decode
s = ulabel(label)
File "/usr/lib/python3/dist-packages/idna/core.py", line 328, in ulabel
check_label(label)
~~~~~~~~~~~^^^^^^^
File "/usr/lib/python3/dist-packages/idna/core.py", line 277, in check_label
raise InvalidCodepoint(
"Codepoint {} at position {} of {} not allowed".format(_unot(cp_value), pos + 1, repr(label))
)
idna.core.InvalidCodepoint: Codepoint U+1F535 at position 1 of '🔵' not allowedCan you please add this to your PR, too?
@mimi89999 On my code I use the string's
encode("idna") and decode("idna") and they never complained? Maybe you can rewrite your PR to to switch to these functions?
Theaitetos (Рцяэыоод) likes this.
Rich
in reply to Roland Häder🇩🇪 • • •Roland Häder🇩🇪 likes this.
Roland Häder🇩🇪
in reply to Rich • •