Skip to content

gh-153711: Add runtime guards for dup3 & pipe2 - #155174

Merged
hugovk merged 6 commits into
python:mainfrom
encukou:dup3-pipe2
Aug 5, 2026
Merged

gh-153711: Add runtime guards for dup3 & pipe2#155174
hugovk merged 6 commits into
python:mainfrom
encukou:dup3-pipe2

Conversation

@encukou

@encukou encukou commented Aug 4, 2026

Copy link
Copy Markdown
Member

This is based on GH-154718 -- I made some changes, then checked @Vamsi-klu's closed PR and realized the work is already nearly done. So, credit where it's due.

This is for macOS only; extending to iOS & others should not be hard but it seems best to test on desktop first.

@ned-deily, do you have the hardware/software to test this easily?

Based on pythonGH-154718

Co-Authored-By: Vamsi-klu <nrvamsi13@gmail.com>
@encukou
encukou requested review from a team and ned-deily August 4, 2026 12:52
@encukou encukou changed the title Add runtime guards for dup3 & pipe2 gh-153711: Add runtime guards for dup3 & pipe2 Aug 4, 2026
@read-the-docs-community

read-the-docs-community Bot commented Aug 4, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33919133 | 📁 Comparing c36cca8 against main (ef0affb)

  🔍 Preview build  

2 files changed
± library/os.html
± whatsnew/changelog.html

@ned-deily ned-deily 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.

Other than the two minor fixes for legacy builds, this looks really good. I built and ran test_os on macOS 26 and 27 and on macOS 10.15 with no build failures or regressions. Thank you!

Comment thread Modules/posixmodule.c Outdated
Comment thread Modules/posixmodule.c Outdated
@bedevere-app

bedevere-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@ned-deily ned-deily added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 5, 2026
@ned-deily

Copy link
Copy Markdown
Member

Considering that older Pythons (3.14 and earlier) are nearing the end of their lives and the absence of dup3 and pipe2 on macOS has not been an issue AFAIK, let's take @encukou's suggestion to just ignore them in configure.ac as we do for iOS.

@hugovk
hugovk merged commit f33a5f5 into python:main Aug 5, 2026
101 of 104 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

GH-155202 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 5, 2026
hugovk pushed a commit that referenced this pull request Aug 5, 2026
…55202)

gh-153711: Add runtime guards for dup3 & pipe2 (GH-155174)
(cherry picked from commit f33a5f5)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Vamsi-klu <nrvamsi13@gmail.com>
Co-authored-by: Ned Deily <nad@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants