GH-123599: url2pathname()
: don't call gethostbyname()
by default by barneygale · Pull Request #132610 · python/cpython (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I 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.