Description
Per @wsanchez and @twm in #126, consensus seems to be that hyperlink would benefit from an interface/ABC which could be for both DecodedURL and URL/EncodedURL.
AbstractURL
is the current name frontrunner, as URL
is already taken for legacy reasons.
These methods seem to be equivalent between URL and DecodedURL in the sense that they do semantically identical things:
to_text() to_uri() to_iri() normalize() absolute scheme port rooted
__bytes__
should probably be on this list (per #55). DecodedURL appears to lack it.I'd also suggest that URL's get_decoded_url() method and DecodedURL's encoded_url property should be part of any common interface. This would be useful in treq to avoid a chain of isinstance() checks.
click() is also similar between the two, though only the DecodedURL version accepts a DecodedURL.
Further discussion to follow, no doubt.