Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Doc/library/os.rst:os.waitid absent on MacOS#104558

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

johnhawkinson
Copy link
Contributor

@johnhawkinsonjohnhawkinson commentedMay 16, 2023
edited by github-actionsbot
Loading

os.waitid() is disabled on MacOS, and that's not documented.
It's not precisely clear why its disabled, and it was discussed in#55021(deeplink) which was closed without resolution.

But regardless of why, the documentation needs to clearly reflect that the function is not available.

I've followed the model ofos.fdatasync() and noted the lack of availability in theNote section, rather than theAvailability section. Absent that precedent, I would have instead changedAvailability to Unix, not Emscripten, not Macos, not WASI, perhaps somewhat consistent withCLOCK_UPTIME_RAW intime.rst L866.

I hope this is appropriate for a PR without an Issue, but if I'm wrong, I apologize and am happy to file an Issue.


📚 Documentation preview 📚:https://cpython-previews--104558.org.readthedocs.build/

@bedevere-botbedevere-bot added awaiting review docsDocumentation in the Doc dir skip news labelsMay 16, 2023
@ghost
Copy link

ghost commentedMay 16, 2023
edited by ghost
Loading

All commit authors signed the Contributor License Agreement.
CLA signed

@johnhawkinson
Copy link
ContributorAuthor

os.waitid() is disabled on MacOS, and that's not documented.

I probably should have supported the statement that it's disabled, sorry.
As discussed in the linked issue, the disabling is from the&& !defined(__APPLE__) here:

#if defined(HAVE_WAITID)&& !defined(__APPLE__)
/*[clinic input]
os.waitid
idtype: idtype_t
Must be one of be P_PID, P_PGID or P_ALL.
id: id_t
The id to wait on.
options: int
Constructed from the ORing of one or more of WEXITED, WSTOPPED
or WCONTINUED and additionally may be ORed with WNOHANG or WNOWAIT.
/
Returns the result of waiting for a process or processes.
Returns either waitid_result or None if WNOHANG is specified and there are
no children in a waitable state.
[clinic start generated code]*/
staticPyObject*
os_waitid_impl(PyObject*module,idtype_tidtype,id_tid,intoptions)
/*[clinic end generated code: output=5d2e1c0bde61f4d8 input=d8e7f76e052b7920]*/
{

@ronaldoussoren
Copy link
Contributor

The more interesting question here is whyos.waitid is not exposed on macOS.

There's some discussion in#55021,waitid was not exposed for unclear reasons. IMHO we should expose it for macOS and if needed document limitations with the API (it was disabled for unspecified problems in versions of the OS that we no longer supported in our installers).

@johnhawkinson
Copy link
ContributorAuthor

The more interesting question here is whyos.waitid is not exposed on macOS.

You know…no it's not!

If it takes 6 months to get a doc fix in and 12 months to have a policy debate and maybe change the policy and get a code fix in, I am entirely uninterested in postponing the former in favor of the latter. Open a new PR or Issue to exposewaitid but don't hold up fixing the broken documentation now.

Thank you. I am not as bitter as I sound.

@ronaldoussoren
Copy link
Contributor

Thank you. I am not as bitter as I sound.

I don't know about other core devs, but personally I only regularly check GitHub issues for things to work on. That's mostly out of habit, but we do have a longstanding culture of having issues for almost all changes. I'm not going to argue that's a good thing, but it does explain why PRs without an issue can get lost and not get core dev attention.

Anyway, I'll file an issue about exposingos.waitid in 3.13 and will return to this PR soon with the intention to merge it.

johnhawkinson reacted with thumbs up emoji

@ronaldoussorenronaldoussoren added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsDec 28, 2023
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Copy link
Contributor

@ronaldoussorenronaldoussoren left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for the PR!

@ronaldoussorenronaldoussoren merged commitdb1c882 intopython:mainDec 28, 2023
@miss-islington-app
Copy link

Thanks@johnhawkinson for the PR, and@ronaldoussoren for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestDec 28, 2023
* Doc/library/os.rst: `os.waitid` absent on MacOS(cherry picked from commitdb1c882)Co-authored-by: John Hawkinson <jhawk@alum.mit.edu>Co-authored-by: AN Long <aisk@users.noreply.github.com>
@bedevere-app
Copy link

GH-113553 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelDec 28, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestDec 28, 2023
* Doc/library/os.rst: `os.waitid` absent on MacOS(cherry picked from commitdb1c882)Co-authored-by: John Hawkinson <jhawk@alum.mit.edu>Co-authored-by: AN Long <aisk@users.noreply.github.com>
@bedevere-app
Copy link

GH-113554 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelDec 28, 2023
ronaldoussoren pushed a commit that referenced this pull requestDec 29, 2023
…113553)Doc/library/os.rst: `os.waitid` absent on MacOS (GH-104558)* Doc/library/os.rst: `os.waitid` absent on MacOS(cherry picked from commitdb1c882)Co-authored-by: John Hawkinson <jhawk@alum.mit.edu>Co-authored-by: AN Long <aisk@users.noreply.github.com>
ronaldoussoren pushed a commit that referenced this pull requestDec 29, 2023
…113554)Doc/library/os.rst: `os.waitid` absent on MacOS (GH-104558)* Doc/library/os.rst: `os.waitid` absent on MacOS(cherry picked from commitdb1c882)Co-authored-by: John Hawkinson <jhawk@alum.mit.edu>Co-authored-by: AN Long <aisk@users.noreply.github.com>
kulikjak pushed a commit to kulikjak/cpython that referenced this pull requestJan 22, 2024
* Doc/library/os.rst: `os.waitid` absent on MacOSCo-authored-by: AN Long <aisk@users.noreply.github.com>
aisk added a commit to aisk/cpython that referenced this pull requestFeb 11, 2024
* Doc/library/os.rst: `os.waitid` absent on MacOSCo-authored-by: AN Long <aisk@users.noreply.github.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
* Doc/library/os.rst: `os.waitid` absent on MacOSCo-authored-by: AN Long <aisk@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@aiskaiskaisk left review comments

@ronaldoussorenronaldoussorenronaldoussoren approved these changes

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirOS-macskip issueskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@johnhawkinson@ronaldoussoren@aisk@arhadthedev@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp