diff --git a/build/python311/build.sh b/build/python311/build.sh index b54ffdb794..1115897a76 100755 --- a/build/python311/build.sh +++ b/build/python311/build.sh @@ -17,7 +17,7 @@ . ../../lib/build.sh PROG=Python -VER=3.11.6 +VER=3.11.7 PKG=runtime/python-311 MVER=${VER%.*} SUMMARY="$PROG $MVER" @@ -124,8 +124,8 @@ post_configure() { } TESTSUITE_SED=" - 1,/tests* OK/ { - /tests* OK/p + 1,/Tests result:/ { + /Tests result:/p d } /Total duration/d diff --git a/build/python311/patches/cross-aarch64.patch b/build/python311/patches/cross-aarch64.patch index c635b19004..0a7d6e7ee2 100644 --- a/build/python311/patches/cross-aarch64.patch +++ b/build/python311/patches/cross-aarch64.patch @@ -26,7 +26,7 @@ diff -wpruN --no-dereference '--exclude=*.orig' a~/configure.ac a/configure.ac else ac_sys_system=`uname -s` if test "$ac_sys_system" = "AIX" \ -@@ -608,6 +612,15 @@ if test "$cross_compiling" = yes; then +@@ -616,6 +620,15 @@ if test "$cross_compiling" = yes; then wasm32-*-* | wasm64-*-*) _host_cpu=$host_cpu ;; diff --git a/build/python311/patches/disable_epoll.patch b/build/python311/patches/disable_epoll.patch index e8b749f871..c2749a9376 100644 --- a/build/python311/patches/disable_epoll.patch +++ b/build/python311/patches/disable_epoll.patch @@ -10,7 +10,7 @@ There is no nice way to tell configure that we don't have it diff -wpruN --no-dereference '--exclude=*.orig' a~/configure.ac a/configure.ac --- a~/configure.ac 1970-01-01 00:00:00 +++ a/configure.ac 1970-01-01 00:00:00 -@@ -4654,8 +4654,8 @@ PY_CHECK_FUNC([symlink], [#include ]) PY_CHECK_FUNC([fsync], [#include ]) PY_CHECK_FUNC([fdatasync], [#include ]) diff --git a/build/python311/patches/revert-makedirs.patch b/build/python311/patches/revert-makedirs.patch index 7cd7c578b2..c175364b1a 100644 --- a/build/python311/patches/revert-makedirs.patch +++ b/build/python311/patches/revert-makedirs.patch @@ -28,7 +28,7 @@ diff -wpruN --no-dereference '--exclude=*.orig' a~/Lib/os.py a/Lib/os.py diff -wpruN --no-dereference '--exclude=*.orig' a~/Lib/test/test_os.py a/Lib/test/test_os.py --- a~/Lib/test/test_os.py 1970-01-01 00:00:00 +++ a/Lib/test/test_os.py 1970-01-01 00:00:00 -@@ -1600,12 +1600,12 @@ class MakedirTests(unittest.TestCase): +@@ -1603,12 +1603,12 @@ class MakedirTests(unittest.TestCase): base = os_helper.TESTFN parent = os.path.join(base, 'dir1') path = os.path.join(parent, 'dir2') diff --git a/build/python311/patches/series b/build/python311/patches/series index 7092b87195..274aa047cf 100644 --- a/build/python311/patches/series +++ b/build/python311/patches/series @@ -23,15 +23,16 @@ mod-shutil-sendfile.patch mod-socket-xpg6.patch # # Test related +test-email.patch test-filecomments.patch test-freeze.patch +test-metadata.patch test-opts.patch -test-vmlimit.patch -test-processgroup.patch -test-zipfile.patch test-pkgutil.patch -test-metadata.patch +test-processgroup.patch test-tarfile.patch +test-termios.patch +test-zipfile.patch revert-makedirs.patch # # Do not add ustack.patch to this file, it is used to build the debug diff --git a/build/python311/patches/test-email.patch b/build/python311/patches/test-email.patch new file mode 100644 index 0000000000..3edeac3098 --- /dev/null +++ b/build/python311/patches/test-email.patch @@ -0,0 +1,12 @@ +diff -wpruN --no-dereference '--exclude=*.orig' a~/Lib/test/test_email/test_utils.py a/Lib/test/test_email/test_utils.py +--- a~/Lib/test/test_email/test_utils.py 1970-01-01 00:00:00 ++++ a/Lib/test/test_email/test_utils.py 1970-01-01 00:00:00 +@@ -145,6 +145,8 @@ class LocaltimeTests(unittest.TestCase): + + @unittest.skipUnless("Europe/Kyiv" in zoneinfo.available_timezones(), + "Can't find a Kyiv timezone database") ++ @unittest.skipIf(sys.platform.startswith("sunos"), ++ "The Kyiv database on SunOS puts 1984 in EET") + @test.support.run_with_tz('Europe/Kyiv') + def test_variable_tzname(self): + t0 = datetime.datetime(1984, 1, 1, tzinfo=datetime.timezone.utc) diff --git a/build/python311/patches/test-filecomments.patch b/build/python311/patches/test-filecomments.patch index cc6b38c961..313723552b 100644 --- a/build/python311/patches/test-filecomments.patch +++ b/build/python311/patches/test-filecomments.patch @@ -4,11 +4,11 @@ Support comments in the test ignore file (see ../files/test.exclude) diff -wpruN --no-dereference '--exclude=*.orig' a~/Lib/test/libregrtest/cmdline.py a/Lib/test/libregrtest/cmdline.py --- a~/Lib/test/libregrtest/cmdline.py 1970-01-01 00:00:00 +++ a/Lib/test/libregrtest/cmdline.py 1970-01-01 00:00:00 -@@ -438,6 +438,7 @@ def _parse_args(args, **kwargs): - ns.ignore_tests = [] - with open(ns.ignore_filename) as fp: +@@ -193,6 +193,7 @@ class FromFileFilterAction(argparse.Acti + items = getattr(namespace, self.dest) + with open(value, encoding='utf-8') as fp: for line in fp: + if line.startswith('#'): continue - ns.ignore_tests.append(line.strip()) - if ns.forever: - # --forever implies --failfast + items.append((line.strip(), self.const)) + + diff --git a/build/python311/patches/test-freeze.patch b/build/python311/patches/test-freeze.patch index 6b7d462c15..21c5a5df1b 100644 --- a/build/python311/patches/test-freeze.patch +++ b/build/python311/patches/test-freeze.patch @@ -2,9 +2,6 @@ This patch: - updates the test to run GNU make; - - Prevents running "make clean" in the copy of the source tree as that removes - the platform-specific sysconfig module, breaking the built python which is - in newroot. - Strips all configure arguments of the form `--XXXdir=YYY` from the configure lines used to build the new perl tree, since these override the temporary --prefix being used for the test. @@ -21,16 +18,7 @@ diff -wpruN --no-dereference '--exclude=*.orig' a~/Tools/freeze/test/freeze.py a FREEZE = os.path.join(TOOL_ROOT, 'freeze.py') OUTDIR = os.path.join(TESTS_DIR, 'outdir') -@@ -90,8 +90,6 @@ def copy_source_tree(newroot, oldroot): - shutil.rmtree(newroot) - - shutil.copytree(oldroot, newroot, ignore=support.copy_python_src_ignore) -- if os.path.exists(os.path.join(newroot, 'Makefile')): -- _run_quiet([MAKE, 'clean'], newroot) - - - ################################## -@@ -122,6 +120,7 @@ def prepare(script=None, outdir=None): +@@ -129,6 +129,7 @@ def prepare(script=None, outdir=None): print(f'configuring python in {builddir}...') config_args = shlex.split(sysconfig.get_config_var('CONFIG_ARGS') or '') cmd = [os.path.join(srcdir, 'configure'), *config_args] diff --git a/build/python311/patches/test-processgroup.patch b/build/python311/patches/test-processgroup.patch index 2d4252de22..b250c252f9 100644 --- a/build/python311/patches/test-processgroup.patch +++ b/build/python311/patches/test-processgroup.patch @@ -3,16 +3,16 @@ Running some sub-tests in process groups causes tests to hang - the reason it not yet known. Disable the use of process groups for now. -diff -wpruN --no-dereference '--exclude=*.orig' a~/Lib/test/libregrtest/runtest_mp.py a/Lib/test/libregrtest/runtest_mp.py ---- a~/Lib/test/libregrtest/runtest_mp.py 1970-01-01 00:00:00 -+++ a/Lib/test/libregrtest/runtest_mp.py 1970-01-01 00:00:00 -@@ -41,7 +41,8 @@ assert MAIN_PROCESS_TIMEOUT >= PROGRESS_ - # Time to wait until a worker completes: should be immediate - JOIN_TIMEOUT = 30.0 # seconds +diff -wpruN --no-dereference '--exclude=*.orig' a~/Lib/test/libregrtest/worker.py a/Lib/test/libregrtest/worker.py +--- a~/Lib/test/libregrtest/worker.py 1970-01-01 00:00:00 ++++ a/Lib/test/libregrtest/worker.py 1970-01-01 00:00:00 +@@ -14,7 +14,8 @@ from .utils import ( + get_temp_dir, get_work_dir, exit_timeout) + -USE_PROCESS_GROUP = (hasattr(os, "setsid") and hasattr(os, "killpg")) +USE_PROCESS_GROUP = (hasattr(os, "setsid") and hasattr(os, "killpg") -+ and not sys.platform.startswith("sunos")) ++ and not sys.platform.startswith("sunos")) - def must_stop(result: TestResult, ns: Namespace) -> bool: + def create_worker_process(runtests: WorkerRunTests, output_fd: int, diff --git a/build/python311/patches/test-termios.patch b/build/python311/patches/test-termios.patch new file mode 100644 index 0000000000..7aeb7275d2 --- /dev/null +++ b/build/python311/patches/test-termios.patch @@ -0,0 +1,38 @@ +diff -wpruN --no-dereference '--exclude=*.orig' a~/Lib/test/test_termios.py a/Lib/test/test_termios.py +--- a~/Lib/test/test_termios.py 1970-01-01 00:00:00 ++++ a/Lib/test/test_termios.py 1970-01-01 00:00:00 +@@ -152,6 +152,8 @@ class TestFunctions(unittest.TestCase): + self.assertRaises(TypeError, termios.tcflow, object(), termios.TCOON) + self.assertRaises(TypeError, termios.tcflow, self.fd) + ++ @unittest.skipIf(sys.platform.startswith("sunos"), ++ "TIOCGWINSZ returns EINVAL for terminals with no size") + def test_tcgetwinsize(self): + size = termios.tcgetwinsize(self.fd) + self.assertIsInstance(size, tuple) +@@ -160,6 +162,8 @@ class TestFunctions(unittest.TestCase): + self.assertIsInstance(size[1], int) + self.assertEqual(termios.tcgetwinsize(self.stream), size) + ++ @unittest.skipIf(sys.platform.startswith("sunos"), ++ "TIOCGWINSZ returns EINVAL for terminals with no size") + def test_tcgetwinsize_errors(self): + self.assertRaisesTermiosError(errno.ENOTTY, termios.tcgetwinsize, self.bad_fd) + self.assertRaises(ValueError, termios.tcgetwinsize, -1) +@@ -167,12 +171,16 @@ class TestFunctions(unittest.TestCase): + self.assertRaises(TypeError, termios.tcgetwinsize, object()) + self.assertRaises(TypeError, termios.tcgetwinsize) + ++ @unittest.skipIf(sys.platform.startswith("sunos"), ++ "TIOCGWINSZ returns EINVAL for terminals with no size") + def test_tcsetwinsize(self): + size = termios.tcgetwinsize(self.fd) + termios.tcsetwinsize(self.fd, size) + termios.tcsetwinsize(self.fd, list(size)) + termios.tcsetwinsize(self.stream, size) + ++ @unittest.skipIf(sys.platform.startswith("sunos"), ++ "TIOCGWINSZ returns EINVAL for terminals with no size") + def test_tcsetwinsize_errors(self): + size = termios.tcgetwinsize(self.fd) + self.assertRaises(TypeError, termios.tcsetwinsize, self.fd, size[:-1]) diff --git a/build/python311/patches/test-vmlimit.patch b/build/python311/patches/test-vmlimit.patch deleted file mode 100644 index 5bd372aba9..0000000000 --- a/build/python311/patches/test-vmlimit.patch +++ /dev/null @@ -1,30 +0,0 @@ -This patch for a Solaris-specific problem but is a good safety precaution, -so although it is not suitable for upstream as-is, we might offer it in a -slightly tweaked form at some point in the future. - -Note that this can also have wrong inpact on other tests (e.g., imap which -tries to allocate huge chunks of virtual memory). - -diff -wpruN --no-dereference '--exclude=*.orig' a~/Lib/test/libregrtest/setup.py a/Lib/test/libregrtest/setup.py ---- a~/Lib/test/libregrtest/setup.py 1970-01-01 00:00:00 -+++ a/Lib/test/libregrtest/setup.py 1970-01-01 00:00:00 -@@ -66,6 +66,19 @@ def setup_tests(ns): - if getattr(module, '__file__', None): - module.__file__ = os.path.abspath(module.__file__) - -+ # The socket test goes crazy on Solaris, slurping up VM until the system -+ # dies or the test is killed. So limit it to 8GB. While we could do this -+ # in the socket test itself, it is more prudent to do it here in case any -+ # other tests ever go crazy in a similar fashion. -+ if sys.platform == 'sunos5': -+ try: -+ import resource -+ except ImportError: -+ pass -+ else: -+ vm_limit = 8589934592 -+ resource.setrlimit(resource.RLIMIT_VMEM, (vm_limit, vm_limit)) -+ - if ns.huntrleaks: - unittest.BaseTestSuite._cleanup = False - diff --git a/build/python311/testsuite.log b/build/python311/testsuite.log index e6f6010d28..fd2f20e5ad 100644 --- a/build/python311/testsuite.log +++ b/build/python311/testsuite.log @@ -1,18 +1,25 @@ -448 tests OK. +== Tests result: FAILURE == + +22 tests skipped: + test.test_asyncio.test_windows_events + test.test_asyncio.test_windows_utils test.test_gdb.test_backtrace + test.test_gdb.test_cfunction test.test_gdb.test_cfunction_full + test.test_gdb.test_misc test.test_gdb.test_pretty_print + test_dbm_gnu test_epoll test_idle test_kqueue test_launcher + test_msilib test_startfile test_tcl test_tix test_tk + test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio + test_winreg + +8 tests skipped (resource denied): + test_ossaudiodev test_smtpnet test_socketserver test_urllib2net + test_urllibnet test_winsound test_xmlrpc_net test_zipfile64 4 tests failed: test_compileall test_dtrace test_import test_importlib -26 tests skipped: - test.test_asyncio.test_windows_events - test.test_asyncio.test_windows_utils test_dbm_gnu test_epoll - test_gdb test_idle test_kqueue test_launcher test_msilib - test_ossaudiodev test_smtpnet test_socketserver test_startfile - test_tcl test_tix test_tk test_ttk_guionly test_ttk_textonly - test_turtle test_urllib2net test_urllibnet test_winconsoleio - test_winreg test_winsound test_xmlrpc_net test_zipfile64 +450 tests OK. -Total tests: run=39,619 failures=26 skipped=1,402 -Total test files: success=448 failed=4 skipped=26 resource_denied=8 +Total tests: run=39,761 (filtered) failures=26 skipped=1,408 +Total test files: run=476/484 (filtered) failed=4 skipped=22 resource_denied=8 Result: FAILURE -make: *** [Makefile:1814: test] Error 2 +make: *** [Makefile:1815: test] Error 2 diff --git a/doc/packages.md b/doc/packages.md index b9acb17a63..e6acfe8218 100644 --- a/doc/packages.md +++ b/doc/packages.md @@ -81,7 +81,7 @@ | runtime/perl | 5.38.2 | https://www.cpan.org/src/README.html | runtime/python-39 | 3.9.18 | https://www.python.org/downloads/source/ | runtime/python-310 | 3.10.13 | https://www.python.org/downloads/source/ -| runtime/python-311 | 3.11.6 | https://www.python.org/downloads/source/ +| runtime/python-311 | 3.11.7 | https://www.python.org/downloads/source/ | security/sudo | 1.9.15p2 | https://www.sudo.ws/ | service/network/chrony | 4.4 | https://download.tuxfamily.org/chrony/ | service/network/ntpsec | 1.2.2 | https://github.com/ntpsec/ntpsec/tags https://blog.ntpsec.org/