python-hyper/hyperlink

Applying `to_iri` on two `URL`s can make change the equality of URLs.

tomprince opened this issue · 0 comments

from hyperlink import URL
url1 = URL.from_text(u"http://example.test./,")
url2 = URL.from_text(u"http://example.test./%2c")
assert url1 != url2
assert url1.to_iri() == url2.to_iri()

It seems surprising to me that to_iri() provides a level of normalization that is not available via .normalize()

This seems related to #18 and #164.