-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Deprecate schemeless URLs? #2920
Comments
Totally agree that this is something worth fixing, thank you for doing all this research and opening this. My hope is that schemeless URLs aren't as widespread as we think and that we've been supporting this mostly for backwards compatibility and not because a large swath of the ecosystem relies on it. I think adding a |
In my experience these often occur in the Location header and require resolution per the specifications. I don't remember how urllib3 does redirect handling but this may be required to support that |
Hi, Some guidance would be much appreciated. |
Hey @kenballus, @sethmlarson Is this issue available for work on? |
@kenballus and I are working on this right now |
I removed support for schemeless URLs in a branch from my fork: Let me know if you want me to make a pull request Edit: Based off of and checked that it conforms with RFC 3986 specifications |
Closed in #2950 |
Thanks @Ousret! I've approved your expense in OpenCollective for $300 |
…thout a scheme (ie 'https://') are deprecated and will raise an error in a future version of urllib3. To avoid this DeprecationWarning ensure all URLs start with 'https://' or 'http://'. Read more in this issue: urllib3/urllib3#2920
Context
Schemeless URLs can cause a lot of parsing confusion because they aren't standardized in the RFC. Examples like the following are especially weird, and could cause problems when interoperability with other parsers matters:
Here are some popular URL parsers' interpretations:
urllib3:
cpython urllib:
furl:
hyperlink:
rfc3986:
yarl:
As you can see, we're the outlier here.
In my opinion, this is something worth fixing, but I imagine that schemeless URLs are in pretty widespread use with urllib3. Thus, we might consider adding a DeprecationWarning that encourages people to explicitly state their schemes.
The text was updated successfully, but these errors were encountered: