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-60856: Be explicit about localhost for socket.getfqdn by slateny · Pull Request #93451 · python/cpython Conversation
|
|
Noticed there's duplicate wording in the last sentence, will change the PR for that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Return a fully qualified domain name for *name*. If *name* is omitted or empty, | ||
| it is interpreted as the local host. To find the fully qualified name, the | ||
| Return a fully qualified domain name for *name*. If *name* is empty or equal to | ||
| ``'0.0.0.0'``, the hostname from :func:`gethostname` is returned. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is it so? Looking at the sources, it tries to return one of names returned by gethostbyaddr(gethostname()).
The new wording also leaves unclear what getfqdn() returns.
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.
The source/behavior was changed in #100375 after this PR was opened, so wording definitely does need updating.
Regarding the unclear new wording, could you expand on that? My interpretation is that previously the entire paragraph needs to be read through before the return of getfqdn(), but now it's right at the top: If *name* is empty ...
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.
Now it starts from the rare corner case (why would anyone pass an empty name to getfqdn()?), but the documentation for getfqdn() without arguments is removed.
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.
You are very correct, leaving out the empty argument is my mistake. What do you think about this instead?
Return a fully qualified domain name for *name*.
To find the fully qualified name, ...
...
... it is returned unchanged.
If *name* is empty, or equal to "0.0.0.0," "::", or "",
the hostname from :func:`gethostname` is returned.
There's also an option of changing getfqdn([name]) to getfqdn(name=''), but not sure if it helps with improving the wording much.
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.
I think that both changing the wording and changing the signature are worth to do.
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.
Done, let me know if there's anything that looks off. For reference, here's the preview of getfqdn.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| *backlog* is the queue size passed to :meth:`socket.listen`; if not specified | ||
| , a default reasonable value is chosen. | ||
| *backlog* is the queue size passed to :meth:`socket.listen`; if not | ||
| specified, a default reasonable value is chosen. |
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.
Small formatting fix to remove space before comma for this:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The following commit authors need to sign the Contributor License Agreement: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR has been blocked on an unsigned CLA for more than 12 months and cannot be merged until all commit authors sign. Closing to cull the number of open pull requests. Do not reopen this pull request without signing the CLA first and getting a go-ahead from a triager or core developer on gh-60856. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.