Skip to content

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

Merged
tiran merged 4 commits into
python:mainfrom
tiran:gh-95415-availability-doc
Jul 29, 2022
Merged

gh-95415: Make availability directive consistent (GH-95416)#95416
tiran merged 4 commits into
python:mainfrom
tiran:gh-95415-availability-doc

Conversation

@tiran

@tiran tiran commented Jul 29, 2022

Copy link
Copy Markdown
Member

@tiran tiran added docs Documentation in the Doc dir needs backport to 3.11 only security fixes labels Jul 29, 2022
@tiran tiran force-pushed the gh-95415-availability-doc branch from 1c52b29 to 1e6b8cf Compare July 29, 2022 07:43
@ezio-melotti ezio-melotti self-requested a review July 29, 2022 07:56

@encukou encukou left a comment

Copy link
Copy Markdown
Member

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:

Comment thread Doc/library/os.rst Outdated
Comment thread Doc/library/os.rst
Comment thread Doc/tools/extensions/pyspecific.py Outdated
@tiran tiran requested a review from encukou July 29, 2022 12:57
@tiran tiran marked this pull request as ready for review July 29, 2022 13:23
@tiran tiran requested review from abalkin and pganssle as code owners July 29, 2022 13:23

@encukou encukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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
@tiran tiran deleted the gh-95415-availability-doc branch July 29, 2022 14:42
@miss-islington

Copy link
Copy Markdown
Contributor

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

@miss-islington

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 29, 2022

@ezio-melotti ezio-melotti left a comment

Copy link
Copy Markdown
Member

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.

Comment thread Doc/library/socket.rst
Comment thread Doc/library/socket.rst
.. availability:: most Unix platforms, possibly others.
.. availability:: Unix.

most Unix platforms.

Copy link
Copy Markdown
Member

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.

Comment thread Doc/library/threading.rst
has been terminated.

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

Copy link
Copy Markdown
Member

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.

Comment on lines +142 to +150
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
Copy Markdown
Member

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",
})

Comment thread Doc/library/os.rst
``socket.gethostbyaddr(socket.gethostname())``.

.. availability:: recent flavors of Unix.
.. availability:: Unix.

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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.

5 participants