-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Undeprecate and document urllib.parse.unwrap #79578
Comments
The urllib.parse module contains an undocumented function unwrap:
This is useful. I've been re-inventing this function in many of my scripts, because I didn't know it existed (not documented!) and only stumbled across it by accident today, where I see it was deprecated in bpo-27485 but I can't see any reason for the deprecation. If not for the deprecation, I would certainly use this unwrap function in preference to rolling my own. It seems to me that this might have been a case of an over-enthusiastic change. bpo-27485 talks about deprecating the various split* functions, which are officially redundant (urlparse and urlsplit are preferred) but doesn't talk about unwrap, which is useful and (in my opinion) should have been documented rather than deprecated. |
I suspect the only reason was that unwrap was caught in the bag of «undocumented functions (that don‘t seem useful)». Personally I think I see more bare URLs than URLs in angle brackets these days, and `URL:` feels like an archaic marker :) But I don’t see any harm in un-deprecating and documenting the function now that you say you would find it useful. |
Thanks for the report and for the patch. :-) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: