-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
bpo-40635: Fix getfqdn() docstring and docs #27971
Conversation
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.
Thanks Andrei, this LGTM. But let's hear from a socket/networking expert first (and whether they want a news item).
Doc/library/socket.rst
Outdated
host, if available. The first name which includes a period is selected. If FQDN is not | ||
available and *name* is empty or is ``'0.0.0.0'``, hostname from :func:`gethostname` is | ||
returned. Otherwise, *name* is returned unchanged. |
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.
Please don't exceed 79 characters per line.
host, if available. The first name which includes a period is selected. If FQDN is not | |
available and *name* is empty or is ``'0.0.0.0'``, hostname from :func:`gethostname` is | |
returned. Otherwise, *name* is returned unchanged. | |
host, if available. The first name which includes a period is selected. In | |
case no fully qualified domain name is available and *name* was provided, | |
it is returned unchanged. If *name* was empty or equal to ``'0.0.0.0'``, | |
the hostname as returned by :func:`gethostname` is returned. |
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.
'as returned ... is returned' reads a bit awkward I think, is it okay if I use the same wording as in your suggestion for the docstring? ; which is:
[...] hostname from gethostname() is returned.
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.
Sure, agreed. I just used what was originally in the doc but you're right that the docstring version is an improvement.
Co-authored-by: Łukasz Langa <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit fdcb675) Co-authored-by: andrei kulakov <[email protected]>
GH-27977 is a backport of this pull request to the 3.10 branch. |
GH-27978 is a backport of this pull request to the 3.9 branch. |
Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit fdcb675) Co-authored-by: andrei kulakov <[email protected]>
Thanks @ambv and @Fidget-Spinner for reviewing :) |
Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit fdcb675) Co-authored-by: andrei kulakov <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit fdcb675) Co-authored-by: andrei kulakov <[email protected]>
https://bugs.python.org/issue40635