python3.14: update to version 3.14.4. (#13922)

This commit is contained in:
OscarL
2026-04-07 18:31:48 -03:00
committed by GitHub
parent 857e14be62
commit 00a18d0d72
2 changed files with 115 additions and 63 deletions

View File

@@ -1,4 +1,4 @@
From 3108963525a131fe0489cb6459294f3dd47e8ae6 Mon Sep 17 00:00:00 2001
From 364efe7bf56e5785c4c4c7b16085e85dc0d3fa3f Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Sun, 8 Oct 2023 01:02:25 -0300
Subject: initial Haiku patch
@@ -22,7 +22,7 @@ index 2c8567f..aa050cf 100644
// See PyUnicode_DecodeFSDefaultAndSize(), PyUnicode_EncodeFSDefault(),
// Py_DecodeLocale() and Py_EncodeLocale().
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 38a355a..95078ec 100644
index 80a1b59..abca9c3 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -156,7 +156,7 @@ BINDIR= @bindir@
@@ -133,10 +133,10 @@ index 2353bc6..6267d23 100644
#endif
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index 63624d5..3692640 100644
index 6f8f4b2..f2afced 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -113,6 +113,10 @@ typedef int socklen_t;
@@ -120,6 +120,10 @@ typedef int socklen_t;
# undef AF_QIPCRTR
#endif
@@ -148,7 +148,7 @@ index 63624d5..3692640 100644
#include <bluetooth/bluetooth.h>
#include <bluetooth/rfcomm.h>
diff --git a/configure.ac b/configure.ac
index d81c76f..3f7c8f2 100644
index 1acb91f..0e39861 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1593,6 +1593,16 @@ if test $enable_shared = "yes"; then
@@ -176,7 +176,7 @@ index d81c76f..3f7c8f2 100644
CYGWIN*) LN="ln -s";;
*) LN=ln;;
esac
@@ -3599,7 +3610,7 @@ then
@@ -3602,7 +3613,7 @@ then
LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
@@ -185,7 +185,7 @@ index d81c76f..3f7c8f2 100644
# -u libsys_s pulls in all symbols in libsys
Darwin/*|iOS/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
@@ -5999,6 +6010,7 @@ AC_CHECK_FUNC([__fpu_control],
@@ -6002,6 +6013,7 @@ AC_CHECK_FUNC([__fpu_control],
AC_SUBST([LIBM])
case $ac_sys_system in
Darwin) ;;
@@ -197,17 +197,17 @@ index d81c76f..3f7c8f2 100644
2.52.0
From 26078b1151d86cd51d86093cfac5e8a398b367b7 Mon Sep 17 00:00:00 2001
From 7438c32d2ee126ce4bcb7a20e9df155af41b090e Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 16 Apr 2017 10:05:42 +0200
Subject: fix for negative errnos
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 578d7b9..9be7cba 100644
index 52b7b71..33e85e8 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1974,6 +1974,8 @@ class Popen:
@@ -1975,6 +1975,8 @@ class Popen:
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
@@ -235,7 +235,7 @@ index e0a9531..1d76b4f 100644
2.52.0
From cd9d2092ba7a2cbdbbfa18fe1bb56c014d913290 Mon Sep 17 00:00:00 2001
From 2f8e45ffc2ac459212762e29852be6544ecc2727 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Sun, 8 Oct 2023 20:06:31 -0300
Subject: Implement CTypes's find_library for Haiku
@@ -245,7 +245,7 @@ This combines:
- A slight variation of Adrien Destugues' fix for x86_gcc2.
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 378f121..a9136ad 100644
index 3b21658..8c8ce7f 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -1,4 +1,5 @@
@@ -254,7 +254,7 @@ index 378f121..a9136ad 100644
import shutil
import subprocess
import sys
@@ -371,6 +372,60 @@ elif os.name == "posix":
@@ -377,6 +378,60 @@ elif os.name == "posix":
def find_library(name, is64 = False):
return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name))
@@ -315,7 +315,7 @@ index 378f121..a9136ad 100644
else:
def _findSoname_ldconfig(name):
@@ -522,6 +577,12 @@ def test():
@@ -528,6 +583,12 @@ def test():
print(f"crypt\t:: {cdll.LoadLibrary(find_library('crypt'))}")
print(f"crypto\t:: {find_library('crypto')}")
print(f"crypto\t:: {cdll.LoadLibrary(find_library('crypto'))}")
@@ -332,17 +332,17 @@ index 378f121..a9136ad 100644
2.52.0
From 8f9ece4492e25aa3274ec87aff267cecff5fd38a Mon Sep 17 00:00:00 2001
From 0ddd6f9511940629fa9b5e4b5260224a27502c9f Mon Sep 17 00:00:00 2001
From: Philipp Wolfer <phil@parolu.io>
Date: Mon, 23 Sep 2019 09:14:58 +0200
Subject: webbrowser: Support for default browsers on Haiku
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index f2e2394..b937321 100644
index 0e0b503..b79a3f7 100644
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -495,6 +495,12 @@ def register_standard_browsers():
@@ -505,6 +505,12 @@ def register_standard_browsers():
# SerenityOS webbrowser, simply called "Browser".
register("Browser", None, BackgroundBrowser("Browser"))
@@ -359,7 +359,7 @@ index f2e2394..b937321 100644
2.52.0
From 636b2b9518bb026a2cb3ff56ef497de0710d87b1 Mon Sep 17 00:00:00 2001
From 0d326943ba0c5dcc247b61c485af74feacacec04 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 4 Oct 2019 22:02:35 +0200
Subject: since 3.8, don't reinit locks on fork.
@@ -382,17 +382,17 @@ index 9005f1e..28708e2 100644
2.52.0
From 01aa1d3037de4895996694d050cfc952f4116478 Mon Sep 17 00:00:00 2001
From f249dcee55206e543f1630b9b4c9889a5df6ef55 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 19 Oct 2020 18:03:09 +0200
Subject: ttyname_r can use MAXPATHLEN
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index cb3a62d..a17bdd9 100644
index 31b2d28..a818818 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3420,11 +3420,14 @@ static PyObject *
@@ -3426,11 +3426,14 @@ static PyObject *
os_ttyname_impl(PyObject *module, int fd)
/*[clinic end generated code: output=c424d2e9d1cd636a input=9ff5a58b08115c55]*/
{
@@ -412,7 +412,7 @@ index cb3a62d..a17bdd9 100644
2.52.0
From 8ae9cb4834502a5f02506a8879322c265bd520cc Mon Sep 17 00:00:00 2001
From 29514313a3dcec5384fc718275dd1bfab6499be5 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Mon, 24 Oct 2022 20:04:10 -0300
Subject: Lib/test: require the "largefile" usage flag for I/O heavy tests.
@@ -465,7 +465,7 @@ index f468dda..4ab9157 100644
2.52.0
From c25dcd6b8235ea4211e300c3712716a1b4498dd1 Mon Sep 17 00:00:00 2001
From c4ca9be2daf449948b4dff32d469bf860a144064 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Sat, 27 Jul 2024 04:51:52 -0300
Subject: _getuserbase(), getsitepackages(), and INSTALL_SCHEMES for Haiku.
@@ -544,7 +544,7 @@ index aeb7c6c..e6351bb 100644
if sys.platlibdir != "lib":
libdirs.append("lib")
diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
index 2ecbff2..71bcd11 100644
index faf8273..3cf88f5 100644
--- a/Lib/sysconfig/__init__.py
+++ b/Lib/sysconfig/__init__.py
@@ -48,6 +48,36 @@ _INSTALL_SCHEMES = {
@@ -661,10 +661,10 @@ index 2ecbff2..71bcd11 100644
return {
'prefix': 'nt',
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 09eff11..5ef7055 100644
index 1fe4b68..cbe540a 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -395,9 +395,10 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin):
@@ -397,9 +397,10 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin):
self.assertTrue(os.path.isfile(config_h), config_h)
def test_get_scheme_names(self):
@@ -681,7 +681,7 @@ index 09eff11..5ef7055 100644
2.52.0
From 2778b41a21dc60f8c70c38078e5c4d5f08206f59 Mon Sep 17 00:00:00 2001
From a6168814c87c0f694ef447869003e7c85275e8aa Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Mon, 12 Feb 2024 08:39:38 -0300
Subject: Fix location of REPL's history file.
@@ -720,7 +720,7 @@ index e6351bb..ef75d2b 100644
2.52.0
From 761034fb6d7b4e15ab28bc728947404a81065092 Mon Sep 17 00:00:00 2001
From 5f0e1d035e5756315011a75387a7b0a79125ce72 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Sun, 10 Dec 2023 19:50:22 -0300
Subject: Miscellaneous "Lib/test/" fixes for Haiku.
@@ -731,10 +731,10 @@ Content-Transfer-Encoding: 8bit
test_fileio.py fix from "initial Haiku patch" by Jérôme Duval.
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index 0540f94..78ffe6d 100644
index c6534ad..920a08d 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -6412,6 +6412,9 @@ def pairs(iterable):
@@ -6416,6 +6416,9 @@ def pairs(iterable):
class ZoneInfo(tzinfo):
zoneroot = '/usr/share/zoneinfo'
@@ -760,7 +760,7 @@ index e3d54f6..efb4d03 100644
2.52.0
From b27fcbc337db6826142d9190228578f74c319f16 Mon Sep 17 00:00:00 2001
From 884cd8a3096fba990716646d98f765c3ab3f5df5 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Mon, 12 Feb 2024 10:50:34 -0300
Subject: Fix build on nightlies, following the addition of kqueue.
@@ -826,7 +826,7 @@ index d234d50..6e16247 100644
2.52.0
From 0b44b522a34b715fa6953d68f18a5f643b392f9d Mon Sep 17 00:00:00 2001
From bf3efec54e0943343d3ebf9fc8b3bd9aab24f7c0 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Fri, 9 Aug 2024 13:38:28 -0300
Subject: fix test_utf8_mode.
@@ -849,7 +849,7 @@ index f668810..a55a8e4 100644
2.52.0
From f89c6a0db2f22c2a7c195d916ae1166c00951572 Mon Sep 17 00:00:00 2001
From 001373d3062fea8e4e38650a667d7c4fbdc01092 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Fri, 9 Aug 2024 14:35:04 -0300
Subject: Fix test_site.
@@ -939,14 +939,14 @@ index f8c6f37..2cf711f 100644
2.52.0
From 861eae90afdc82b025dea22be3b2c7ed1d34d53a Mon Sep 17 00:00:00 2001
From bce98aeeca6e13626f842cac9d41448b6e6a0a31 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Fri, 9 Aug 2024 15:37:13 -0300
Subject: Fix test_sysconfig.
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 5ef7055..18b1e8f 100644
index cbe540a..7eab1a7 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -223,6 +223,19 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin):
@@ -969,7 +969,7 @@ index 5ef7055..18b1e8f 100644
else:
self.assertEqual(
sysconfig.get_path('scripts', scheme='venv'),
@@ -396,7 +409,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin):
@@ -398,7 +411,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin):
def test_get_scheme_names(self):
wanted = ['nt', 'posix_home', 'posix_prefix', 'posix_venv', 'nt_venv', 'venv', 'haiku',
@@ -982,7 +982,7 @@ index 5ef7055..18b1e8f 100644
2.52.0
From 0bcbb2655fce38be83e3158b74348cf611a02787 Mon Sep 17 00:00:00 2001
From ac6d283c50f3fdf27d0c8e045f5aa7f3c5d76ef6 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Sun, 29 Sep 2024 03:01:27 -0300
Subject: Partially fix test_compileall by skipping tests that need hardlink
@@ -1018,7 +1018,7 @@ index 8384c18..d7e19ec 100644
2.52.0
From 364f4e33d4d09057ddd0d94aa61eb26558b52ae1 Mon Sep 17 00:00:00 2001
From 246dc0242d9f3fa591a1a0e81882003a9b105e72 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Thu, 9 May 2024 15:16:26 -0300
Subject: Fix 3.13.0 build.
@@ -1031,7 +1031,7 @@ Previous Python versions had both the time out and the "|| true".
Some of the test run in that PGO stage sadly still fail on Haiku.
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 95078ec..b4b5462 100644
index abca9c3..0296112 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -856,7 +856,7 @@ profile-run-stamp:
@@ -1069,14 +1069,14 @@ index 1598eba..88b94b6 100644
2.52.0
From 58d2e2d102f2569217e71d15d18a63ecbcb5e5cb Mon Sep 17 00:00:00 2001
From d86c2426c59fd41320acd4b0e73694a3b12f5bfe Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Sat, 5 Oct 2024 07:32:17 -0300
Subject: Avoid forcing "-g" on LTO builds, unless Py_DEBUG is defined.
diff --git a/configure.ac b/configure.ac
index 3f7c8f2..fadfeca 100644
index 0e39861..e573e9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2026,7 +2026,9 @@ if test "$Py_LTO" = 'true' ; then
@@ -1094,17 +1094,17 @@ index 3f7c8f2..fadfeca 100644
2.52.0
From e0c0634c9d9de3e9db963cd33f44ce80c3534117 Mon Sep 17 00:00:00 2001
From ab7a7ca7d43c0b690f795540956ee1cb175b0dab Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Thu, 13 Feb 2025 13:30:03 -0300
Subject: Make sure we use 'spawn' on Haiku and not 'forkserver'.
diff --git a/Lib/multiprocessing/context.py b/Lib/multiprocessing/context.py
index 051d567..4f20b24 100644
index 5fa6d7e..1b77bfe 100644
--- a/Lib/multiprocessing/context.py
+++ b/Lib/multiprocessing/context.py
@@ -322,7 +322,7 @@ if sys.platform != 'win32':
@@ -328,7 +328,7 @@ if sys.platform != 'win32':
# bpo-33725: running arbitrary code after fork() is no longer reliable
# on macOS since macOS 10.14 (Mojave). Use spawn by default instead.
# gh-84559: We changed everyones default to a thread safeish one in 3.14.
@@ -1116,3 +1116,51 @@ index 051d567..4f20b24 100644
--
2.52.0
From fa9b0b374d82382a21323036503c7cfb284b03f4 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Tue, 7 Apr 2026 18:01:51 -0300
Subject: test/support: add is_haiku boolean...
And use it to skip tests that rely on resource.RLIMIT_STACK.
Haiku defines RLIMIT_STACK in posix/sys/resource.h, but there's a ToDo
indicating that only RLIMIT_NOFILE is actually supported.
ToDo: use that new "is_haiku" in other places that currently check:
`sys.platform[:5] == "haiku"` or similar.
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 6635ec3..22849e3 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -46,7 +46,7 @@ __all__ = [
"requires_limited_api", "requires_specialization", "thread_unsafe",
"skip_if_unlimited_stack_size",
# sys
- "MS_WINDOWS", "is_jython", "is_android", "is_emscripten", "is_wasi",
+ "MS_WINDOWS", "is_jython", "is_android", "is_haiku", "is_emscripten", "is_wasi",
"is_apple_mobile", "check_impl_detail", "unix_shell", "setswitchinterval",
"support_remote_exec_only",
# os
@@ -607,6 +607,8 @@ def skip_wasi_stack_overflow():
is_apple_mobile = sys.platform in {"ios", "tvos", "watchos"}
is_apple = is_apple_mobile or sys.platform == "darwin"
+is_haiku = sys.platform[:5] == "haiku"
+
has_fork_support = hasattr(os, "fork") and not (
# WASM and Apple mobile platforms do not support subprocesses.
is_emscripten
@@ -1694,7 +1696,7 @@ def skip_if_unlimited_stack_size(test):
See https://github.com/python/cpython/issues/143460.
"""
- if is_emscripten or is_wasi or os.name == "nt":
+ if is_emscripten or is_haiku or is_wasi or os.name == "nt":
return test
import resource
--
2.52.0