From f17a6499b03e66f147f9cf8163a6e4b3d6921701 Mon Sep 17 00:00:00 2001 From: native-api Date: Thu, 17 Sep 2026 04:58:50 +0300 Subject: [PATCH] Backport XCode 27 support to 3.11 (#3548) Adapted 3.12 downstream patch --- ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 117 ++++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ ...gh-153711-Avoid-use-of-dup3-and-pipe.patch | 109 ++++++++++++++++ 17 files changed, 1861 insertions(+) create mode 100644 plugins/python-build/share/python-build/patches/3.11.0/Python-3.11.0/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.1/Python-3.11.1/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.10/Python-3.11.10/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.11/Python-3.11.11/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.12/Python-3.11.12/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.13/Python-3.11.13/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.14/Python-3.11.14/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.15/Python-3.11.15/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.16/Python-3.11.16/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.2/Python-3.11.2/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.3/Python-3.11.3/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.4/Python-3.11.4/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.5/Python-3.11.5/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.6/Python-3.11.6/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.7/Python-3.11.7/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.8/Python-3.11.8/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch create mode 100644 plugins/python-build/share/python-build/patches/3.11.9/Python-3.11.9/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch diff --git a/plugins/python-build/share/python-build/patches/3.11.0/Python-3.11.0/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.0/Python-3.11.0/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..b3630271 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.0/Python-3.11.0/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 7ebb74cb3b6b0b163d3bd07ea2ef21e5446c505b Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 784f8d30609..bc7c194e866 100755 +--- a/configure ++++ b/configure +@@ -14966,7 +14966,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -14976,7 +14976,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15019,6 +15019,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index ab5e1de6fab..f70d17f4cdb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4543,7 +4543,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4553,7 +4553,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4575,6 +4575,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.1/Python-3.11.1/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.1/Python-3.11.1/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..c7c544ea --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.1/Python-3.11.1/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 23afa3cb08eb7a95c5549e46c6275af3bbf0bc93 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 9567ac3a62c..65ed2916e09 100755 +--- a/configure ++++ b/configure +@@ -15158,7 +15158,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15168,7 +15168,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15211,6 +15211,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index 90008bcae17..0816d477558 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4582,7 +4582,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4592,7 +4592,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4614,6 +4614,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.10/Python-3.11.10/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.10/Python-3.11.10/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..de9acc3c --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.10/Python-3.11.10/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 531b50ba6658c58f015de4f4f8aef8d3ef03ca0d Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index a1ad0ae2510..76a3eec37be 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index 7b4000fa9c3..44167040f3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.11/Python-3.11.11/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.11/Python-3.11.11/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..40817321 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.11/Python-3.11.11/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 5699cd1a15ba3f0474ad61aaeb94ad1ad2dfc833 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index a1ad0ae2510..76a3eec37be 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index 7b4000fa9c3..44167040f3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.12/Python-3.11.12/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.12/Python-3.11.12/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..4f83984c --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.12/Python-3.11.12/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From b8b17a685e1e4beac5a00540dde764213200a724 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index a1ad0ae2510..76a3eec37be 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index 7b4000fa9c3..44167040f3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.13/Python-3.11.13/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.13/Python-3.11.13/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..5498df1e --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.13/Python-3.11.13/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 2fa150b3f0bce148cda2d2acf10973941580e9c8 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index a1ad0ae2510..76a3eec37be 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index 7b4000fa9c3..44167040f3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.14/Python-3.11.14/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.14/Python-3.11.14/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..c67d75f3 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.14/Python-3.11.14/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From c721b82ced0789df0643b87327440bea4fa8062c Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index a1ad0ae2510..76a3eec37be 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index 7b4000fa9c3..44167040f3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.15/Python-3.11.15/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.15/Python-3.11.15/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..33ab1f3e --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.15/Python-3.11.15/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 3f03fe05c04c7dbd8ff3206c7f56d41638c90681 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 5ffa02dcb5b..1b90ed0d119 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index bfc99cc4268..08c7df52a7a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.16/Python-3.11.16/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.16/Python-3.11.16/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..0025217f --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.16/Python-3.11.16/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 29e98f7040994fa86bf63845b00ab9a4d80f5931 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index a1ad0ae2510..76a3eec37be 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index 7b4000fa9c3..44167040f3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.2/Python-3.11.2/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.2/Python-3.11.2/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..c58a2ed1 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.2/Python-3.11.2/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From d1ea67d806c3f9370a0217902fd06f93dfbd58ae Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 9e76287725b..7bb2018d9b9 100755 +--- a/configure ++++ b/configure +@@ -15160,7 +15160,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15170,7 +15170,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15213,6 +15213,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index c62a565eb68..8b618d89fb6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4582,7 +4582,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4592,7 +4592,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4614,6 +4614,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.3/Python-3.11.3/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.3/Python-3.11.3/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..6a0ba038 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.3/Python-3.11.3/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From a6a677bd661d3e1230d376787dc365519746d051 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 9e76287725b..7bb2018d9b9 100755 +--- a/configure ++++ b/configure +@@ -15160,7 +15160,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15170,7 +15170,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15213,6 +15213,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index c62a565eb68..8b618d89fb6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4582,7 +4582,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4592,7 +4592,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4614,6 +4614,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.4/Python-3.11.4/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.4/Python-3.11.4/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..89ac226f --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.4/Python-3.11.4/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,117 @@ +From 9b4547ee5f8d1d3d00fb0383a1c5e65cc1aa1b86 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++ + configure | 31 ++++++++++++------- + configure.ac | 11 +++++-- + 3 files changed, 31 insertions(+), 14 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index a66a081a76b..0f0a4a4cf30 100755 +--- a/configure ++++ b/configure +@@ -16517,12 +16517,6 @@ if test "x$ac_cv_func_dup" = xyes + then : + printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" +-if test "x$ac_cv_func_dup3" = xyes +-then : +- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" + if test "x$ac_cv_func_execv" = xyes +@@ -16991,12 +16985,6 @@ if test "x$ac_cv_func_pipe" = xyes + then : + printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h + +-fi +-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +-if test "x$ac_cv_func_pipe2" = xyes +-then : +- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h +- + fi + ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock" + if test "x$ac_cv_func_plock" = xyes +@@ -17571,6 +17559,25 @@ fi + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 + printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } + if test ${ac_cv_c_undeclared_builtin_options+y} +diff --git a/configure.ac b/configure.ac +index 1c25abd65a0..d8f7b64ea60 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4582,7 +4582,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4592,7 +4592,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4614,6 +4614,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.5/Python-3.11.5/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.5/Python-3.11.5/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..35957196 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.5/Python-3.11.5/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 3164590efaab7b21c093b50e78c3d332494b037c Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index af4a5bbfdfa..e929659dc62 100755 +--- a/configure ++++ b/configure +@@ -15198,7 +15198,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15208,7 +15208,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15251,6 +15251,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index e1cbb7c7fbe..d3a1cd1be6b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4586,7 +4586,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4596,7 +4596,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4618,6 +4618,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.6/Python-3.11.6/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.6/Python-3.11.6/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..6aab0fb0 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.6/Python-3.11.6/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 4cb7a6c0d9769517ecc8714da0c6668dec76639f Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index af4a5bbfdfa..e929659dc62 100755 +--- a/configure ++++ b/configure +@@ -15198,7 +15198,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15208,7 +15208,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15251,6 +15251,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index e1cbb7c7fbe..d3a1cd1be6b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4586,7 +4586,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4596,7 +4596,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4618,6 +4618,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.7/Python-3.11.7/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.7/Python-3.11.7/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..65c16d0d --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.7/Python-3.11.7/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 9510b699fa047f500b99da13474f5d89e4b7a850 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index 8d2f3f4cc0f..39f6cf5e353 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index 52d5c1f7dd3..0cca5dd00c7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.8/Python-3.11.8/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.8/Python-3.11.8/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..4b44c013 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.8/Python-3.11.8/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From dd9f5dfd13ee1ad7686c9703e8f69699acceaa99 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index cb3db60f9c2..997af57afd9 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index bbe7f891e7d..aa89f118b87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 + diff --git a/plugins/python-build/share/python-build/patches/3.11.9/Python-3.11.9/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch b/plugins/python-build/share/python-build/patches/3.11.9/Python-3.11.9/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch new file mode 100644 index 00000000..01a79460 --- /dev/null +++ b/plugins/python-build/share/python-build/patches/3.11.9/Python-3.11.9/0003-downstream-3.11-gh-153711-Avoid-use-of-dup3-and-pipe.patch @@ -0,0 +1,109 @@ +From 016abcec2e95b402465784efc9b05a0d82a07ea8 Mon Sep 17 00:00:00 2001 +From: Ned Deily +Date: Wed, 5 Aug 2026 10:30:17 +0300 +Subject: [PATCH] (downstream) [3.11] gh-153711: Avoid use of dup3 and pipe2 + calls introduced in macOS 27 (#155211) + +--- + ...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 +++ + configure | 23 +++++++++++++++++-- + configure.ac | 11 +++++++-- + 3 files changed, 33 insertions(+), 4 deletions(-) + create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst + +diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +new file mode 100644 +index 00000000000..90804c179a4 +--- /dev/null ++++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst +@@ -0,0 +1,3 @@ ++On macOS, do not attempt to use the :manpage:`dup3(2)` and ++:manpage:`pipe2(2)` system calls introduced in ++macOS 27 to prevent problems when running on older systems. +diff --git a/configure b/configure +index a1ad0ae2510..76a3eec37be 100755 +--- a/configure ++++ b/configure +@@ -15209,7 +15209,7 @@ fi + # checks for library functions + for ac_func in \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -15219,7 +15219,7 @@ for ac_func in \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -15262,6 +15262,25 @@ done + + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" ++if test "x$ac_cv_func_dup3" = xyes ++then : ++ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h ++ ++fi ++ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" ++if test "x$ac_cv_func_pipe2" = xyes ++then : ++ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h ++ ++fi ++ ++fi ++ + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include + " +diff --git a/configure.ac b/configure.ac +index 7b4000fa9c3..44167040f3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4594,7 +4594,7 @@ fi + # checks for library functions + AC_CHECK_FUNCS([ \ + accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \ +- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \ ++ copy_file_range ctermid dup execv explicit_bzero explicit_memset \ + faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \ + fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \ + gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \ +@@ -4604,7 +4604,7 @@ AC_CHECK_FUNCS([ \ + getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \ + lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \ + mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \ +- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ ++ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \ + pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \ + pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \ + rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \ +@@ -4626,6 +4626,13 @@ if test "$MACHDEP" != linux; then + AC_CHECK_FUNCS(lchmod) + fi + ++# macOS introduced dup3 and pipe2 in macOS 27, late in the ++# lifetime of this version of Python. Rather than adding weaklinking ++# support for them, just continue to ignore them. ++if test "$ac_sys_system" != "Darwin"; then ++ AC_CHECK_FUNCS([dup3 pipe2]) ++fi ++ + AC_CHECK_DECL(dirfd, + AC_DEFINE(HAVE_DIRFD, 1, + Define if you have the 'dirfd' function or macro.), , +-- +2.55.0.windows.3 +