-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-95415: Make availability directive consistent (GH-95416) #95416
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
Conversation
tiran
commented
Jul 29, 2022
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Make "availability" directive consistent and parsable #95415
1c52b29
to
1e6b8cf
Compare
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.
Big +1 on the idea, some nitpicks:
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.
Looks good!
Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, @tiran, I could not cleanly backport this to |
…GH-95416). (cherry picked from commit f81a6c5) Co-authored-by: Christian Heimes <[email protected]>
GH-95438 is a backport of this pull request to the 3.11 branch. |
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.
A bit late to the party since the PR already got merged, but here is my review.
.. availability:: most Unix platforms, possibly others. | ||
.. availability:: Unix. | ||
|
||
most Unix platforms. |
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.
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. |
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.
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", | ||
}) |
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.
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. |
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.
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 ...
).
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.
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.
…H-95438) Co-authored-by: Christian Heimes <[email protected]>