-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AbstractURL type #127
Comments
I think this is tempting but probably wrong. Pretty much nothing should be treating a decoded URL as encoded or vice-versa. What kind of code wants a shared type? |
In twisted/treq#279 I was looking to accept both. Almost all treq needs is the ability to ultimately convert to There is a code path there that conditionally wants if params:
decoded_url = parsed_url.get_decoded_url()
parsed_url = decoded_url.replace(
query=decoded_url.query + tuple(_coerced_query_params(params))
).encoded_url So that is part of the motivation for my previous comment, particularly that The other part of my motivation is that I wanted to make sure that |
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, asURL
is already taken for legacy reasons.To quote @twm:
Further discussion to follow, no doubt.
The text was updated successfully, but these errors were encountered: