| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| Fix issue where :func:`urllib.request.url2pathname` mishandled file URLs with | ||
| authorities. If an authority is present and resolves to ``localhost``, it is | ||
| now discarded. If an authority is present but *doesn't* resolve to | ||
| ``localhost``, then on Windows a UNC path is returned (as before), and on | ||
| other platforms a :exc:`urllib.error.URLError` is now raised. | ||
| Add *resolve_host* keyword-only parameter to | ||
| :func:`urllib.request.url2pathname`, and fix handling of file URLs with | ||
| authorities. |
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI wonder, should we check this before calling gethostname() which can fail?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI'm struggling to come up with firm info on when gethostname() fails (or whether it can perform network access). Do you have any pointers? Thanks.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI do not know.
But I was thinking about this case: processing the "file:" URL on different computer. We cannot use gethostname(), because it returns a different result. If we want to get a path on other computer, we should ignore the host name. There will still be problem with processing Windows paths on Posix and Posix paths on Windows.
I do not know how common this case, and how common the opposite case, when we only use gethostname(), but not gethostbyname(). We should guess what would be more useful for users without having any data.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.