-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
URNs produce the wrong result for .uri() method #2102
Comments
@tomschr I did a little research and found this list of URI schemas: https://en.wikipedia.org/wiki/List_of_URI_schemes Based on this list, schemas=['urn'] is not the right way because it's not in the list of URI schemas. I think it would be better to have a new method It's just opinion. |
Ahh, that's interesting. I didn't know, thanks!
I'm fine with using My only concern is that users will find it. So one way to ensure that could be:
|
In this case, it would be great to hear @fcurella opinion also. |
Thanks for this great project! ❤️
If you run the
.uri()
method and pass the URN (Uniform Resource Name) scheme, it returns the wrong result.Steps to reproduce
Consider the following snippet:
Expected behavior
URNs are described in RFC 1737 and later in RFC 2141, I would have expected to have something like this:
Find more examples in the Wikipedia article about Uniform Resource Name.
Actual behavior
At the moment, the URN scheme uses slashes (
/
) which is wrong according to the mentioned specs. As the method name.uri()
implies, it's the generic term for URNs and URLs.Possible solution
I can think about different solutions to solve this issue:
.uri()
method and return the correct result when a URN scheme is requested..urn()
method.Idea 1 would probably the more generic solution as it works for URLs and URNs. On the other hand, idea 2 would make URNs stick out.
The text was updated successfully, but these errors were encountered: