python3.9: update to version 3.9.17 (#8847)

* Use BASEFLAGS instead of CFLAGS, and set OPT to something better than "".
  This seems to finally make "--enable-optimizations" do some speedup, so
  lets use it for 3.9 too now.
* "backported" the 3.10 patch for "largefile" flag in tests, and also the
  entire TEST() function from the 3.10.12 recipe, as it makes possible to
  run `hp --test python3.9` without hanging (assuming Debugger is set to
  kill).
This commit is contained in:
OscarL
2023-06-11 09:02:33 -03:00
committed by GitHub
parent b9bf34dcaf
commit 182e1d8b01
4 changed files with 322 additions and 164 deletions

View File

@@ -1,4 +1,4 @@
From 0ad4d86cd6bad85d09487b9f9def1e5ae8cd24af Mon Sep 17 00:00:00 2001
From 43c073e23a07c104fbd177ce6e34b918033b7f66 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 10 Apr 2014 16:03:33 +0000
Subject: initial Haiku patch
@@ -561,17 +561,17 @@ index 0bec170..3b862fa 100644
2.37.3
From f343605ee8c189698d5ec51d32006a7794f169e3 Mon Sep 17 00:00:00 2001
From b599abff2521708a1ff796319d1d2bb32526e4bd 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 4effc1d..a320f09 100644
index 8579d3f..e6abe57 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1809,6 +1809,8 @@ class Popen(object):
@@ -1825,6 +1825,8 @@ class Popen(object):
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
@@ -599,7 +599,7 @@ index d64e0a1..0885a30 100644
2.37.3
From a6265bb8ca1131a02965f6967ff01863baadaf19 Mon Sep 17 00:00:00 2001
From 820dcebc11a4405cb892d42b7daff32cf3f805ad Mon Sep 17 00:00:00 2001
From: Philippe Houdoin <philippe.houdoin@gmail.com>
Date: Wed, 24 May 2017 11:09:43 +0000
Subject: Implement CTypes's find_library for Haiku
@@ -683,7 +683,7 @@ index 0c2510e..2b4f04c 100644
2.37.3
From f0216e9fc2bbc0715c342362d8235d6fd697d210 Mon Sep 17 00:00:00 2001
From 6c608a84f82fdd11df68f5d7fe9dd3aefe2a73b3 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
@@ -709,7 +709,7 @@ index 6023c1e..8359531 100755
2.37.3
From d23b79b7f98ea25ff7271a2b39d9b79248266636 Mon Sep 17 00:00:00 2001
From 4f88341b84dd3b9745bbcb25b1e87ce6f2a5483b 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.
@@ -732,7 +732,7 @@ index 1ab35a8..c6b54e4 100644
2.37.3
From 96d894b820111705c3dbbca1e7d7a673f6fc9d26 Mon Sep 17 00:00:00 2001
From cb713611e36ca2764be44ced4896597fa45d2b16 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()
@@ -765,7 +765,7 @@ index b29283e..7af682d 100644
2.37.3
From 9bd5156b56b7abd7d85382482e0cdb2b514f5bb6 Mon Sep 17 00:00:00 2001
From a308b229f1478b10482539058ad5fed4eb084147 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
@@ -795,7 +795,7 @@ index bf4e648..c8850d6 100644
2.37.3
From f5ab2ba2fbdf4f3b56a868452ef3733b888c6b76 Mon Sep 17 00:00:00 2001
From b83d3ac655d73f9d1d6437e3b67a52c2225eb3f2 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 23 May 2022 08:45:31 +0200
Subject: Fix search paths for tcl/tk
@@ -825,7 +825,60 @@ index 2c7f344..8905063 100644
2.37.3
From cd0484017d94caa28766a48b1b3aa5db37459574 Mon Sep 17 00:00:00 2001
From e73d5eac4396ca3ede2fe324808d94a993e3d127 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Fri, 21 Oct 2022 19:58:50 -0300
Subject: Lib/test: require the "largefile" usage flag for I/O heavy tests.
The same was done for Windows and MacOSX already.
This avoids needing several GBs of storage to run the tests
(unless they "largefile" resource usage flag is enabled).
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index feee861..4f76448 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -594,7 +594,7 @@ class IOTest(unittest.TestCase):
# On Windows and Mac OSX this test consumes large resources; It takes
# a long time to build the >2 GiB file and takes >2 GiB of disk space
# therefore the resource must be enabled to run this test.
- if sys.platform[:3] == 'win' or sys.platform == 'darwin':
+ if sys.platform[:3] == 'win' or sys.platform == 'darwin' or sys.platform == 'haiku1':
support.requires(
'largefile',
'test requires %s bytes and a long time to run' % self.LARGE)
diff --git a/Lib/test/test_largefile.py b/Lib/test/test_largefile.py
index a99b4ba..1fb24ce 100644
--- a/Lib/test/test_largefile.py
+++ b/Lib/test/test_largefile.py
@@ -250,7 +250,7 @@ def setUpModule():
# takes a long time to build the >2 GiB file and takes >2 GiB of disk
# space therefore the resource must be enabled to run this test.
# If not, nothing after this line stanza will be executed.
- if sys.platform[:3] == 'win' or sys.platform == 'darwin':
+ if sys.platform[:3] == 'win' or sys.platform == 'darwin' or sys.platform == 'haiku1':
requires('largefile',
'test requires %s bytes and a long time to run' % str(size))
else:
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index 5400f25..421025d 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -805,7 +805,7 @@ class LargeMmapTests(unittest.TestCase):
unlink(TESTFN)
def _make_test_file(self, num_zeroes, tail):
- if sys.platform[:3] == 'win' or sys.platform == 'darwin':
+ if sys.platform[:3] == 'win' or sys.platform == 'darwin' or sys.platform == 'haiku1':
requires('largefile',
'test requires %s bytes and a long time to run' % str(0x180000000))
f = open(TESTFN, 'w+b')
--
2.37.3
From 11d6dae926568a5d460a7f01b5c0da9d60360bad Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 6 Mar 2023 22:51:40 +0100
Subject: sysconfig: add haiku schemes
@@ -884,7 +937,7 @@ index e3f79bf..574220b 100644
2.37.3
From 73fdb04878aabd4a118bb66ef6f9a8046a53195d Mon Sep 17 00:00:00 2001
From b6603db7aaeebbbb2c309f509ba4e74048253316 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Fri, 10 Mar 2023 19:24:51 -0300
Subject: syncronize both _getuserbase() copies on site.py and sysconfig.py.