X Tutup
The Wayback Machine - https://web.archive.org/web/20221223150251/https://github.com/python/cpython/pull/95416
Skip to content
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

gh-95415: Make availability directive consistent (GH-95416) #95416

Merged
merged 4 commits into from Jul 29, 2022

Conversation

tiran
Copy link
Member

@tiran tiran commented Jul 29, 2022

@tiran tiran force-pushed the gh-95415-availability-doc branch from 1c52b29 to 1e6b8cf Compare Jul 29, 2022
@ezio-melotti ezio-melotti self-requested a review Jul 29, 2022
Copy link
Member

@encukou encukou left a comment

Big +1 on the idea, some nitpicks:

Doc/library/os.rst Outdated Show resolved Hide resolved
Doc/library/os.rst Show resolved Hide resolved
Doc/tools/extensions/pyspecific.py Outdated Show resolved Hide resolved
@tiran tiran requested a review from encukou Jul 29, 2022
@tiran tiran marked this pull request as ready for review Jul 29, 2022
@tiran tiran requested review from pganssle and abalkin as code owners Jul 29, 2022
Copy link
Member

@encukou encukou left a comment

Looks good!

@tiran tiran changed the title gh-95415: Make availability directive consistent gh-95415: Make availability directive consistent (GH-95416) Jul 29, 2022
@tiran tiran merged commit f81a6c5 into python:main Jul 29, 2022
14 checks passed
@tiran tiran deleted the gh-95415-availability-doc branch Jul 29, 2022
@miss-islington
Copy link
Contributor

miss-islington commented Jul 29, 2022

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Jul 29, 2022

Sorry, @tiran, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker f81a6c5fc7b13bd2076bdb1481c6085e0ed67184 3.11

tiran added a commit to tiran/cpython that referenced this pull request Jul 29, 2022
…GH-95416).

(cherry picked from commit f81a6c5)

Co-authored-by: Christian Heimes <christian@python.org>
@bedevere-bot
Copy link

bedevere-bot commented Jul 29, 2022

GH-95438 is a backport of this pull request to the 3.11 branch.

Copy link
Member

@ezio-melotti ezio-melotti left a comment

A bit late to the party since the PR already got merged, but here is my review.

Doc/library/socket.rst Show resolved Hide resolved
.. availability:: most Unix platforms, possibly others.
.. availability:: Unix.

most Unix platforms.
Copy link
Member

@ezio-melotti ezio-melotti Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
most Unix platforms.
Most Unix platforms.

@@ -429,7 +431,7 @@ since it is impossible to detect the termination of alien threads.
system-wide) from the time the thread is created until the thread
has been terminated.

.. availability:: Requires :func:`get_native_id` function.
.. availability:: Windows, FreeBSD, Linux, macOS, OpenBSD, NetBSD, AIX, DragonFlyBSD.
Copy link
Member

@ezio-melotti ezio-melotti Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the previous sentence under the list of platforms.

known_platforms = frozenset({
"AIX", "Android", "BSD", "DragonFlyBSD", "Emscripten", "FreeBSD",
"Linux", "NetBSD", "OpenBSD", "POSIX", "Solaris", "Unix", "VxWorks",
"WASI", "Windows", "macOS",
# libc
"BSD libc", "glibc", "musl",
# POSIX platforms with pthreads
"pthreads",
})
Copy link
Member

@ezio-melotti ezio-melotti Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
known_platforms = frozenset({
"AIX", "Android", "BSD", "DragonFlyBSD", "Emscripten", "FreeBSD",
"Linux", "NetBSD", "OpenBSD", "POSIX", "Solaris", "Unix", "VxWorks",
"WASI", "Windows", "macOS",
# libc
"BSD libc", "glibc", "musl",
# POSIX platforms with pthreads
"pthreads",
})
known_platforms = frozenset({
"AIX", "Android", "BSD", "DragonFlyBSD", "Emscripten", "FreeBSD",
"Linux", "NetBSD", "OpenBSD", "POSIX", "Solaris", "Unix", "VxWorks",
"WASI", "Windows", "macOS",
# libc
"BSD libc", "glibc", "musl",
# POSIX platforms with pthreads
"pthreads",
})

@@ -706,7 +706,7 @@ process and user.
:func:`socket.gethostname` or even
``socket.gethostbyaddr(socket.gethostname())``.

.. availability:: recent flavors of Unix.
.. availability:: Unix.
Copy link
Member

@ezio-melotti ezio-melotti Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these get a note like Might not be available on less recent flavors of Unix. or Might not be available on some flavors of Unix.? Even better would be to be more specific (e.g. Not available on Unix flavors that ...).

Copy link
Member Author

@tiran tiran Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uname is available on all Unix-like platforms that we support. It was standardized in IEEE Std 1003.1-2001, https://pubs.opengroup.org/onlinepubs/009604599/functions/uname.html . Every POSIX-like OS released in the last 20 years should have it.

tiran added a commit that referenced this pull request Aug 1, 2022
…H-95438)

Co-authored-by: Christian Heimes <christian@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants
X Tutup