| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…latforms Add HAVE_DUP3_RUNTIME / HAVE_PIPE2_RUNTIME weak-linking so Xcode 27 SDKs do not crash on macOS < 27 when the symbols are weak_import NULL.
Sorry, something went wrong.
There was a problem hiding this comment.
Here are some automated review suggestions for this pull request.
Reviewed commit: e5fbe3bb60
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
|
|
||
| .. availability:: Unix, not WASI, not macOS, not iOS. | ||
| .. availability:: Unix, not WASI. Availability on macOS requires macOS 27.0 | ||
| or later; availability on iOS requires iOS 27.0 or later. |
There was a problem hiding this comment.
Keep pipe2 documented as unavailable on iOS
The new iOS availability claim is inaccurate even on iOS 27: configure.ac:5526-5532 unconditionally skips the pipe2 feature check whenever ac_sys_system is iOS, so HAVE_PIPE2 remains undefined and the module never exports os.pipe2. Either retain not iOS here or change the iOS configure policy to enable the function where supported.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
| #endif | ||
|
|
||
| #if defined(HAVE_PIPE2) | ||
| if (HAVE_PIPE2_RUNTIME) {} else { |
There was a problem hiding this comment.
Guard the remaining direct pipe2 call at compile time
When building with an Xcode 27 SDK for a macOS deployment target below 27, removing pipe2 from the module dictionary happens too late to make the build succeed: os_pipe2_impl still calls the availability-annotated pipe2 unguarded at Modules/posixmodule.c:12861, while configure.ac:2797-2802 promotes Clang's unguarded-availability diagnostic to an error. The call needs a lexical availability guard or the same targeted diagnostic suppression used for the runtime-removed preadv/pwritev methods.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
The availability extension only accepts comma-separated known platforms (optionally with 'not ' / '>= version'). Free-form prose after 'not WASI.' was parsed as an unknown platform and failed Docs EPUB/doctest with warnings-as-errors.
There was a problem hiding this comment.
Here are some automated review suggestions for this pull request.
Reviewed commit: 548b366f3b
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
| respectively. | ||
|
|
||
| .. availability:: Unix, not WASI, not macOS, not iOS. | ||
| .. availability:: Unix, not WASI, macOS >= 27.0, iOS >= 27.0. |
There was a problem hiding this comment.
Correct the iOS availability claim
The documentation promises os.pipe2 on iOS 27+, but configure.ac deliberately skips the AC_CHECK_FUNCS invocation containing pipe2 whenever ac_sys_system is iOS (lines 5526–5532). Consequently HAVE_PIPE2 is never defined and the method is not compiled or exported on any iOS version; either enable the configure check for supported iOS versions or continue documenting this as unavailable on iOS.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Documentation build overview2 files changed ± library/os.html ± whatsnew/changelog.html |
Sorry, something went wrong.
|
Closing this PR. Thank you for the review attention. |
Sorry, something went wrong.
Based on pythonGH-154718 Co-Authored-By: Vamsi-klu <nrvamsi13@gmail.com>
Based on pythonGH-154718 Co-Authored-By: Vamsi-klu <nrvamsi13@gmail.com>
| Back | FazBrowse Home | New Git URL |
Summary
Fix gh-153711 (deferred-blocker): when CPython is built with an Xcode 27 SDK, dup3 / pipe2 are detected at configure time but only exist at runtime on macOS / iOS 27+. On older OSes they bind as weak_import NULL and the first os.pipe() / non-inheritable os.dup2() jumps to address 0.
What the issue is
iOS was already excluded from the configure check (gh-150443 / #150444). macOS was not. The issue body already points at the gh-97897 (mkfifoat/mknodat) weak-linking pattern.
Why I solved it that way
How I did it
Impact
Testing plan
Everything else
Requested reviewers (subject-matter experts)
Could the following SMEs take a look when convenient (I cannot formally request reviews from this fork account):
Thank you!