GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — GH-125866: Support complete "file:" URLs in urllib by barneygale · Pull Request #132378 · python/cpython Conversation
|
|
Some Qs for reviewers:
Thanks in advance :] |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
If I were to chose one, I would use
I don't think we need to wait if we can ship them. Waiting means that users also wait for at least 2y until they can consider 3.15 as the stable release (and I guess many like having the latest stable release as their main version). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Bénédikt Tran <[email protected]>
|
Thank you for the review + feedback - much appreciated :) I'm not sure how I feel about |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
A bit, but at least users don't need to remember different names for the path->url and url->path functions. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Well, they didn't have to until we made the argument keyword-only 🙈 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
True! but on the other hand, if I see |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm going to ask on discord, as I like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
+1 for keyword-only (non-keyword boolean flags read poorly when called with boolean literals, and reducing the API surface by restricting the calling style generally makes future maintenance easier) For the parameter naming though, is the flag on I also think the ambiguity concern with a unified flag name is valid, so I'd be inclined to keep |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The prefix to remove would be >>> pathname2url('hello') 'hello' >>> url2pathname('foo:bar') 'foo:bar' >>> url2pathname('file:bar') 'file:bar' Though it's still very unlikely, I worry that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It was a pain to handle URLs like "file:123" where "file" was interpreted as a host name and "123" as a port number.. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
That makes sense - the input ambiguity would be much worse than I initially thought it would be. I'd suggest |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I hadn't thought about the expected contract and the parameter name so |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Just making sure that we have kw-only at runtime as well and LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I like require_scheme too! I've adjusted the PR to use that. One last thought: we could maybe accept a >>> url = 'file:///C:/Program%20Files' >>> url2pathname(url, scheme='file') 'C:\\Program Files' >>> path = 'C:\\Program Files' >>> pathname2url(path, scheme='file') 'file:///C:/Program%20Files' ... but I can't really think of a use case for values other than |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Bénédikt Tran <[email protected]>
I also don't know of another scheme for local paths and for which |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Some nits but you can go ahead whenever you want.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Bénédikt Tran <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.