python3.13: update to version 3.13.3. (#12213)

This commit is contained in:
OscarL
2025-04-20 04:27:51 +00:00
committed by GitHub
parent 5020c5e391
commit 92413b58b1
2 changed files with 141 additions and 152 deletions

View File

@@ -1,4 +1,4 @@
From 4ab975ca10ba220d2a90a710bc26455bc0801311 Mon Sep 17 00:00:00 2001
From c1ff79287e66f75526627c52eb4abbc6ae8f82a6 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 2ba81a4..8ba7902 100644
// See PyUnicode_DecodeFSDefaultAndSize(), PyUnicode_EncodeFSDefault(),
// Py_DecodeLocale() and Py_EncodeLocale().
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 46a37de..1e4122d 100644
index 3bd4495..1b4c40b 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -149,7 +149,7 @@ BINDIR= @bindir@
@@ -194,20 +194,20 @@ index 3fcb189..8e54330 100644
esac
AC_MSG_CHECKING([for --with-libm=STRING])
--
2.45.2
2.48.1
From a61aa9f3ef8b7adb8945cbde570c001e2dd6fb94 Mon Sep 17 00:00:00 2001
From c7782a95c6d08a325210ceb285cdb2d4422ed32b 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 98b98be..22a88f8 100644
index 4a9a64e..5ab9e22 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1959,6 +1959,8 @@ class Popen:
@@ -1954,6 +1954,8 @@ class Popen:
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
@@ -232,10 +232,10 @@ index daec4ad..1647199 100644
*--cur = Py_hexdigits[saved_errno % 16];
saved_errno /= 16;
--
2.45.2
2.48.1
From 2334552fda9d9218734b970fd2ed4bb08d2a2a5c Mon Sep 17 00:00:00 2001
From 6c0931c50128771a78124a75894030cb534a3d16 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
@@ -329,10 +329,10 @@ index 117bf06..6301aa2 100644
print(cdll.LoadLibrary("libm.so"))
print(cdll.LoadLibrary("libcrypt.so"))
--
2.45.2
2.48.1
From a98dbcabc3647e19e1f198d167f4814b831b4537 Mon Sep 17 00:00:00 2001
From 88736af1e86b217933d7ecf1ee82df431f60bc79 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
@@ -356,10 +356,10 @@ index 2f9555a..90bea57 100755
# First try to use the default Windows browser
register("windows-default", WindowsDefault)
--
2.45.2
2.48.1
From c899efa98767ad3c1ac7a5dbd8e0fa223a4317b1 Mon Sep 17 00:00:00 2001
From 24f65166fb31b9d79b31697f1a3a5298368cce2b 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.
@@ -379,10 +379,10 @@ index aa9b79d..b99e1e0 100644
pass # no-op when os.register_at_fork does not exist.
else:
--
2.45.2
2.48.1
From 0b6a8ba0ec22ed05aa04af578e11d956c68ed311 Mon Sep 17 00:00:00 2001
From 0decfe94924e50eabe6f34cbddb3e79708e98377 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 15 May 2020 15:20:57 +0200
Subject: handle errors returned by internal_connect()
@@ -390,10 +390,10 @@ Subject: handle errors returned by internal_connect()
upstream bug #40628 by Ryan C. Gordon
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 1c0bc79..e8d1cf2 100644
index e2afe50..a41aaca 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3483,7 +3483,7 @@ sock_connect(PySocketSockObject *s, PyObject *addro)
@@ -3534,7 +3534,7 @@ sock_connect(PySocketSockObject *s, PyObject *addro)
}
res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 1);
@@ -402,7 +402,7 @@ index 1c0bc79..e8d1cf2 100644
return NULL;
Py_RETURN_NONE;
@@ -3514,7 +3514,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
@@ -3565,7 +3565,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
}
res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 0);
@@ -412,20 +412,20 @@ index 1c0bc79..e8d1cf2 100644
return PyLong_FromLong((long) res);
--
2.45.2
2.48.1
From e9da56074bc25080a4ddccdd1902f2b19c4cf8bb Mon Sep 17 00:00:00 2001
From 02a638d1ba2fcb67b6b7da45803b86322df43bae 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 40d0f86..140cce8 100644
index 601145e..754baa9 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3314,11 +3314,14 @@ static PyObject *
@@ -3318,11 +3318,14 @@ static PyObject *
os_ttyname_impl(PyObject *module, int fd)
/*[clinic end generated code: output=c424d2e9d1cd636a input=9ff5a58b08115c55]*/
{
@@ -442,10 +442,10 @@ index 40d0f86..140cce8 100644
if (buffer == NULL) {
return PyErr_NoMemory();
--
2.45.2
2.48.1
From 549c7dcf5aa14f0a7ee953d4485afd4e24ffe157 Mon Sep 17 00:00:00 2001
From 862f6fb3121e0ecd9725d26b0ab4e22fe81d4649 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.
@@ -456,7 +456,7 @@ This avoids needing several GBs of storage to run the tests
(unless the "largefile" resource usage flag is enabled).
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index f1f8ce5..895815e 100644
index 1124955..614aff8 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -628,7 +628,7 @@ class IOTest(unittest.TestCase):
@@ -495,10 +495,10 @@ index a1cf538..c04d9e3 100644
'test requires %s bytes and a long time to run' % str(0x180000000))
f = open(TESTFN, 'w+b')
--
2.45.2
2.48.1
From 65a73d2ac7eb72a369d73af3446a881b40658395 Mon Sep 17 00:00:00 2001
From b0f164c467dbc7d8f8a24b650639df089d12538c 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.
@@ -577,7 +577,7 @@ index 89a81c5..3477bf6 100644
if sys.platlibdir != "lib":
libdirs.append("lib")
diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
index 7bcb737..24cb0af 100644
index 510c7b9..7a17472 100644
--- a/Lib/sysconfig/__init__.py
+++ b/Lib/sysconfig/__init__.py
@@ -48,6 +48,36 @@ _INSTALL_SCHEMES = {
@@ -674,7 +674,7 @@ index 7bcb737..24cb0af 100644
'osx_framework_user': {
'stdlib': '{userbase}/lib/{implementation_lower}',
'platstdlib': '{userbase}/lib/{implementation_lower}',
@@ -278,6 +337,18 @@ def _expand_vars(scheme, vars):
@@ -285,6 +344,18 @@ def _expand_vars(scheme, vars):
def _get_preferred_schemes():
@@ -694,7 +694,7 @@ index 7bcb737..24cb0af 100644
return {
'prefix': 'nt',
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index bf53413..80daae7 100644
index aca02c0..e7ff98d 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -386,9 +386,10 @@ class TestSysConfig(unittest.TestCase):
@@ -711,10 +711,10 @@ index bf53413..80daae7 100644
@skip_unless_symlink
--
2.45.2
2.48.1
From 9045cae00dda9b2a95df757c73d16a6de7ba2aed Mon Sep 17 00:00:00 2001
From 30a2e9f950bcad453ca51d1a61ba0680fc2389a6 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.
@@ -750,10 +750,10 @@ index 3477bf6..cfd4e49 100644
def enablerlcompleter():
--
2.45.2
2.48.1
From 6e04400130cf2c45057adfb8632e05b8bcad4dfe Mon Sep 17 00:00:00 2001
From 92e9504e82d1fa951dd32c3ce8f0dc024c007f9f Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Sun, 8 Oct 2023 17:02:19 -0300
Subject: Use spawn instead of fork for multiprocessing.
@@ -803,10 +803,10 @@ index de8a264..02a301e 100644
# on macOS since macOS 10.14 (Mojave). Use spawn by default instead.
_default_context = DefaultContext(_concrete_contexts['spawn'])
--
2.45.2
2.48.1
From f43d869f24911e4cc8feae8d58f64cc8221d6cd9 Mon Sep 17 00:00:00 2001
From 8283651371ed8ac3d36b688ad1ecf90a6c75bd94 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.
@@ -817,10 +817,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 a2ed99a..e8449b9 100644
index 952176b..2a23ff0 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -6080,6 +6080,9 @@ def pairs(iterable):
@@ -6086,6 +6086,9 @@ def pairs(iterable):
class ZoneInfo(tzinfo):
zoneroot = '/usr/share/zoneinfo'
@@ -843,10 +843,10 @@ index 0611d17..ce7c87d 100644
# Somehow /dev/tty appears seekable on some BSDs
self.assertEqual(f.seekable(), False)
--
2.45.2
2.48.1
From b16f098ff737977d58c900b4c84540ed573843d7 Mon Sep 17 00:00:00 2001
From 3ede5eb2e516df3efb2ee15fd1f5d4214ddc9d79 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.
@@ -909,10 +909,10 @@ index 5bd9b77..88e29a4 100644
/* NETDEV filter flags */
--
2.45.2
2.48.1
From 5009cfba6798c0ea4499f676bdcbd006d53d0e23 Mon Sep 17 00:00:00 2001
From 06130abe2fc72c3c644811ac9012beb4dc9724df Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Thu, 14 Mar 2024 12:54:33 -0500
Subject: config.guess: Update to universal haiku arch guessing
@@ -939,10 +939,10 @@ index e81d3ae..366429c 100755
SX-4:SUPER-UX:*:*)
GUESS=sx4-nec-superux$UNAME_RELEASE
--
2.45.2
2.48.1
From d8a155ab052cb6794e6cd268a62262f198ab7ea4 Mon Sep 17 00:00:00 2001
From 4ff86bb269b52cbdf67b33afcf22b880ad4a2b9d 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.
@@ -962,10 +962,10 @@ index f668810..a55a8e4 100644
elif sys.platform.startswith("aix"):
c_arg = arg.decode('iso-8859-1')
--
2.45.2
2.48.1
From 538c632f81e8d62b9b9e68f9231eafd48c5b7888 Mon Sep 17 00:00:00 2001
From b9e64a6a7fc28878a05df394477b149386138baa 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.
@@ -1025,7 +1025,7 @@ index cfd4e49..b414150 100644
libdirs = [sys.platlibdir]
if sys.platlibdir != "lib":
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index 2df17b9..332063b 100644
index 57f4f1e..841c24a 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -323,7 +323,21 @@ class HelperFunctionsTests(unittest.TestCase):
@@ -1052,17 +1052,17 @@ index 2df17b9..332063b 100644
if sys.platlibdir != "lib":
self.assertEqual(len(dirs), 2)
--
2.45.2
2.48.1
From fb5a29ef37d19d646dde05db259802747b94d179 Mon Sep 17 00:00:00 2001
From a617a93b6110e6bdf2b7c79ba91110bc3ab168f1 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 80daae7..5194c47 100644
index e7ff98d..017c676 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -221,6 +221,19 @@ class TestSysConfig(unittest.TestCase):
@@ -1095,10 +1095,10 @@ index 80daae7..5194c47 100644
wanted.extend(['nt_user', 'osx_framework_user', 'posix_user', 'haiku_user'])
self.assertEqual(get_scheme_names(), tuple(sorted(wanted)))
--
2.45.2
2.48.1
From 9501c1a9f4f4b89670a92c36404e9116f2ebbca2 Mon Sep 17 00:00:00 2001
From 8e1d4e088545b103b11b4f7fb985492e7780a060 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
@@ -1106,10 +1106,10 @@ Subject: Partially fix test_compileall by skipping tests that need hardlink
diff --git a/Lib/test/support/os_helper.py b/Lib/test/support/os_helper.py
index 8914059..bfedd2d 100644
index ae01644..b701fd9 100644
--- a/Lib/test/support/os_helper.py
+++ b/Lib/test/support/os_helper.py
@@ -206,6 +206,8 @@ def can_hardlink():
@@ -207,6 +207,8 @@ def can_hardlink():
# Android blocks hard links using SELinux
# (https://stackoverflow.com/q/32365690).
_can_hardlink = hasattr(os, "link") and not support.is_android
@@ -1131,10 +1131,10 @@ index 21ecebc..632fc1c 100644
# 'a = 0' code produces the same bytecode for the 3 optimization
# levels. All three .pyc files must have the same inode (hardlinks).
--
2.45.2
2.48.1
From 15562f756b5cca4e47859d90a0bb9881c5b7649f Mon Sep 17 00:00:00 2001
From d28046562d65e17576f9cc4eed86cf1ab6953ddf 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.
@@ -1147,7 +1147,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 1e4122d..6c9a2ef 100644
index 1b4c40b..c46e950 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -752,7 +752,7 @@ profile-run-stamp:
@@ -1182,10 +1182,10 @@ index 4d3fb65..be95e7d 100644
#if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(_AIX) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__sun) && !defined(__NetBSD__)
--
2.45.2
2.48.1
From 11cf4f8dda81d2463aa3483367ae0e36e4dcfb3e Mon Sep 17 00:00:00 2001
From 1af03ce03c52e186d6699b738243527b8c26b6d2 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.
@@ -1207,5 +1207,5 @@ index 8e54330..e197041 100644
CFLAGS_NODIST="$CFLAGS_NODIST ${LTOCFLAGS-$LTOFLAGS}"
--
2.45.2
2.48.1