* [PATCH 1/2] mpdecimal: Add mpdecimal 4.0.1 as a new recipe in oe-core @ 2026-10-12 9:00 Jaipaul Cheernam 2026-10-12 9:00 ` [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 Jaipaul Cheernam 0 siblings, 1 reply; 28+ messages in thread From: Jaipaul Cheernam @ 2026-10-12 9:00 UTC (permalink / raw) To: openembedded-core Python 3.15 removed the implicit fallback to the bundled copy of libmpdec, requiring a system libmpdecimal to build the _decimal module. [1] - Volunteer to maintain mpdecimal [1] https://github.com/python/cpython/issues/115119 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- meta/conf/distro/include/maintainers.inc | 1 + .../mpdecimal/mpdecimal_4.0.1.bb | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 meta/recipes-support/mpdecimal/mpdecimal_4.0.1.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 94ab0ccace..952ca58cb1 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -542,6 +542,7 @@ RECIPE_MAINTAINER:pn-mkfontscale = "Unassigned <unassigned@yoctoproject.org>" RECIPE_MAINTAINER:pn-mmc-utils = "Unassigned <unassigned@yoctoproject.org>" RECIPE_MAINTAINER:pn-mobile-broadband-provider-info = "Unassigned <unassigned@yoctoproject.org>" RECIPE_MAINTAINER:pn-modutils-initscripts = "Yi Zhao <yi.zhao@windriver.com>" +RECIPE_MAINTAINER:pn-mpdecimal = "Jaipaul Cheernam <jaipaul.cheernam@est.tech>" RECIPE_MAINTAINER:pn-mpfr = "Khem Raj <raj.khem@gmail.com>" RECIPE_MAINTAINER:pn-mpg123 = "Unassigned <unassigned@yoctoproject.org>" RECIPE_MAINTAINER:pn-msmtp = "Wang Mingyu <wangmy@fujitsu.com>" diff --git a/meta/recipes-support/mpdecimal/mpdecimal_4.0.1.bb b/meta/recipes-support/mpdecimal/mpdecimal_4.0.1.bb new file mode 100644 index 0000000000..75d6b71150 --- /dev/null +++ b/meta/recipes-support/mpdecimal/mpdecimal_4.0.1.bb @@ -0,0 +1,24 @@ +SUMMARY = "Library for arbitrary precision decimal floating point arithmetic" +DESCRIPTION = "mpdecimal is a C/C++ library for correctly rounded arbitrary \ +precision decimal floating point arithmetic. It is a complete implementation \ +of Mike Cowlishaw/IBM's General Decimal Arithmetic Specification and provides \ +libmpdec (C) and libmpdec++ (C++)." +HOMEPAGE = "https://www.bytereef.org/mpdecimal/" +SECTION = "libs" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYRIGHT.txt;md5=61bb27059c72d53804ef475f5b18d38f" + +SRC_URI = "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${PV}.tar.gz" +SRC_URI[sha256sum] = "96d33abb4bb0070c7be0fed4246cd38416188325f820468214471938545b1ac8" + +inherit autotools + +# The test suites require network/large data downloads and are not needed +# for the library build consumed by python3's _decimal module. +EXTRA_OECONF = "--disable-static" + +PACKAGES =+ "libmpdec libmpdec++" +FILES:libmpdec = "${libdir}/libmpdec.so.*" +FILES:libmpdec++ = "${libdir}/libmpdec++.so.*" + +BBCLASSEXTEND = "native nativesdk" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 2026-10-12 9:00 [PATCH 1/2] mpdecimal: Add mpdecimal 4.0.1 as a new recipe in oe-core Jaipaul Cheernam @ 2026-10-12 9:00 ` Jaipaul Cheernam 2026-10-12 9:40 ` [OE-core] " Marko, Peter ` (5 more replies) 0 siblings, 6 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-10-12 9:00 UTC (permalink / raw) To: openembedded-core ReleaseNotes: https://docs.python.org/3/whatsnew/changelog.html#python-3-15-0-final - Drop patches which are part of upstream release - 0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch - 0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch - 0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch - valid-dists.patch - Add mpdecimal dependency and --with-system-libmpdec configure option - Bump PYTHON_BASEVERSION to 3.15 in python3-dir.bbclass - Refresh existing patches Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- meta/classes-recipe/python3-dir.bbclass | 2 +- ...shebang-overflow-on-python-config.py.patch | 2 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 2 +- ...-qemu-wrapper-when-gathering-profile.patch | 2 +- ...est_sysconfig-for-posix_user-purelib.patch | 2 +- ...146207-Add-support-for-OpenSSL-4.0.0.patch | 257 ------------------ .../0001-prefer-valid-entrypoints.patch | 2 +- ...g.py-use-platlibdir-also-for-purelib.patch | 2 +- ...le.py-correct-the-test-output-format.patch | 2 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 2 +- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.7.bb => python3_3.15.0.bb} | 11 +- 15 files changed, 14 insertions(+), 713 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.7.bb => python3_3.15.0.bb} (98%) diff --git a/meta/classes-recipe/python3-dir.bbclass b/meta/classes-recipe/python3-dir.bbclass index 3eb0dea9b2..b26621f365 100644 --- a/meta/classes-recipe/python3-dir.bbclass +++ b/meta/classes-recipe/python3-dir.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -PYTHON_BASEVERSION = "3.14" +PYTHON_BASEVERSION = "3.15" PYTHON_ABI = "" PYTHON_DIR = "python${PYTHON_BASEVERSION}" PYTHON_PN = "python3" diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 7a60538364..47ac29f209 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch @@ -1,4 +1,4 @@ -From 3f2df0e1fce8c7425998dade00d084f1b101a982 Mon Sep 17 00:00:00 2001 +From b19edb306e2c035536a904c82c2fb4b18f529cf2 Mon Sep 17 00:00:00 2001 From: Paulo Neves <ptsneves@gmail.com> Date: Tue, 7 Jun 2022 16:16:41 +0200 Subject: [PATCH] Avoid shebang overflow on python-config.py diff --git a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch index 532adfe69a..cc2fdf4bb8 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch @@ -1,4 +1,4 @@ -From 9cd44429215352eb2753e0fd8e25fef24f714006 Mon Sep 17 00:00:00 2001 +From cb744d2ccf74d5ef21fa496a418d2963df28a38f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Thu, 16 Sep 2021 16:35:37 +0200 Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch index 60391e726b..0fce0fc027 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch @@ -1,4 +1,4 @@ -From b5aad6a9b6c5add7a85861aed8aa030c1ad3d52f Mon Sep 17 00:00:00 2001 +From 5bd6a3c5f957cacdf51e07ae94c74fbf6e7f0f28 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Fri, 17 Nov 2023 14:26:32 +0100 Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch index c7f14cad1e..d83d00e0cf 100644 --- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch +++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch @@ -1,4 +1,4 @@ -From d6f77e3a934616d1f6c083b7144c50a32e08b70a Mon Sep 17 00:00:00 2001 +From 64a42f1a618be7af4e5d31ffbeeb4169bad865a9 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 30 Jan 2019 12:41:04 +0100 Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch index 5509b7475a..95d7e4bd07 100644 --- a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch @@ -1,4 +1,4 @@ -From c608cb4b3c8c31f1aa25ad1264ff58733fb99769 Mon Sep 17 00:00:00 2001 +From 2cca08e2cb4be0a725c4c9ea76234bfea5a8534c Mon Sep 17 00:00:00 2001 From: Wentao Zhang <wentao.zhang@windriver.com> Date: Mon, 20 Mar 2023 13:39:52 +0800 Subject: [PATCH] Update test_sysconfig for posix_user purelib diff --git a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch b/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch deleted file mode 100644 index bef6044358..0000000000 --- a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch +++ /dev/null @@ -1,257 +0,0 @@ -From 3364e7e62fa24d0e19133fb0f90b1c24ef1110c5 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Wed, 25 Mar 2026 07:44:47 +0100 -Subject: [PATCH] gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217) - -OpenSSL 4.0.0 alpha1 removed these functions: - -* SSLv3_method() -* TLSv1_method() -* TLSv1_1_method() -* TLSv1_2_method() - -Other changes: - -* Update test_openssl_version(). -* Update multissltests.py for OpenSSL 4. -* Add const qualifier to fix compiler warnings. - -Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> -Signed-off-by: Victor Stinner <vstinner@python.org> - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3364e7e62fa24d0e19133fb0f90b1c24ef1110c5] -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 52 ++++++++++++++++++++------------------ - Modules/_ssl.c | 27 ++++++++++++++++---- - Modules/_ssl/cert.c | 3 ++- - Tools/ssl/multissltests.py | 7 ++++- - 4 files changed, 58 insertions(+), 31 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index dc795c6bd8a..61355927296 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -395,7 +395,7 @@ def test_constants(self): - ssl.OP_NO_COMPRESSION - self.assertEqual(ssl.HAS_SNI, True) - self.assertEqual(ssl.HAS_ECDH, True) -- self.assertEqual(ssl.HAS_TLSv1_2, True) -+ self.assertIsInstance(ssl.HAS_TLSv1_2, bool) - self.assertEqual(ssl.HAS_TLSv1_3, True) - ssl.OP_NO_SSLv2 - ssl.OP_NO_SSLv3 -@@ -586,11 +586,11 @@ def test_openssl_version(self): - # Some sanity checks follow - # >= 1.1.1 - self.assertGreaterEqual(n, 0x10101000) -- # < 4.0 -- self.assertLess(n, 0x40000000) -+ # < 5.0 -+ self.assertLess(n, 0x50000000) - major, minor, fix, patch, status = t - self.assertGreaterEqual(major, 1) -- self.assertLess(major, 4) -+ self.assertLess(major, 5) - self.assertGreaterEqual(minor, 0) - self.assertLess(minor, 256) - self.assertGreaterEqual(fix, 0) -@@ -656,12 +656,14 @@ def test_openssl111_deprecations(self): - ssl.OP_NO_TLSv1_2, - ssl.OP_NO_TLSv1_3 - ] -- protocols = [ -- ssl.PROTOCOL_TLSv1, -- ssl.PROTOCOL_TLSv1_1, -- ssl.PROTOCOL_TLSv1_2, -- ssl.PROTOCOL_TLS -- ] -+ protocols = [] -+ if hasattr(ssl, 'PROTOCOL_TLSv1'): -+ protocols.append(ssl.PROTOCOL_TLSv1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_1'): -+ protocols.append(ssl.PROTOCOL_TLSv1_1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_2'): -+ protocols.append(ssl.PROTOCOL_TLSv1_2) -+ protocols.append(ssl.PROTOCOL_TLS) - versions = [ - ssl.TLSVersion.SSLv3, - ssl.TLSVersion.TLSv1, -@@ -1205,6 +1207,7 @@ def test_min_max_version(self): - ssl.TLSVersion.TLSv1, - ssl.TLSVersion.TLSv1_1, - ssl.TLSVersion.TLSv1_2, -+ ssl.TLSVersion.TLSv1_3, - ssl.TLSVersion.SSLv3, - } - ) -@@ -1218,7 +1221,7 @@ def test_min_max_version(self): - with self.assertRaises(ValueError): - ctx.minimum_version = 42 - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_1) - - self.assertIn( -@@ -1675,23 +1678,24 @@ def test__create_stdlib_context(self): - self.assertFalse(ctx.check_hostname) - self._assert_context_options(ctx) - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - with warnings_helper.check_warnings(): - ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) - self._assert_context_options(ctx) - -- with warnings_helper.check_warnings(): -- ctx = ssl._create_stdlib_context( -- ssl.PROTOCOL_TLSv1_2, -- cert_reqs=ssl.CERT_REQUIRED, -- check_hostname=True -- ) -- self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -- self.assertTrue(ctx.check_hostname) -- self._assert_context_options(ctx) -+ if has_tls_protocol('PROTOCOL_TLSv1_2'): -+ with warnings_helper.check_warnings(): -+ ctx = ssl._create_stdlib_context( -+ ssl.PROTOCOL_TLSv1_2, -+ cert_reqs=ssl.CERT_REQUIRED, -+ check_hostname=True -+ ) -+ self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -+ self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -+ self.assertTrue(ctx.check_hostname) -+ self._assert_context_options(ctx) - - ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_SERVER) -@@ -3654,10 +3658,10 @@ def test_protocol_tlsv1_2(self): - client_options=ssl.OP_NO_TLSv1_2) - - try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2') -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False) -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False) - -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index b45295b4c0c..6f75af86113 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -164,6 +164,17 @@ static void _PySSLFixErrno(void) { - #error Unsupported OpenSSL version - #endif - -+#if (OPENSSL_VERSION_NUMBER >= 0x40000000L) -+# define OPENSSL_NO_SSL3 -+# define OPENSSL_NO_TLS1 -+# define OPENSSL_NO_TLS1_1 -+# define OPENSSL_NO_TLS1_2 -+# define OPENSSL_NO_SSL3_METHOD -+# define OPENSSL_NO_TLS1_METHOD -+# define OPENSSL_NO_TLS1_1_METHOD -+# define OPENSSL_NO_TLS1_2_METHOD -+#endif -+ - /* OpenSSL API 1.1.0+ does not include version methods */ - #ifndef OPENSSL_NO_SSL3_METHOD - extern const SSL_METHOD *SSLv3_method(void); -@@ -1151,7 +1162,7 @@ _asn1obj2py(_sslmodulestate *state, const ASN1_OBJECT *name, int no_name) - - static PyObject * - _create_tuple_for_attribute(_sslmodulestate *state, -- ASN1_OBJECT *name, ASN1_STRING *value) -+ const ASN1_OBJECT *name, const ASN1_STRING *value) - { - Py_ssize_t buflen; - PyObject *pyattr; -@@ -1180,16 +1191,16 @@ _create_tuple_for_attribute(_sslmodulestate *state, - } - - static PyObject * --_create_tuple_for_X509_NAME (_sslmodulestate *state, X509_NAME *xname) -+_create_tuple_for_X509_NAME(_sslmodulestate *state, const X509_NAME *xname) - { - PyObject *dn = NULL; /* tuple which represents the "distinguished name" */ - PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */ - PyObject *rdnt; - PyObject *attr = NULL; /* tuple to hold an attribute */ - int entry_count = X509_NAME_entry_count(xname); -- X509_NAME_ENTRY *entry; -- ASN1_OBJECT *name; -- ASN1_STRING *value; -+ const X509_NAME_ENTRY *entry; -+ const ASN1_OBJECT *name; -+ const ASN1_STRING *value; - int index_counter; - int rdn_level = -1; - int retcode; -@@ -6967,9 +6978,15 @@ sslmodule_init_constants(PyObject *m) - ADD_INT_CONST("PROTOCOL_TLS", PY_SSL_VERSION_TLS); - ADD_INT_CONST("PROTOCOL_TLS_CLIENT", PY_SSL_VERSION_TLS_CLIENT); - ADD_INT_CONST("PROTOCOL_TLS_SERVER", PY_SSL_VERSION_TLS_SERVER); -+#ifndef OPENSSL_NO_TLS1 - ADD_INT_CONST("PROTOCOL_TLSv1", PY_SSL_VERSION_TLS1); -+#endif -+#ifndef OPENSSL_NO_TLS1_1 - ADD_INT_CONST("PROTOCOL_TLSv1_1", PY_SSL_VERSION_TLS1_1); -+#endif -+#ifndef OPENSSL_NO_TLS1_2 - ADD_INT_CONST("PROTOCOL_TLSv1_2", PY_SSL_VERSION_TLS1_2); -+#endif - - #define ADD_OPTION(NAME, VALUE) if (sslmodule_add_option(m, NAME, (VALUE)) < 0) return -1 - -diff --git a/Modules/_ssl/cert.c b/Modules/_ssl/cert.c -index f2e7be89668..061b0fb3171 100644 ---- a/Modules/_ssl/cert.c -+++ b/Modules/_ssl/cert.c -@@ -128,7 +128,8 @@ _ssl_Certificate_get_info_impl(PySSLCertificate *self) - } - - static PyObject* --_x509name_print(_sslmodulestate *state, X509_NAME *name, int indent, unsigned long flags) -+_x509name_print(_sslmodulestate *state, const X509_NAME *name, -+ int indent, unsigned long flags) - { - PyObject *res; - BIO *biobuf; -diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py -index 3b4507c6771..48207e5330f 100755 ---- a/Tools/ssl/multissltests.py -+++ b/Tools/ssl/multissltests.py -@@ -429,9 +429,11 @@ def _post_install(self): - def _post_install(self): - if self.version.startswith("3."): - self._post_install_3xx() -+ elif self.version.startswith("4."): -+ self._post_install_4xx() - - def _build_src(self, config_args=()): -- if self.version.startswith("3."): -+ if self.version.startswith(("3.", "4.")): - config_args += ("enable-fips",) - super()._build_src(config_args) - -@@ -447,6 +449,9 @@ def _post_install_3xx(self): - lib64 = self.lib_dir + "64" - os.symlink(lib64, self.lib_dir) - -+ def _post_install_4xx(self): -+ self._post_install_3xx() -+ - @property - def short_version(self): - """Short version for OpenSSL download URL""" --- -2.25.1 - diff --git a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch index ae3698fac4..030f82f99b 100644 --- a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch +++ b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch @@ -1,4 +1,4 @@ -From 8d7fcf04c6513841c7985e64b746b1ef5de0c426 Mon Sep 17 00:00:00 2001 +From 8889d373f2218253555d69b9ad022f52bc4ad78d Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@arm.com> Date: Fri, 17 Apr 2026 16:53:42 +0100 Subject: [PATCH] prefer valid entrypoints diff --git a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch index 7807827d9a..3ac97d348b 100644 --- a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch @@ -1,4 +1,4 @@ -From c10d1b295a9fb93836830cce441da3f22e5c7cd7 Mon Sep 17 00:00:00 2001 +From 31ca770452781c56c19b98e584db3bc964116b44 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Sun, 12 Sep 2021 21:44:36 +0200 Subject: [PATCH] sysconfig.py: use platlibdir also for purelib diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch index a60d082e2f..8e72a374d9 100644 --- a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch +++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch @@ -1,4 +1,4 @@ -From f0ac5b479b99bfb7f5e937a941b31a596f4caafc Mon Sep 17 00:00:00 2001 +From a712d1ebb55ac8e5801a5c2179945ce26638a548 Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Mon, 5 Aug 2019 15:57:39 +0800 Subject: [PATCH] test_locale.py: correct the test output format diff --git a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch b/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch deleted file mode 100644 index 587f141dd4..0000000000 --- a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch +++ /dev/null @@ -1,234 +0,0 @@ -From 3c2a3014af7d73cc34f2498f60fdf863d9bc7c6c Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 13:52:57 +0200 -Subject: [PATCH] gh-148292: Update _ssl._SSLSocket for OpenSSL 4 (#149102) - -The _SSLSocket object now remembers if it gets an EOF error. In this -case, read(), sendfile(), write() and do_handshake method calls fail -with SSLEOFError without calling the underlying OpenSSL function. - -Co-authored-by: Gregory P. Smith <greg@krypto.org> -(cherry picked from commit 7b7fa3f9bf3d7cdf3eb669d02b386e05b39c402a) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3c2a3014af7d] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 82 +++++++++++++++++++ - ...-04-28-17-47-55.gh-issue-148292.oIq3ml.rst | 7 ++ - Modules/_ssl.c | 42 ++++++++++ - 3 files changed, 131 insertions(+) - create mode 100644 Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 965dbc36f096499..03d9e3f9e5e96b5 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -2711,6 +2711,36 @@ def close(self): - def stop(self): - self.active = False - -+class TestEOFServer(threading.Thread): -+ def __init__(self): -+ super().__init__() -+ self.listening = threading.Event() -+ self.address = None -+ -+ def run(self): -+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) -+ context.load_cert_chain(CERTFILE) -+ server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ with server_sock: -+ server_sock.settimeout(support.SHORT_TIMEOUT) -+ server_sock.bind((HOST, 0)) -+ server_sock.listen(5) -+ -+ self.address = server_sock.getsockname() -+ self.listening.set() -+ -+ sock, addr = server_sock.accept() -+ sslconn = context.wrap_socket(sock, server_side=True) -+ with sslconn: -+ request = b'' -+ while chunk := sslconn.recv(1024): -+ request += chunk -+ if b'\n' in chunk: -+ break -+ -+ sslconn.sendall(b'server\n') -+ sslconn.shutdown(socket.SHUT_WR) -+ - class AsyncoreEchoServer(threading.Thread): - - # this one's based on asyncore.dispatcher -@@ -4747,6 +4777,58 @@ def background(sock): - if cm.exc_value is not None: - raise cm.exc_value - -+ def test_got_eof(self): -+ # gh-148292: Test that _ssl._SSLSocket behaves the same on all OpenSSL -+ # versions on calling methods after EOF (after the first SSLEOFError). -+ -+ server = TestEOFServer() -+ server.start() -+ if not server.listening.wait(support.SHORT_TIMEOUT): -+ raise RuntimeError("server took too long") -+ self.addCleanup(server.join) -+ -+ context = ssl.create_default_context(cafile=CERTFILE) -+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ sock.settimeout(support.SHORT_TIMEOUT) -+ sock.connect(server.address) -+ sslsock = context.wrap_socket(sock, server_hostname='localhost') -+ with sslsock: -+ sslsock.sendall(b'client\n') -+ # test the _ssl._SSLSocket object, not ssl.SSLSocket -+ sslobj = sslsock._sslobj -+ -+ data = sslobj.read(1024) -+ self.assertEqual(data, b'server\n') -+ -+ # The second read gets EOF error and sets got_eof_error to 1 -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.read(1024) -+ -+ # Following read(), sendfile(), write() and do_handshake() calls -+ # must raise SSLEOFError -+ with self.assertRaises(ssl.SSLEOFError): -+ # The _SSLSocket remembers the previous EOF error -+ # and raises again SSLEOFError -+ sslobj.read(1024) -+ if hasattr(sslobj, 'sendfile'): -+ with open(__file__, "rb") as fp: -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.sendfile(fp.fileno(), 0, 1) -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.write(b'client2\n') -+ with self.assertRaises(ssl.SSLEOFError): -+ sslsock.do_handshake() -+ -+ self.assertEqual(sslsock.pending(), 0) -+ try: -+ sslsock.shutdown(socket.SHUT_WR) -+ except OSError as exc: -+ self.assertEqual(exc.errno, errno.ENOTCONN) -+ else: -+ # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -+ # raise an error -+ pass -+ - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, - "Test needs TLS 1.3 PHA") -diff --git a/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -new file mode 100644 -index 000000000000000..e1f308df5a678e6 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -@@ -0,0 +1,7 @@ -+:mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` for -+OpenSSL 4. The classes now remember if they get a :exc:`ssl.SSLEOFError`. In this -+case, following :meth:`~ssl.SSLSocket.read`, :meth:`!sendfile`, -+:meth:`~ssl.SSLSocket.write`, and :meth:`~ssl.SSLSocket.do_handshake` calls -+raise :exc:`ssl.SSLEOFError` without calling the underlying OpenSSL function. -+Thanks to that, :class:`ssl.SSLSocket` behaves the same on all OpenSSL versions -+on EOF. Patch by Victor Stinner. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index 1603d0ffd559559..376df32b7cb4bd6 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -352,6 +352,16 @@ typedef struct { - * and shutdown methods check for chained exceptions. - */ - PyObject *exc; -+ // gh-148292: If non-zero, read(), sendfile(), write() and do_handshake() -+ // methods raise SSLEOFError without calling the underlying OpenSSL -+ // function. Set to 1 on PY_SSL_ERROR_EOF error. -+ // -+ // On OpenSSL 4, if SSL_read_ex() fails with -+ // SSL_R_UNEXPECTED_EOF_WHILE_READING, the following SSL_read_ex() call -+ // fails with a generic protocol error (ERR_peek_last_error() returns 0). -+ // Use got_eof_error to have the same behavior on OpenSSL 4 and newer and -+ // on OpenSSL 3 and older. -+ int got_eof_error; - } PySSLSocket; - - #define PySSLSocket_CAST(op) ((PySSLSocket *)(op)) -@@ -499,6 +509,10 @@ fill_and_set_sslerror(_sslmodulestate *state, - PyObject *init_value, *msg, *key; - PyUnicodeWriter *writer = NULL; - -+ if (ssl_errno == PY_SSL_ERROR_EOF && sslsock != NULL) { -+ sslsock->got_eof_error = 1; -+ } -+ - if (errcode != 0) { - int lib, reason; - -@@ -654,6 +668,18 @@ PySSL_ChainExceptions(PySSLSocket *sslsock) { - return -1; - } - -+ -+static void -+set_eof_error(PySSLSocket *sslsock) -+{ -+ _sslmodulestate *state = get_state_sock(sslsock); -+ fill_and_set_sslerror(state, sslsock, state->PySSLEOFErrorObject, -+ PY_SSL_ERROR_EOF, -+ "EOF occurred in violation of protocol", -+ __LINE__, 0); -+} -+ -+ - static PyObject * - PySSL_SetError(PySSLSocket *sslsock, const char *filename, int lineno) - { -@@ -901,6 +927,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, - self->server_hostname = NULL; - self->err = err; - self->exc = NULL; -+ self->got_eof_error = 0; - - /* Make sure the SSL error state is initialized */ - ERR_clear_error(); -@@ -1041,6 +1068,11 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2504,6 +2536,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2644,6 +2681,11 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len, - Py_INCREF(sock); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - if (!group_right_1) { - dest = PyBytes_FromStringAndSize(NULL, len); - if (dest == NULL) diff --git a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch b/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch deleted file mode 100644 index af067f549c..0000000000 --- a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 81911909bc439d6de8ce6a173b0691b3c58e9e1a Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 16:20:25 +0200 -Subject: [PATCH] gh-148292: Remove shutdown() test in test_ssl.test_got_eof() - (#149366) - -The shutdown() behavior depends too much on the operating system and -it's unrelated to the got_eof_error change. - -(cherry picked from commit 1e21cf6fee3830012e458c0fe5dbc6fcd45ace92) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/81911909bc43] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 03d9e3f9e5e96b5..6445f122b4272be 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -4820,14 +4820,6 @@ def test_got_eof(self): - sslsock.do_handshake() - - self.assertEqual(sslsock.pending(), 0) -- try: -- sslsock.shutdown(socket.SHUT_WR) -- except OSError as exc: -- self.assertEqual(exc.errno, errno.ENOTCONN) -- else: -- # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -- # raise an error -- pass - - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch index 248a521118..c6c01332ce 100644 --- a/meta/recipes-devtools/python/python3/makerace.patch +++ b/meta/recipes-devtools/python/python3/makerace.patch @@ -1,4 +1,4 @@ -From b41557f570ff4451c477669d6ca5bfacabe21c66 Mon Sep 17 00:00:00 2001 +From 7b796f0e8953a9c9e9402c8c60eccc19a33874a9 Mon Sep 17 00:00:00 2001 From: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue, 13 Jul 2021 23:19:29 +0100 Subject: [PATCH] python3: Fix make race diff --git a/meta/recipes-devtools/python/python3/valid-dists.patch b/meta/recipes-devtools/python/python3/valid-dists.patch deleted file mode 100644 index 7fe18254e5..0000000000 --- a/meta/recipes-devtools/python/python3/valid-dists.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 66874ce1a9f21b4b00dc85919734d58e6243ca29 Mon Sep 17 00:00:00 2001 -From: "Jason R. Coombs" <jaraco@jaraco.com> -Date: Tue, 23 Jul 2024 08:36:16 -0400 -Subject: [PATCH] Prioritize valid dists to invalid dists when retrieving by - name. - -Closes python/importlib_metadata#489 - -Upstream-Status: Backport [https://github.com/python/importlib_metadata/commit/a65c29adc027b3615154cab73aaedd58a6aa23da] -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - Lib/importlib/metadata/__init__.py | 14 +++- - Lib/importlib/metadata/_itertools.py | 98 ++++++++++++++++++++++++++++ - 2 files changed, 110 insertions(+), 2 deletions(-) - -diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 8ce62dd..085378c 100644 ---- a/Lib/importlib/metadata/__init__.py -+++ b/Lib/importlib/metadata/__init__.py -@@ -21,7 +21,7 @@ import collections - from . import _meta - from ._collections import FreezableDefaultDict, Pair - from ._functools import method_cache, pass_none --from ._itertools import always_iterable, unique_everseen -+from ._itertools import always_iterable, bucket, unique_everseen - from ._meta import PackageMetadata, SimplePath - - from contextlib import suppress -@@ -404,7 +404,7 @@ class Distribution(DeprecatedNonAbstract): - if not name: - raise ValueError("A distribution name is required.") - try: -- return next(iter(cls.discover(name=name))) -+ return next(iter(cls._prefer_valid(cls.discover(name=name)))) - except StopIteration: - raise PackageNotFoundError(name) - -@@ -428,6 +428,16 @@ class Distribution(DeprecatedNonAbstract): - resolver(context) for resolver in cls._discover_resolvers() - ) - -+ @staticmethod -+ def _prefer_valid(dists: Iterable[Distribution]) -> Iterable[Distribution]: -+ """ -+ Prefer (move to the front) distributions that have metadata. -+ -+ Ref python/importlib_resources#489. -+ """ -+ buckets = bucket(dists, lambda dist: bool(dist.metadata)) -+ return itertools.chain(buckets[True], buckets[False]) -+ - @staticmethod - def at(path: str | os.PathLike[str]) -> Distribution: - """Return a Distribution for the indicated metadata path. -diff --git a/Lib/importlib/metadata/_itertools.py b/Lib/importlib/metadata/_itertools.py -index d4ca9b9..79d3719 100644 ---- a/Lib/importlib/metadata/_itertools.py -+++ b/Lib/importlib/metadata/_itertools.py -@@ -1,3 +1,4 @@ -+from collections import defaultdict, deque - from itertools import filterfalse - - -@@ -71,3 +72,100 @@ def always_iterable(obj, base_type=(str, bytes)): - return iter(obj) - except TypeError: - return iter((obj,)) -+ -+ -+# Copied from more_itertools 10.3 -+class bucket: -+ """Wrap *iterable* and return an object that buckets the iterable into -+ child iterables based on a *key* function. -+ -+ >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] -+ >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character -+ >>> sorted(list(s)) # Get the keys -+ ['a', 'b', 'c'] -+ >>> a_iterable = s['a'] -+ >>> next(a_iterable) -+ 'a1' -+ >>> next(a_iterable) -+ 'a2' -+ >>> list(s['b']) -+ ['b1', 'b2', 'b3'] -+ -+ The original iterable will be advanced and its items will be cached until -+ they are used by the child iterables. This may require significant storage. -+ -+ By default, attempting to select a bucket to which no items belong will -+ exhaust the iterable and cache all values. -+ If you specify a *validator* function, selected buckets will instead be -+ checked against it. -+ -+ >>> from itertools import count -+ >>> it = count(1, 2) # Infinite sequence of odd numbers -+ >>> key = lambda x: x % 10 # Bucket by last digit -+ >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only -+ >>> s = bucket(it, key=key, validator=validator) -+ >>> 2 in s -+ False -+ >>> list(s[2]) -+ [] -+ -+ """ -+ -+ def __init__(self, iterable, key, validator=None): -+ self._it = iter(iterable) -+ self._key = key -+ self._cache = defaultdict(deque) -+ self._validator = validator or (lambda x: True) -+ -+ def __contains__(self, value): -+ if not self._validator(value): -+ return False -+ -+ try: -+ item = next(self[value]) -+ except StopIteration: -+ return False -+ else: -+ self._cache[value].appendleft(item) -+ -+ return True -+ -+ def _get_values(self, value): -+ """ -+ Helper to yield items from the parent iterator that match *value*. -+ Items that don't match are stored in the local cache as they -+ are encountered. -+ """ -+ while True: -+ # If we've cached some items that match the target value, emit -+ # the first one and evict it from the cache. -+ if self._cache[value]: -+ yield self._cache[value].popleft() -+ # Otherwise we need to advance the parent iterator to search for -+ # a matching item, caching the rest. -+ else: -+ while True: -+ try: -+ item = next(self._it) -+ except StopIteration: -+ return -+ item_value = self._key(item) -+ if item_value == value: -+ yield item -+ break -+ elif self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ def __iter__(self): -+ for item in self._it: -+ item_value = self._key(item) -+ if self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ yield from self._cache.keys() -+ -+ def __getitem__(self, value): -+ if not self._validator(value): -+ return iter(()) -+ -+ return self._get_values(value) diff --git a/meta/recipes-devtools/python/python3_3.14.7.bb b/meta/recipes-devtools/python/python3_3.15.0.bb similarity index 98% rename from meta/recipes-devtools/python/python3_3.14.7.bb rename to meta/recipes-devtools/python/python3_3.15.0.bb index f917edebd8..71a2973e20 100644 --- a/meta/recipes-devtools/python/python3_3.14.7.bb +++ b/meta/recipes-devtools/python/python3_3.15.0.bb @@ -18,19 +18,15 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://makerace.patch \ file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \ file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \ - file://valid-dists.patch \ file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \ file://0001-prefer-valid-entrypoints.patch \ - file://0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch \ - file://0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch \ - file://0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch \ " SRC_URI:append:class-native = " \ file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ " -SRC_URI[sha256sum] = "3b48dac8fb59f62eaa67ac83c1eb12bda1b7a08406dd286e252c11a66be27f81" +SRC_URI[sha256sum] = "ba4bed1ba346b916890b76d9e320451420aa69f6408997d33c66482eeae3d575" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" @@ -41,7 +37,7 @@ inherit upstream-stable-release-point CVE_PRODUCT = "python:python python_software_foundation:python cpython" -PYTHON_MAJMIN = "3.14" +PYTHON_MAJMIN = "3.15" S = "${UNPACKDIR}/Python-${PV}" @@ -61,6 +57,7 @@ DEPENDS = "\ bzip2-replacement-native \ expat \ libffi \ + mpdecimal \ ncurses \ openssl \ sqlite3 \ @@ -75,7 +72,7 @@ DEPENDS = "\ DEPENDS:append:class-target = " python3-native" DEPENDS:append:class-nativesdk = " python3-native" -EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat" +EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat --with-system-libmpdec" EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3 PLATFORM_TRIPLET=${HOST_ARCH}-${HOST_OS}" EXTRA_OECONF:append:class-nativesdk = " --with-build-python=nativepython3" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* RE: [OE-core] [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 2026-10-12 9:00 ` [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 Jaipaul Cheernam @ 2026-10-12 9:40 ` Marko, Peter 2026-10-12 10:14 ` Jaipaul Cheernam 2026-10-29 21:06 ` [PATCH v3 0/2] python3 upgrade to 3.15.2 Jaipaul Cheernam ` (4 subsequent siblings) 5 siblings, 1 reply; 28+ messages in thread From: Marko, Peter @ 2026-10-12 9:40 UTC (permalink / raw) To: Jaipaul Cheernam, openembedded-core@lists.openembedded.org Hello, I'd also expect some changes in python3-manifest.json for a new release. Have you checked that? Peter > -----Original Message----- > From: openembedded-core@lists.openembedded.org <openembedded- > core@lists.openembedded.org> On Behalf Of Jaipaul Cheernam > Sent: Monday, October 12, 2026 11:01 AM > To: openembedded-core@lists.openembedded.org > Subject: [OE-core] [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 > > ReleaseNotes: https://docs.python.org/3/whatsnew/changelog.html#python-3-15- > 0-final > > - Drop patches which are part of upstream release > - 0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch > - 0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch > - 0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch > - valid-dists.patch > - Add mpdecimal dependency and --with-system-libmpdec configure option > - Bump PYTHON_BASEVERSION to 3.15 in python3-dir.bbclass > - Refresh existing patches > > Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> > --- > meta/classes-recipe/python3-dir.bbclass | 2 +- > ...shebang-overflow-on-python-config.py.patch | 2 +- > ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- > ...-use-prefix-value-from-build-configu.patch | 2 +- > ...-qemu-wrapper-when-gathering-profile.patch | 2 +- > ...est_sysconfig-for-posix_user-purelib.patch | 2 +- > ...146207-Add-support-for-OpenSSL-4.0.0.patch | 257 ------------------ > .../0001-prefer-valid-entrypoints.patch | 2 +- > ...g.py-use-platlibdir-also-for-purelib.patch | 2 +- > ...le.py-correct-the-test-output-format.patch | 2 +- > ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- > ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- > .../python/python3/makerace.patch | 2 +- > .../python/python3/valid-dists.patch | 164 ----------- > .../{python3_3.14.7.bb => python3_3.15.0.bb} | 11 +- > 15 files changed, 14 insertions(+), 713 deletions(-) > delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207- > Add-support-for-OpenSSL-4.0.0.patch > delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292- > Update-_ssl._SSLSocket-for-OpenSSL-4.patch > delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292- > Remove-shutdown-test-in-test_ssl.test_got_eof.patch > delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch > rename meta/recipes-devtools/python/{python3_3.14.7.bb => > python3_3.15.0.bb} (98%) > > diff --git a/meta/classes-recipe/python3-dir.bbclass b/meta/classes- > recipe/python3-dir.bbclass > index 3eb0dea9b2..b26621f365 100644 > --- a/meta/classes-recipe/python3-dir.bbclass > +++ b/meta/classes-recipe/python3-dir.bbclass > @@ -4,7 +4,7 @@ > # SPDX-License-Identifier: MIT > # > > -PYTHON_BASEVERSION = "3.14" > +PYTHON_BASEVERSION = "3.15" > PYTHON_ABI = "" > PYTHON_DIR = "python${PYTHON_BASEVERSION}" > PYTHON_PN = "python3" > diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow- > on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid- > shebang-overflow-on-python-config.py.patch > index 7a60538364..47ac29f209 100644 > --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on- > python-config.py.patch > +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on- > python-config.py.patch > @@ -1,4 +1,4 @@ > -From 3f2df0e1fce8c7425998dade00d084f1b101a982 Mon Sep 17 00:00:00 > 2001 > +From b19edb306e2c035536a904c82c2fb4b18f529cf2 Mon Sep 17 00:00:00 > 2001 > From: Paulo Neves <ptsneves@gmail.com> > Date: Tue, 7 Jun 2022 16:16:41 +0200 > Subject: [PATCH] Avoid shebang overflow on python-config.py > diff --git a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I- > O-errors-same-way-as-maste.patch b/meta/recipes- > devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as- > maste.patch > index 532adfe69a..cc2fdf4bb8 100644 > --- a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O- > errors-same-way-as-maste.patch > +++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O- > errors-same-way-as-maste.patch > @@ -1,4 +1,4 @@ > -From 9cd44429215352eb2753e0fd8e25fef24f714006 Mon Sep 17 00:00:00 > 2001 > +From cb744d2ccf74d5ef21fa496a418d2963df28a38f Mon Sep 17 00:00:00 > 2001 > From: Alexander Kanavin <alex@linutronix.de> > Date: Thu, 16 Sep 2021 16:35:37 +0200 > Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O > diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use- > prefix-value-from-build-configu.patch b/meta/recipes- > devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build- > configu.patch > index 60391e726b..0fce0fc027 100644 > --- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix- > value-from-build-configu.patch > +++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix- > value-from-build-configu.patch > @@ -1,4 +1,4 @@ > -From b5aad6a9b6c5add7a85861aed8aa030c1ad3d52f Mon Sep 17 00:00:00 > 2001 > +From 5bd6a3c5f957cacdf51e07ae94c74fbf6e7f0f28 Mon Sep 17 00:00:00 2001 > From: Alexander Kanavin <alex@linutronix.de> > Date: Fri, 17 Nov 2023 14:26:32 +0100 > Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration > diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu- > wrapper-when-gathering-profile.patch b/meta/recipes- > devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering- > profile.patch > index c7f14cad1e..d83d00e0cf 100644 > --- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu- > wrapper-when-gathering-profile.patch > +++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu- > wrapper-when-gathering-profile.patch > @@ -1,4 +1,4 @@ > -From d6f77e3a934616d1f6c083b7144c50a32e08b70a Mon Sep 17 00:00:00 > 2001 > +From 64a42f1a618be7af4e5d31ffbeeb4169bad865a9 Mon Sep 17 00:00:00 > 2001 > From: Alexander Kanavin <alex.kanavin@gmail.com> > Date: Wed, 30 Jan 2019 12:41:04 +0100 > Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data > diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for- > posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update- > test_sysconfig-for-posix_user-purelib.patch > index 5509b7475a..95d7e4bd07 100644 > --- a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for- > posix_user-purelib.patch > +++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for- > posix_user-purelib.patch > @@ -1,4 +1,4 @@ > -From c608cb4b3c8c31f1aa25ad1264ff58733fb99769 Mon Sep 17 00:00:00 > 2001 > +From 2cca08e2cb4be0a725c4c9ea76234bfea5a8534c Mon Sep 17 00:00:00 > 2001 > From: Wentao Zhang <wentao.zhang@windriver.com> > Date: Mon, 20 Mar 2023 13:39:52 +0800 > Subject: [PATCH] Update test_sysconfig for posix_user purelib > diff --git a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support- > for-OpenSSL-4.0.0.patch b/meta/recipes-devtools/python/python3/0001-gh- > 146207-Add-support-for-OpenSSL-4.0.0.patch > deleted file mode 100644 > index bef6044358..0000000000 > --- a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for- > OpenSSL-4.0.0.patch > +++ /dev/null > @@ -1,257 +0,0 @@ > -From 3364e7e62fa24d0e19133fb0f90b1c24ef1110c5 Mon Sep 17 00:00:00 > 2001 > -From: Victor Stinner <vstinner@python.org> > -Date: Wed, 25 Mar 2026 07:44:47 +0100 > -Subject: [PATCH] gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217) > - > -OpenSSL 4.0.0 alpha1 removed these functions: > - > -* SSLv3_method() > -* TLSv1_method() > -* TLSv1_1_method() > -* TLSv1_2_method() > - > -Other changes: > - > -* Update test_openssl_version(). > -* Update multissltests.py for OpenSSL 4. > -* Add const qualifier to fix compiler warnings. > - > -Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> > -Signed-off-by: Victor Stinner <vstinner@python.org> > - > -Upstream-Status: Backport > [https://github.com/python/cpython/commit/3364e7e62fa24d0e19133fb0f90b1c24 > ef1110c5] > -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> > ---- > - Lib/test/test_ssl.py | 52 ++++++++++++++++++++------------------ > - Modules/_ssl.c | 27 ++++++++++++++++---- > - Modules/_ssl/cert.c | 3 ++- > - Tools/ssl/multissltests.py | 7 ++++- > - 4 files changed, 58 insertions(+), 31 deletions(-) > - > -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py > -index dc795c6bd8a..61355927296 100644 > ---- a/Lib/test/test_ssl.py > -+++ b/Lib/test/test_ssl.py > -@@ -395,7 +395,7 @@ def test_constants(self): > - ssl.OP_NO_COMPRESSION > - self.assertEqual(ssl.HAS_SNI, True) > - self.assertEqual(ssl.HAS_ECDH, True) > -- self.assertEqual(ssl.HAS_TLSv1_2, True) > -+ self.assertIsInstance(ssl.HAS_TLSv1_2, bool) > - self.assertEqual(ssl.HAS_TLSv1_3, True) > - ssl.OP_NO_SSLv2 > - ssl.OP_NO_SSLv3 > -@@ -586,11 +586,11 @@ def test_openssl_version(self): > - # Some sanity checks follow > - # >= 1.1.1 > - self.assertGreaterEqual(n, 0x10101000) > -- # < 4.0 > -- self.assertLess(n, 0x40000000) > -+ # < 5.0 > -+ self.assertLess(n, 0x50000000) > - major, minor, fix, patch, status = t > - self.assertGreaterEqual(major, 1) > -- self.assertLess(major, 4) > -+ self.assertLess(major, 5) > - self.assertGreaterEqual(minor, 0) > - self.assertLess(minor, 256) > - self.assertGreaterEqual(fix, 0) > -@@ -656,12 +656,14 @@ def test_openssl111_deprecations(self): > - ssl.OP_NO_TLSv1_2, > - ssl.OP_NO_TLSv1_3 > - ] > -- protocols = [ > -- ssl.PROTOCOL_TLSv1, > -- ssl.PROTOCOL_TLSv1_1, > -- ssl.PROTOCOL_TLSv1_2, > -- ssl.PROTOCOL_TLS > -- ] > -+ protocols = [] > -+ if hasattr(ssl, 'PROTOCOL_TLSv1'): > -+ protocols.append(ssl.PROTOCOL_TLSv1) > -+ if hasattr(ssl, 'PROTOCOL_TLSv1_1'): > -+ protocols.append(ssl.PROTOCOL_TLSv1_1) > -+ if hasattr(ssl, 'PROTOCOL_TLSv1_2'): > -+ protocols.append(ssl.PROTOCOL_TLSv1_2) > -+ protocols.append(ssl.PROTOCOL_TLS) > - versions = [ > - ssl.TLSVersion.SSLv3, > - ssl.TLSVersion.TLSv1, > -@@ -1205,6 +1207,7 @@ def test_min_max_version(self): > - ssl.TLSVersion.TLSv1, > - ssl.TLSVersion.TLSv1_1, > - ssl.TLSVersion.TLSv1_2, > -+ ssl.TLSVersion.TLSv1_3, > - ssl.TLSVersion.SSLv3, > - } > - ) > -@@ -1218,7 +1221,7 @@ def test_min_max_version(self): > - with self.assertRaises(ValueError): > - ctx.minimum_version = 42 > - > -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): > -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): > - ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_1) > - > - self.assertIn( > -@@ -1675,23 +1678,24 @@ def test__create_stdlib_context(self): > - self.assertFalse(ctx.check_hostname) > - self._assert_context_options(ctx) > - > -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): > -+ if has_tls_protocol('PROTOCOL_TLSv1'): > - with warnings_helper.check_warnings(): > - ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1) > - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1) > - self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) > - self._assert_context_options(ctx) > - > -- with warnings_helper.check_warnings(): > -- ctx = ssl._create_stdlib_context( > -- ssl.PROTOCOL_TLSv1_2, > -- cert_reqs=ssl.CERT_REQUIRED, > -- check_hostname=True > -- ) > -- self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) > -- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) > -- self.assertTrue(ctx.check_hostname) > -- self._assert_context_options(ctx) > -+ if has_tls_protocol('PROTOCOL_TLSv1_2'): > -+ with warnings_helper.check_warnings(): > -+ ctx = ssl._create_stdlib_context( > -+ ssl.PROTOCOL_TLSv1_2, > -+ cert_reqs=ssl.CERT_REQUIRED, > -+ check_hostname=True > -+ ) > -+ self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) > -+ self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) > -+ self.assertTrue(ctx.check_hostname) > -+ self._assert_context_options(ctx) > - > - ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH) > - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_SERVER) > -@@ -3654,10 +3658,10 @@ def test_protocol_tlsv1_2(self): > - client_options=ssl.OP_NO_TLSv1_2) > - > - try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLSv1_2, > 'TLSv1.2') > -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): > -+ if has_tls_protocol('PROTOCOL_TLSv1'): > - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, > False) > - try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, > False) > -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): > -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): > - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, > ssl.PROTOCOL_TLSv1_1, False) > - try_protocol_combo(ssl.PROTOCOL_TLSv1_1, > ssl.PROTOCOL_TLSv1_2, False) > - > -diff --git a/Modules/_ssl.c b/Modules/_ssl.c > -index b45295b4c0c..6f75af86113 100644 > ---- a/Modules/_ssl.c > -+++ b/Modules/_ssl.c > -@@ -164,6 +164,17 @@ static void _PySSLFixErrno(void) { > - #error Unsupported OpenSSL version > - #endif > - > -+#if (OPENSSL_VERSION_NUMBER >= 0x40000000L) > -+# define OPENSSL_NO_SSL3 > -+# define OPENSSL_NO_TLS1 > -+# define OPENSSL_NO_TLS1_1 > -+# define OPENSSL_NO_TLS1_2 > -+# define OPENSSL_NO_SSL3_METHOD > -+# define OPENSSL_NO_TLS1_METHOD > -+# define OPENSSL_NO_TLS1_1_METHOD > -+# define OPENSSL_NO_TLS1_2_METHOD > -+#endif > -+ > - /* OpenSSL API 1.1.0+ does not include version methods */ > - #ifndef OPENSSL_NO_SSL3_METHOD > - extern const SSL_METHOD *SSLv3_method(void); > -@@ -1151,7 +1162,7 @@ _asn1obj2py(_sslmodulestate *state, const > ASN1_OBJECT *name, int no_name) > - > - static PyObject * > - _create_tuple_for_attribute(_sslmodulestate *state, > -- ASN1_OBJECT *name, ASN1_STRING *value) > -+ const ASN1_OBJECT *name, const ASN1_STRING *value) > - { > - Py_ssize_t buflen; > - PyObject *pyattr; > -@@ -1180,16 +1191,16 @@ _create_tuple_for_attribute(_sslmodulestate *state, > - } > - > - static PyObject * > --_create_tuple_for_X509_NAME (_sslmodulestate *state, X509_NAME *xname) > -+_create_tuple_for_X509_NAME(_sslmodulestate *state, const X509_NAME > *xname) > - { > - PyObject *dn = NULL; /* tuple which represents the "distinguished name" */ > - PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */ > - PyObject *rdnt; > - PyObject *attr = NULL; /* tuple to hold an attribute */ > - int entry_count = X509_NAME_entry_count(xname); > -- X509_NAME_ENTRY *entry; > -- ASN1_OBJECT *name; > -- ASN1_STRING *value; > -+ const X509_NAME_ENTRY *entry; > -+ const ASN1_OBJECT *name; > -+ const ASN1_STRING *value; > - int index_counter; > - int rdn_level = -1; > - int retcode; > -@@ -6967,9 +6978,15 @@ sslmodule_init_constants(PyObject *m) > - ADD_INT_CONST("PROTOCOL_TLS", PY_SSL_VERSION_TLS); > - ADD_INT_CONST("PROTOCOL_TLS_CLIENT", > PY_SSL_VERSION_TLS_CLIENT); > - ADD_INT_CONST("PROTOCOL_TLS_SERVER", > PY_SSL_VERSION_TLS_SERVER); > -+#ifndef OPENSSL_NO_TLS1 > - ADD_INT_CONST("PROTOCOL_TLSv1", PY_SSL_VERSION_TLS1); > -+#endif > -+#ifndef OPENSSL_NO_TLS1_1 > - ADD_INT_CONST("PROTOCOL_TLSv1_1", PY_SSL_VERSION_TLS1_1); > -+#endif > -+#ifndef OPENSSL_NO_TLS1_2 > - ADD_INT_CONST("PROTOCOL_TLSv1_2", PY_SSL_VERSION_TLS1_2); > -+#endif > - > - #define ADD_OPTION(NAME, VALUE) if (sslmodule_add_option(m, NAME, > (VALUE)) < 0) return -1 > - > -diff --git a/Modules/_ssl/cert.c b/Modules/_ssl/cert.c > -index f2e7be89668..061b0fb3171 100644 > ---- a/Modules/_ssl/cert.c > -+++ b/Modules/_ssl/cert.c > -@@ -128,7 +128,8 @@ _ssl_Certificate_get_info_impl(PySSLCertificate *self) > - } > - > - static PyObject* > --_x509name_print(_sslmodulestate *state, X509_NAME *name, int indent, > unsigned long flags) > -+_x509name_print(_sslmodulestate *state, const X509_NAME *name, > -+ int indent, unsigned long flags) > - { > - PyObject *res; > - BIO *biobuf; > -diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py > -index 3b4507c6771..48207e5330f 100755 > ---- a/Tools/ssl/multissltests.py > -+++ b/Tools/ssl/multissltests.py > -@@ -429,9 +429,11 @@ def _post_install(self): > - def _post_install(self): > - if self.version.startswith("3."): > - self._post_install_3xx() > -+ elif self.version.startswith("4."): > -+ self._post_install_4xx() > - > - def _build_src(self, config_args=()): > -- if self.version.startswith("3."): > -+ if self.version.startswith(("3.", "4.")): > - config_args += ("enable-fips",) > - super()._build_src(config_args) > - > -@@ -447,6 +449,9 @@ def _post_install_3xx(self): > - lib64 = self.lib_dir + "64" > - os.symlink(lib64, self.lib_dir) > - > -+ def _post_install_4xx(self): > -+ self._post_install_3xx() > -+ > - @property > - def short_version(self): > - """Short version for OpenSSL download URL""" > --- > -2.25.1 > - > diff --git a/meta/recipes-devtools/python/python3/0001-prefer-valid- > entrypoints.patch b/meta/recipes-devtools/python/python3/0001-prefer-valid- > entrypoints.patch > index ae3698fac4..030f82f99b 100644 > --- a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch > +++ b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch > @@ -1,4 +1,4 @@ > -From 8d7fcf04c6513841c7985e64b746b1ef5de0c426 Mon Sep 17 00:00:00 > 2001 > +From 8889d373f2218253555d69b9ad022f52bc4ad78d Mon Sep 17 00:00:00 > 2001 > From: Ross Burton <ross.burton@arm.com> > Date: Fri, 17 Apr 2026 16:53:42 +0100 > Subject: [PATCH] prefer valid entrypoints > diff --git a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir- > also-for-purelib.patch b/meta/recipes-devtools/python/python3/0001-sysconfig.py- > use-platlibdir-also-for-purelib.patch > index 7807827d9a..3ac97d348b 100644 > --- a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also- > for-purelib.patch > +++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir- > also-for-purelib.patch > @@ -1,4 +1,4 @@ > -From c10d1b295a9fb93836830cce441da3f22e5c7cd7 Mon Sep 17 00:00:00 > 2001 > +From 31ca770452781c56c19b98e584db3bc964116b44 Mon Sep 17 00:00:00 > 2001 > From: Alexander Kanavin <alex@linutronix.de> > Date: Sun, 12 Sep 2021 21:44:36 +0200 > Subject: [PATCH] sysconfig.py: use platlibdir also for purelib > diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the- > test-output-format.patch b/meta/recipes-devtools/python/python3/0001- > test_locale.py-correct-the-test-output-format.patch > index a60d082e2f..8e72a374d9 100644 > --- a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test- > output-format.patch > +++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test- > output-format.patch > @@ -1,4 +1,4 @@ > -From f0ac5b479b99bfb7f5e937a941b31a596f4caafc Mon Sep 17 00:00:00 > 2001 > +From a712d1ebb55ac8e5801a5c2179945ce26638a548 Mon Sep 17 00:00:00 > 2001 > From: Mingli Yu <mingli.yu@windriver.com> > Date: Mon, 5 Aug 2019 15:57:39 +0800 > Subject: [PATCH] test_locale.py: correct the test output format > diff --git a/meta/recipes-devtools/python/python3/0002-gh-148292-Update- > _ssl._SSLSocket-for-OpenSSL-4.patch b/meta/recipes- > devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for- > OpenSSL-4.patch > deleted file mode 100644 > index 587f141dd4..0000000000 > --- a/meta/recipes-devtools/python/python3/0002-gh-148292-Update- > _ssl._SSLSocket-for-OpenSSL-4.patch > +++ /dev/null > @@ -1,234 +0,0 @@ > -From 3c2a3014af7d73cc34f2498f60fdf863d9bc7c6c Mon Sep 17 00:00:00 2001 > -From: Victor Stinner <vstinner@python.org> > -Date: Mon, 4 May 2026 13:52:57 +0200 > -Subject: [PATCH] gh-148292: Update _ssl._SSLSocket for OpenSSL 4 (#149102) > - > -The _SSLSocket object now remembers if it gets an EOF error. In this > -case, read(), sendfile(), write() and do_handshake method calls fail > -with SSLEOFError without calling the underlying OpenSSL function. > - > -Co-authored-by: Gregory P. Smith <greg@krypto.org> > -(cherry picked from commit 7b7fa3f9bf3d7cdf3eb669d02b386e05b39c402a) > - > -Upstream-Status: Backport > [https://github.com/python/cpython/commit/3c2a3014af7d] > - > -Note: This is from the unmerged CPython PR #149783 which backports > -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging > -until after Python 3.15.1 is released. > - > -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> > ---- > - Lib/test/test_ssl.py | 82 +++++++++++++++++++ > - ...-04-28-17-47-55.gh-issue-148292.oIq3ml.rst | 7 ++ > - Modules/_ssl.c | 42 ++++++++++ > - 3 files changed, 131 insertions(+) > - create mode 100644 Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue- > 148292.oIq3ml.rst > - > -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py > -index 965dbc36f096499..03d9e3f9e5e96b5 100644 > ---- a/Lib/test/test_ssl.py > -+++ b/Lib/test/test_ssl.py > -@@ -2711,6 +2711,36 @@ def close(self): > - def stop(self): > - self.active = False > - > -+class TestEOFServer(threading.Thread): > -+ def __init__(self): > -+ super().__init__() > -+ self.listening = threading.Event() > -+ self.address = None > -+ > -+ def run(self): > -+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) > -+ context.load_cert_chain(CERTFILE) > -+ server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > -+ with server_sock: > -+ server_sock.settimeout(support.SHORT_TIMEOUT) > -+ server_sock.bind((HOST, 0)) > -+ server_sock.listen(5) > -+ > -+ self.address = server_sock.getsockname() > -+ self.listening.set() > -+ > -+ sock, addr = server_sock.accept() > -+ sslconn = context.wrap_socket(sock, server_side=True) > -+ with sslconn: > -+ request = b'' > -+ while chunk := sslconn.recv(1024): > -+ request += chunk > -+ if b'\n' in chunk: > -+ break > -+ > -+ sslconn.sendall(b'server\n') > -+ sslconn.shutdown(socket.SHUT_WR) > -+ > - class AsyncoreEchoServer(threading.Thread): > - > - # this one's based on asyncore.dispatcher > -@@ -4747,6 +4777,58 @@ def background(sock): > - if cm.exc_value is not None: > - raise cm.exc_value > - > -+ def test_got_eof(self): > -+ # gh-148292: Test that _ssl._SSLSocket behaves the same on all > OpenSSL > -+ # versions on calling methods after EOF (after the first SSLEOFError). > -+ > -+ server = TestEOFServer() > -+ server.start() > -+ if not server.listening.wait(support.SHORT_TIMEOUT): > -+ raise RuntimeError("server took too long") > -+ self.addCleanup(server.join) > -+ > -+ context = ssl.create_default_context(cafile=CERTFILE) > -+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > -+ sock.settimeout(support.SHORT_TIMEOUT) > -+ sock.connect(server.address) > -+ sslsock = context.wrap_socket(sock, server_hostname='localhost') > -+ with sslsock: > -+ sslsock.sendall(b'client\n') > -+ # test the _ssl._SSLSocket object, not ssl.SSLSocket > -+ sslobj = sslsock._sslobj > -+ > -+ data = sslobj.read(1024) > -+ self.assertEqual(data, b'server\n') > -+ > -+ # The second read gets EOF error and sets got_eof_error to 1 > -+ with self.assertRaises(ssl.SSLEOFError): > -+ sslobj.read(1024) > -+ > -+ # Following read(), sendfile(), write() and do_handshake() calls > -+ # must raise SSLEOFError > -+ with self.assertRaises(ssl.SSLEOFError): > -+ # The _SSLSocket remembers the previous EOF error > -+ # and raises again SSLEOFError > -+ sslobj.read(1024) > -+ if hasattr(sslobj, 'sendfile'): > -+ with open(__file__, "rb") as fp: > -+ with self.assertRaises(ssl.SSLEOFError): > -+ sslobj.sendfile(fp.fileno(), 0, 1) > -+ with self.assertRaises(ssl.SSLEOFError): > -+ sslobj.write(b'client2\n') > -+ with self.assertRaises(ssl.SSLEOFError): > -+ sslsock.do_handshake() > -+ > -+ self.assertEqual(sslsock.pending(), 0) > -+ try: > -+ sslsock.shutdown(socket.SHUT_WR) > -+ except OSError as exc: > -+ self.assertEqual(exc.errno, errno.ENOTCONN) > -+ else: > -+ # On Windows and on OpenSSL 1.1.1, shutdown() doesn't > -+ # raise an error > -+ pass > -+ > - > - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, > - "Test needs TLS 1.3 PHA") > -diff --git a/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue- > 148292.oIq3ml.rst b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue- > 148292.oIq3ml.rst > -new file mode 100644 > -index 000000000000000..e1f308df5a678e6 > ---- /dev/null > -+++ b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue- > 148292.oIq3ml.rst > -@@ -0,0 +1,7 @@ > -+:mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` for > -+OpenSSL 4. The classes now remember if they get a :exc:`ssl.SSLEOFError`. In > this > -+case, following :meth:`~ssl.SSLSocket.read`, :meth:`!sendfile`, > -+:meth:`~ssl.SSLSocket.write`, and :meth:`~ssl.SSLSocket.do_handshake` calls > -+raise :exc:`ssl.SSLEOFError` without calling the underlying OpenSSL function. > -+Thanks to that, :class:`ssl.SSLSocket` behaves the same on all OpenSSL > versions > -+on EOF. Patch by Victor Stinner. > -diff --git a/Modules/_ssl.c b/Modules/_ssl.c > -index 1603d0ffd559559..376df32b7cb4bd6 100644 > ---- a/Modules/_ssl.c > -+++ b/Modules/_ssl.c > -@@ -352,6 +352,16 @@ typedef struct { > - * and shutdown methods check for chained exceptions. > - */ > - PyObject *exc; > -+ // gh-148292: If non-zero, read(), sendfile(), write() and do_handshake() > -+ // methods raise SSLEOFError without calling the underlying OpenSSL > -+ // function. Set to 1 on PY_SSL_ERROR_EOF error. > -+ // > -+ // On OpenSSL 4, if SSL_read_ex() fails with > -+ // SSL_R_UNEXPECTED_EOF_WHILE_READING, the following > SSL_read_ex() call > -+ // fails with a generic protocol error (ERR_peek_last_error() returns 0). > -+ // Use got_eof_error to have the same behavior on OpenSSL 4 and newer > and > -+ // on OpenSSL 3 and older. > -+ int got_eof_error; > - } PySSLSocket; > - > - #define PySSLSocket_CAST(op) ((PySSLSocket *)(op)) > -@@ -499,6 +509,10 @@ fill_and_set_sslerror(_sslmodulestate *state, > - PyObject *init_value, *msg, *key; > - PyUnicodeWriter *writer = NULL; > - > -+ if (ssl_errno == PY_SSL_ERROR_EOF && sslsock != NULL) { > -+ sslsock->got_eof_error = 1; > -+ } > -+ > - if (errcode != 0) { > - int lib, reason; > - > -@@ -654,6 +668,18 @@ PySSL_ChainExceptions(PySSLSocket *sslsock) { > - return -1; > - } > - > -+ > -+static void > -+set_eof_error(PySSLSocket *sslsock) > -+{ > -+ _sslmodulestate *state = get_state_sock(sslsock); > -+ fill_and_set_sslerror(state, sslsock, state->PySSLEOFErrorObject, > -+ PY_SSL_ERROR_EOF, > -+ "EOF occurred in violation of protocol", > -+ __LINE__, 0); > -+} > -+ > -+ > - static PyObject * > - PySSL_SetError(PySSLSocket *sslsock, const char *filename, int lineno) > - { > -@@ -901,6 +927,7 @@ newPySSLSocket(PySSLContext *sslctx, > PySocketSockObject *sock, > - self->server_hostname = NULL; > - self->err = err; > - self->exc = NULL; > -+ self->got_eof_error = 0; > - > - /* Make sure the SSL error state is initialized */ > - ERR_clear_error(); > -@@ -1041,6 +1068,11 @@ > _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) > - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); > - } > - > -+ if (self->got_eof_error) { > -+ set_eof_error(self); > -+ goto error; > -+ } > -+ > - timeout = GET_SOCKET_TIMEOUT(sock); > - has_timeout = (timeout > 0); > - if (has_timeout) { > -@@ -2504,6 +2536,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, > Py_buffer *b) > - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); > - } > - > -+ if (self->got_eof_error) { > -+ set_eof_error(self); > -+ goto error; > -+ } > -+ > - timeout = GET_SOCKET_TIMEOUT(sock); > - has_timeout = (timeout > 0); > - if (has_timeout) { > -@@ -2644,6 +2681,11 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, > Py_ssize_t len, > - Py_INCREF(sock); > - } > - > -+ if (self->got_eof_error) { > -+ set_eof_error(self); > -+ goto error; > -+ } > -+ > - if (!group_right_1) { > - dest = PyBytes_FromStringAndSize(NULL, len); > - if (dest == NULL) > diff --git a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove- > shutdown-test-in-test_ssl.test_got_eof.patch b/meta/recipes- > devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in- > test_ssl.test_got_eof.patch > deleted file mode 100644 > index af067f549c..0000000000 > --- a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown- > test-in-test_ssl.test_got_eof.patch > +++ /dev/null > @@ -1,41 +0,0 @@ > -From 81911909bc439d6de8ce6a173b0691b3c58e9e1a Mon Sep 17 00:00:00 > 2001 > -From: Victor Stinner <vstinner@python.org> > -Date: Mon, 4 May 2026 16:20:25 +0200 > -Subject: [PATCH] gh-148292: Remove shutdown() test in test_ssl.test_got_eof() > - (#149366) > - > -The shutdown() behavior depends too much on the operating system and > -it's unrelated to the got_eof_error change. > - > -(cherry picked from commit 1e21cf6fee3830012e458c0fe5dbc6fcd45ace92) > - > -Upstream-Status: Backport > [https://github.com/python/cpython/commit/81911909bc43] > - > -Note: This is from the unmerged CPython PR #149783 which backports > -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging > -until after Python 3.15.1 is released. > - > -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> > ---- > - Lib/test/test_ssl.py | 8 -------- > - 1 file changed, 8 deletions(-) > - > -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py > -index 03d9e3f9e5e96b5..6445f122b4272be 100644 > ---- a/Lib/test/test_ssl.py > -+++ b/Lib/test/test_ssl.py > -@@ -4820,14 +4820,6 @@ def test_got_eof(self): > - sslsock.do_handshake() > - > - self.assertEqual(sslsock.pending(), 0) > -- try: > -- sslsock.shutdown(socket.SHUT_WR) > -- except OSError as exc: > -- self.assertEqual(exc.errno, errno.ENOTCONN) > -- else: > -- # On Windows and on OpenSSL 1.1.1, shutdown() doesn't > -- # raise an error > -- pass > - > - > - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, > diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes- > devtools/python/python3/makerace.patch > index 248a521118..c6c01332ce 100644 > --- a/meta/recipes-devtools/python/python3/makerace.patch > +++ b/meta/recipes-devtools/python/python3/makerace.patch > @@ -1,4 +1,4 @@ > -From b41557f570ff4451c477669d6ca5bfacabe21c66 Mon Sep 17 00:00:00 > 2001 > +From 7b796f0e8953a9c9e9402c8c60eccc19a33874a9 Mon Sep 17 00:00:00 > 2001 > From: Richard Purdie <richard.purdie@linuxfoundation.org> > Date: Tue, 13 Jul 2021 23:19:29 +0100 > Subject: [PATCH] python3: Fix make race > diff --git a/meta/recipes-devtools/python/python3/valid-dists.patch b/meta/recipes- > devtools/python/python3/valid-dists.patch > deleted file mode 100644 > index 7fe18254e5..0000000000 > --- a/meta/recipes-devtools/python/python3/valid-dists.patch > +++ /dev/null > @@ -1,164 +0,0 @@ > -From 66874ce1a9f21b4b00dc85919734d58e6243ca29 Mon Sep 17 00:00:00 > 2001 > -From: "Jason R. Coombs" <jaraco@jaraco.com> > -Date: Tue, 23 Jul 2024 08:36:16 -0400 > -Subject: [PATCH] Prioritize valid dists to invalid dists when retrieving by > - name. > - > -Closes python/importlib_metadata#489 > - > -Upstream-Status: Backport > [https://github.com/python/importlib_metadata/commit/a65c29adc027b3615154ca > b73aaedd58a6aa23da] > -Signed-off-by: Ross Burton <ross.burton@arm.com> > ---- > - Lib/importlib/metadata/__init__.py | 14 +++- > - Lib/importlib/metadata/_itertools.py | 98 ++++++++++++++++++++++++++++ > - 2 files changed, 110 insertions(+), 2 deletions(-) > - > -diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py > -index 8ce62dd..085378c 100644 > ---- a/Lib/importlib/metadata/__init__.py > -+++ b/Lib/importlib/metadata/__init__.py > -@@ -21,7 +21,7 @@ import collections > - from . import _meta > - from ._collections import FreezableDefaultDict, Pair > - from ._functools import method_cache, pass_none > --from ._itertools import always_iterable, unique_everseen > -+from ._itertools import always_iterable, bucket, unique_everseen > - from ._meta import PackageMetadata, SimplePath > - > - from contextlib import suppress > -@@ -404,7 +404,7 @@ class Distribution(DeprecatedNonAbstract): > - if not name: > - raise ValueError("A distribution name is required.") > - try: > -- return next(iter(cls.discover(name=name))) > -+ return next(iter(cls._prefer_valid(cls.discover(name=name)))) > - except StopIteration: > - raise PackageNotFoundError(name) > - > -@@ -428,6 +428,16 @@ class Distribution(DeprecatedNonAbstract): > - resolver(context) for resolver in cls._discover_resolvers() > - ) > - > -+ @staticmethod > -+ def _prefer_valid(dists: Iterable[Distribution]) -> Iterable[Distribution]: > -+ """ > -+ Prefer (move to the front) distributions that have metadata. > -+ > -+ Ref python/importlib_resources#489. > -+ """ > -+ buckets = bucket(dists, lambda dist: bool(dist.metadata)) > -+ return itertools.chain(buckets[True], buckets[False]) > -+ > - @staticmethod > - def at(path: str | os.PathLike[str]) -> Distribution: > - """Return a Distribution for the indicated metadata path. > -diff --git a/Lib/importlib/metadata/_itertools.py > b/Lib/importlib/metadata/_itertools.py > -index d4ca9b9..79d3719 100644 > ---- a/Lib/importlib/metadata/_itertools.py > -+++ b/Lib/importlib/metadata/_itertools.py > -@@ -1,3 +1,4 @@ > -+from collections import defaultdict, deque > - from itertools import filterfalse > - > - > -@@ -71,3 +72,100 @@ def always_iterable(obj, base_type=(str, bytes)): > - return iter(obj) > - except TypeError: > - return iter((obj,)) > -+ > -+ > -+# Copied from more_itertools 10.3 > -+class bucket: > -+ """Wrap *iterable* and return an object that buckets the iterable into > -+ child iterables based on a *key* function. > -+ > -+ >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] > -+ >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character > -+ >>> sorted(list(s)) # Get the keys > -+ ['a', 'b', 'c'] > -+ >>> a_iterable = s['a'] > -+ >>> next(a_iterable) > -+ 'a1' > -+ >>> next(a_iterable) > -+ 'a2' > -+ >>> list(s['b']) > -+ ['b1', 'b2', 'b3'] > -+ > -+ The original iterable will be advanced and its items will be cached until > -+ they are used by the child iterables. This may require significant storage. > -+ > -+ By default, attempting to select a bucket to which no items belong will > -+ exhaust the iterable and cache all values. > -+ If you specify a *validator* function, selected buckets will instead be > -+ checked against it. > -+ > -+ >>> from itertools import count > -+ >>> it = count(1, 2) # Infinite sequence of odd numbers > -+ >>> key = lambda x: x % 10 # Bucket by last digit > -+ >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only > -+ >>> s = bucket(it, key=key, validator=validator) > -+ >>> 2 in s > -+ False > -+ >>> list(s[2]) > -+ [] > -+ > -+ """ > -+ > -+ def __init__(self, iterable, key, validator=None): > -+ self._it = iter(iterable) > -+ self._key = key > -+ self._cache = defaultdict(deque) > -+ self._validator = validator or (lambda x: True) > -+ > -+ def __contains__(self, value): > -+ if not self._validator(value): > -+ return False > -+ > -+ try: > -+ item = next(self[value]) > -+ except StopIteration: > -+ return False > -+ else: > -+ self._cache[value].appendleft(item) > -+ > -+ return True > -+ > -+ def _get_values(self, value): > -+ """ > -+ Helper to yield items from the parent iterator that match *value*. > -+ Items that don't match are stored in the local cache as they > -+ are encountered. > -+ """ > -+ while True: > -+ # If we've cached some items that match the target value, emit > -+ # the first one and evict it from the cache. > -+ if self._cache[value]: > -+ yield self._cache[value].popleft() > -+ # Otherwise we need to advance the parent iterator to search for > -+ # a matching item, caching the rest. > -+ else: > -+ while True: > -+ try: > -+ item = next(self._it) > -+ except StopIteration: > -+ return > -+ item_value = self._key(item) > -+ if item_value == value: > -+ yield item > -+ break > -+ elif self._validator(item_value): > -+ self._cache[item_value].append(item) > -+ > -+ def __iter__(self): > -+ for item in self._it: > -+ item_value = self._key(item) > -+ if self._validator(item_value): > -+ self._cache[item_value].append(item) > -+ > -+ yield from self._cache.keys() > -+ > -+ def __getitem__(self, value): > -+ if not self._validator(value): > -+ return iter(()) > -+ > -+ return self._get_values(value) > diff --git a/meta/recipes-devtools/python/python3_3.14.7.bb b/meta/recipes- > devtools/python/python3_3.15.0.bb > similarity index 98% > rename from meta/recipes-devtools/python/python3_3.14.7.bb > rename to meta/recipes-devtools/python/python3_3.15.0.bb > index f917edebd8..71a2973e20 100644 > --- a/meta/recipes-devtools/python/python3_3.14.7.bb > +++ b/meta/recipes-devtools/python/python3_3.15.0.bb > @@ -18,19 +18,15 @@ SRC_URI = > "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ > file://makerace.patch \ > file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \ > file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \ > - file://valid-dists.patch \ > file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ > file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \ > file://0001-prefer-valid-entrypoints.patch \ > - file://0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch \ > - file://0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch \ > - file://0003-gh-148292-Remove-shutdown-test-in- > test_ssl.test_got_eof.patch \ > " > SRC_URI:append:class-native = " \ > file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ > " > > -SRC_URI[sha256sum] = > "3b48dac8fb59f62eaa67ac83c1eb12bda1b7a08406dd286e252c11a66be27f81" > +SRC_URI[sha256sum] = > "ba4bed1ba346b916890b76d9e320451420aa69f6408997d33c66482eeae3d57 > 5" > > # exclude pre-releases for both python 2.x and 3.x > UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" > @@ -41,7 +37,7 @@ inherit upstream-stable-release-point > > CVE_PRODUCT = "python:python python_software_foundation:python cpython" > > -PYTHON_MAJMIN = "3.14" > +PYTHON_MAJMIN = "3.15" > > S = "${UNPACKDIR}/Python-${PV}" > > @@ -61,6 +57,7 @@ DEPENDS = "\ > bzip2-replacement-native \ > expat \ > libffi \ > + mpdecimal \ > ncurses \ > openssl \ > sqlite3 \ > @@ -75,7 +72,7 @@ DEPENDS = "\ > DEPENDS:append:class-target = " python3-native" > DEPENDS:append:class-nativesdk = " python3-native" > > -EXTRA_OECONF = " --without-ensurepip --enable-shared --with- > platlibdir=${baselib} --with-system-expat" > +EXTRA_OECONF = " --without-ensurepip --enable-shared --with- > platlibdir=${baselib} --with-system-expat --with-system-libmpdec" > EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" > EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3 > PLATFORM_TRIPLET=${HOST_ARCH}-${HOST_OS}" > EXTRA_OECONF:append:class-nativesdk = " --with-build- > python=nativepython3" ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [OE-core] [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 2026-10-12 9:40 ` [OE-core] " Marko, Peter @ 2026-10-12 10:14 ` Jaipaul Cheernam 0 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-10-12 10:14 UTC (permalink / raw) To: Marko, Peter, openembedded-core@lists.openembedded.org On 2026-10-12 11:40, Marko, Peter wrote: > I'd also expect some changes in python3-manifest.json for a new release. > Have you checked that? > > Peter Hi Peter, Thanks for the pointer and I will send V2. Regards, Jaipaul ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v3 0/2] python3 upgrade to 3.15.2 2026-10-12 9:00 ` [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 Jaipaul Cheernam 2026-10-12 9:40 ` [OE-core] " Marko, Peter @ 2026-10-29 21:06 ` Jaipaul Cheernam 2026-10-29 21:06 ` [PATCH v3 1/2] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam 2026-10-29 21:06 ` [PATCH v3 2/2] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2026-11-02 7:01 ` [PATCH v4 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam ` (3 subsequent siblings) 5 siblings, 2 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-10-29 21:06 UTC (permalink / raw) To: openembedded-core Jaipaul Cheernam (2): python3-maturin: Add support for python 3.15.2 python3: Upgrade 3.14.10 -> 3.15.2 meta/classes-recipe/python3-dir.bbclass | 2 +- ...1-Update-maximum-Python-PyPy-version.patch | 99 +++++++ .../python/python3-maturin_1.15.0.bb | 4 +- ...shebang-overflow-on-python-config.py.patch | 6 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 6 +- ...-qemu-wrapper-when-gathering-profile.patch | 6 +- ...est_sysconfig-for-posix_user-purelib.patch | 6 +- ...clear-RUNSHARED-when-cross-compiling.patch | 46 ++++ ...146207-Add-support-for-OpenSSL-4.0.0.patch | 254 ------------------ ...st_is_python_process_non_python_subp.patch | 50 ++++ .../0001-prefer-valid-entrypoints.patch | 6 +- ...g.py-use-platlibdir-also-for-purelib.patch | 4 +- ...le.py-correct-the-test-output-format.patch | 6 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 6 +- .../python/python3/python3-manifest.json | 199 +++++--------- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.10.bb => python3_3.15.2.bb} | 12 +- 20 files changed, 301 insertions(+), 852 deletions(-) create mode 100644 meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch create mode 100644 meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch create mode 100644 meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.10.bb => python3_3.15.2.bb} (98%) ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v3 1/2] python3-maturin: Add support for python 3.15.2 2026-10-29 21:06 ` [PATCH v3 0/2] python3 upgrade to 3.15.2 Jaipaul Cheernam @ 2026-10-29 21:06 ` Jaipaul Cheernam 2026-10-29 21:06 ` [PATCH v3 2/2] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 1 sibling, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-10-29 21:06 UTC (permalink / raw) To: openembedded-core Backport the upstream fix which raises the maximum Python version to 3.15 and PyPy to 3.12 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...1-Update-maximum-Python-PyPy-version.patch | 99 +++++++++++++++++++ .../python/python3-maturin_1.15.0.bb | 4 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch diff --git a/meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch b/meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch new file mode 100644 index 00000000000..1c78bced287 --- /dev/null +++ b/meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch @@ -0,0 +1,99 @@ +From 713a7088e1ca9f1fe71efd670826d6b77470c24d Mon Sep 17 00:00:00 2001 +From: messense <messense@icloud.com> +Date: Thu, 29 Oct 2026 21:46:23 +0800 +Subject: [PATCH] Update maximum Python & PyPy version + +Upstream-Status: Backport [https://github.com/PyO3/maturin/commit/3bec0a32ae2b67ad4fac0194f762f44141e51473] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + src/python_interpreter/discovery.rs | 12 ++++++++++++ + src/python_interpreter/mod.rs | 4 ++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/python_interpreter/discovery.rs b/src/python_interpreter/discovery.rs +index e4bcb73..47548aa 100644 +--- a/src/python_interpreter/discovery.rs ++++ b/src/python_interpreter/discovery.rs +@@ -708,10 +708,12 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "PyPy 3.8", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -740,10 +742,13 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "CPython 3.14t", ++ "CPython 3.15t", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -765,10 +770,12 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "PyPy 3.8", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -788,8 +795,10 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -817,10 +826,13 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "CPython 3.14t", ++ "CPython 3.15t", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +diff --git a/src/python_interpreter/mod.rs b/src/python_interpreter/mod.rs +index dca016f..9dcdaf8 100644 +--- a/src/python_interpreter/mod.rs ++++ b/src/python_interpreter/mod.rs +@@ -23,11 +23,11 @@ pub const MINIMUM_PYTHON_MINOR: usize = 7; + /// Minimum supported PyPy minor version. + pub const MINIMUM_PYPY_MINOR: usize = 8; + /// Be liberal here to include preview versions +-pub const MAXIMUM_PYTHON_MINOR: usize = 14; ++pub const MAXIMUM_PYTHON_MINOR: usize = 15; + /// Minimum supported version for free-threaded CPython + pub const FREE_THREADED_MINIMUM_PYTHON_MINOR: usize = 14; + /// Maximum supported PyPy minor version. +-pub const MAXIMUM_PYPY_MINOR: usize = 11; ++pub const MAXIMUM_PYPY_MINOR: usize = 12; + + /// The kind of Python interpreter (CPython, PyPy, or GraalPy). + #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, serde::Deserialize, clap::ValueEnum)] diff --git a/meta/recipes-devtools/python/python3-maturin_1.15.0.bb b/meta/recipes-devtools/python/python3-maturin_1.15.0.bb index a29e29bda9e..e8c0b6a6ad1 100644 --- a/meta/recipes-devtools/python/python3-maturin_1.15.0.bb +++ b/meta/recipes-devtools/python/python3-maturin_1.15.0.bb @@ -5,7 +5,9 @@ LICENSE = "Apache-2.0 OR MIT" LIC_FILES_CHKSUM = "file://license-apache;md5=1836efb2eb779966696f473ee8540542 \ file://license-mit;md5=85fd3b67069cff784d98ebfc7d5c0797" -SRC_URI += "file://0001-Cargo.lock-Update-rustix-to-1.1.5.patch" +SRC_URI += "file://0001-Cargo.lock-Update-rustix-to-1.1.5.patch \ + file://0001-Update-maximum-Python-PyPy-version.patch \ + " SRC_URI[sha256sum] = "94b26cc8e8aba61a5f2099715fe640e18c5f678e9a500408b38761263954228a" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v3 2/2] python3: Upgrade 3.14.10 -> 3.15.2 2026-10-29 21:06 ` [PATCH v3 0/2] python3 upgrade to 3.15.2 Jaipaul Cheernam 2026-10-29 21:06 ` [PATCH v3 1/2] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam @ 2026-10-29 21:06 ` Jaipaul Cheernam 2026-10-31 8:40 ` [OE-core] " Mathieu Dubois-Briand 1 sibling, 1 reply; 28+ messages in thread From: Jaipaul Cheernam @ 2026-10-29 21:06 UTC (permalink / raw) To: openembedded-core ReleaseNotes: https://docs.python.org/3/whatsnew/changelog.html#python-3-15-2-final - Drop patches which are part of upstream release - 0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch - 0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch - 0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch - valid-dists.patch - Add --without-system-libmpdec as EXTRA_OECONF configure option (--with-system-libmpdec is needed new package mpdecimal [1]) - Bump PYTHON_BASEVERSION to 3.15 in python3-dir.bbclass - Update python3-manifest - Refresh existing patches - Add two fixes needed for the new release - 0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch - 0001-configure-clear-RUNSHARED-when-cross-compiling.patch Verification: - Built python3 for glibc and musl - verified ptest for all 34 python3 packages which supports ptest [1] https://github.com/python/cpython/issues/115119 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- Changes since v2: - Drop mpdecimal new package and add --without-system-libmpdec - Add patch for maturin failure - verified ptest on all 34 python3 packages - Verified with glibc and musl as well Changes since v1: - Update python3-manifest meta/classes-recipe/python3-dir.bbclass | 2 +- ...shebang-overflow-on-python-config.py.patch | 6 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 6 +- ...-qemu-wrapper-when-gathering-profile.patch | 6 +- ...est_sysconfig-for-posix_user-purelib.patch | 6 +- ...clear-RUNSHARED-when-cross-compiling.patch | 46 ++++ ...146207-Add-support-for-OpenSSL-4.0.0.patch | 254 ------------------ ...st_is_python_process_non_python_subp.patch | 50 ++++ .../0001-prefer-valid-entrypoints.patch | 6 +- ...g.py-use-platlibdir-also-for-purelib.patch | 4 +- ...le.py-correct-the-test-output-format.patch | 6 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 6 +- .../python/python3/python3-manifest.json | 199 +++++--------- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.10.bb => python3_3.15.2.bb} | 12 +- 18 files changed, 199 insertions(+), 851 deletions(-) create mode 100644 meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch create mode 100644 meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.10.bb => python3_3.15.2.bb} (98%) diff --git a/meta/classes-recipe/python3-dir.bbclass b/meta/classes-recipe/python3-dir.bbclass index 3eb0dea9b2e..b26621f3652 100644 --- a/meta/classes-recipe/python3-dir.bbclass +++ b/meta/classes-recipe/python3-dir.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -PYTHON_BASEVERSION = "3.14" +PYTHON_BASEVERSION = "3.15" PYTHON_ABI = "" PYTHON_DIR = "python${PYTHON_BASEVERSION}" PYTHON_PN = "python3" diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 79fee9803fe..f5acfb789c0 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch @@ -1,4 +1,4 @@ -From 3f2df0e1fce8c7425998dade00d084f1b101a982 Mon Sep 17 00:00:00 2001 +From c7712b4345e16786ee237427537b83787022c733 Mon Sep 17 00:00:00 2001 From: Paulo Neves <ptsneves@gmail.com> Date: Tue, 7 Jun 2022 16:16:41 +0200 Subject: [PATCH] Avoid shebang overflow on python-config.py @@ -16,10 +16,10 @@ Upstream-Status: Denied [distribution] 1 file changed, 2 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in -index e946018..345ed29 100644 +index a1d59e4..26a90e6 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2844,6 +2844,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh +@@ -2938,6 +2938,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh @ # Substitution happens here, as the completely-expanded BINDIR @ # is not available in configure sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py diff --git a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch index 532adfe69a9..322de292ce4 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch @@ -1,4 +1,4 @@ -From 9cd44429215352eb2753e0fd8e25fef24f714006 Mon Sep 17 00:00:00 2001 +From 1e6d7f34c558ed05f7d35f4a2b86f079318fb6be Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Thu, 16 Sep 2021 16:35:37 +0200 Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch index 580d38a4031..ce2efd431c5 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch @@ -1,4 +1,4 @@ -From b5aad6a9b6c5add7a85861aed8aa030c1ad3d52f Mon Sep 17 00:00:00 2001 +From 7338a6821cdc4e7cab17ca255e484bf19b4b3670 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Fri, 17 Nov 2023 14:26:32 +0100 Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration @@ -18,10 +18,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 0a8bcc0..a2341f2 100644 +index 924401c..0ff84f7 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py -@@ -539,12 +539,12 @@ def _init_config_vars(): +@@ -537,12 +537,12 @@ def _init_config_vars(): _CONFIG_VARS['py_version'] = _PY_VERSION _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT _CONFIG_VARS['py_version_nodot'] = _PY_VERSION_SHORT_NO_DOT diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch index d3f46c372a6..dd5a87cd541 100644 --- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch +++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch @@ -1,4 +1,4 @@ -From d6f77e3a934616d1f6c083b7144c50a32e08b70a Mon Sep 17 00:00:00 2001 +From 61b446b8554b91b93f8ae40c654abf9d8a77145d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 30 Jan 2019 12:41:04 +0100 Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data @@ -15,10 +15,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 526d500..a7e536d 100644 +index 95fefcc..24ca285 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -864,8 +864,7 @@ profile-run-stamp: +@@ -879,8 +879,7 @@ profile-run-stamp: # enabled. $(MAKE) profile-gen-stamp # Next, run the profile task to generate the profile information. diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch index 0864f23926a..6cc7ae187e6 100644 --- a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch @@ -1,4 +1,4 @@ -From c608cb4b3c8c31f1aa25ad1264ff58733fb99769 Mon Sep 17 00:00:00 2001 +From f1e23d641d6edb5bb82cd24272b7b1f8c42c64dd Mon Sep 17 00:00:00 2001 From: Wentao Zhang <wentao.zhang@windriver.com> Date: Mon, 20 Mar 2023 13:39:52 +0800 Subject: [PATCH] Update test_sysconfig for posix_user purelib @@ -22,10 +22,10 @@ Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py -index 1fe4b68..383142a 100644 +index ce3a3c6..4eb65fb 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py -@@ -435,7 +435,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): +@@ -432,7 +432,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): expected = os.path.normpath(global_path.replace(base, user, 1)) # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, # whereas posix_prefix does. diff --git a/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch new file mode 100644 index 00000000000..f5f09e81ee9 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +Date: Tue, 27 Oct 2026 10:00:00 +0000 +Subject: [PATCH] configure: clear RUNSHARED when cross compiling + +Since 3.15 the checksharedmods target runs the host build python with the +target LD_LIBRARY_PATH, which breaks musl cross builds (host cannot load +libc.so). Clear RUNSHARED for cross builds as before. + +Upstream-Status: Submitted [https://github.com/python/cpython/issues/160924] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + configure | 4 ++++ + configure.ac | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/configure b/configure +index 6f7ff1b..9702135 100755 +--- a/configure ++++ b/configure +@@ -7867,6 +7867,10 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 + printf "%s\n" "$LDLIBRARY" >&6; } + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOSTRUNNER" >&5 + printf %s "checking HOSTRUNNER... " >&6; } +diff --git a/configure.ac b/configure.ac +index 9923805..9e86057 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1670,6 +1670,10 @@ else # shared is disabled + fi + AC_MSG_RESULT([$LDLIBRARY]) + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + AC_MSG_CHECKING([HOSTRUNNER]) + if test -z "$HOSTRUNNER" diff --git a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch b/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch deleted file mode 100644 index 37f55de65c2..00000000000 --- a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch +++ /dev/null @@ -1,254 +0,0 @@ -From 3364e7e62fa24d0e19133fb0f90b1c24ef1110c5 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Wed, 25 Mar 2026 07:44:47 +0100 -Subject: [PATCH] gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217) - -OpenSSL 4.0.0 alpha1 removed these functions: - -* SSLv3_method() -* TLSv1_method() -* TLSv1_1_method() -* TLSv1_2_method() - -Other changes: - -* Update test_openssl_version(). -* Update multissltests.py for OpenSSL 4. -* Add const qualifier to fix compiler warnings. - -Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> -Signed-off-by: Victor Stinner <vstinner@python.org> - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3364e7e62fa24d0e19133fb0f90b1c24ef1110c5] -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 52 ++++++++++++++++++++------------------ - Modules/_ssl.c | 27 ++++++++++++++++---- - Modules/_ssl/cert.c | 3 ++- - Tools/ssl/multissltests.py | 7 ++++- - 4 files changed, 58 insertions(+), 31 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index dc795c6bd8a..61355927296 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -439,7 +439,7 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_COMPRESSION - self.assertEqual(ssl.HAS_SNI, True) - self.assertEqual(ssl.HAS_ECDH, True) -- self.assertEqual(ssl.HAS_TLSv1_2, True) -+ self.assertIsInstance(ssl.HAS_TLSv1_2, bool) - self.assertEqual(ssl.HAS_TLSv1_3, True) - ssl.OP_NO_SSLv2 - ssl.OP_NO_SSLv3 -@@ -630,11 +630,11 @@ class BasicSocketTests(unittest.TestCase): - # Some sanity checks follow - # >= 1.1.1 - self.assertGreaterEqual(n, 0x10101000) -- # < 4.0 -- self.assertLess(n, 0x40000000) -+ # < 5.0 -+ self.assertLess(n, 0x50000000) - major, minor, fix, patch, status = t - self.assertGreaterEqual(major, 1) -- self.assertLess(major, 4) -+ self.assertLess(major, 5) - self.assertGreaterEqual(minor, 0) - self.assertLess(minor, 256) - self.assertGreaterEqual(fix, 0) -@@ -700,12 +700,14 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_TLSv1_2, - ssl.OP_NO_TLSv1_3 - ] -- protocols = [ -- ssl.PROTOCOL_TLSv1, -- ssl.PROTOCOL_TLSv1_1, -- ssl.PROTOCOL_TLSv1_2, -- ssl.PROTOCOL_TLS -- ] -+ protocols = [] -+ if hasattr(ssl, 'PROTOCOL_TLSv1'): -+ protocols.append(ssl.PROTOCOL_TLSv1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_1'): -+ protocols.append(ssl.PROTOCOL_TLSv1_1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_2'): -+ protocols.append(ssl.PROTOCOL_TLSv1_2) -+ protocols.append(ssl.PROTOCOL_TLS) - versions = [ - ssl.TLSVersion.SSLv3, - ssl.TLSVersion.TLSv1, -@@ -1199,6 +1201,7 @@ class ContextTests(unittest.TestCase): - ssl.TLSVersion.TLSv1, - ssl.TLSVersion.TLSv1_1, - ssl.TLSVersion.TLSv1_2, -+ ssl.TLSVersion.TLSv1_3, - ssl.TLSVersion.SSLv3, - } - ) -@@ -1212,7 +1215,7 @@ class ContextTests(unittest.TestCase): - with self.assertRaises(ValueError): - ctx.minimum_version = 42 - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_1) - - self.assertIn( -@@ -1764,23 +1767,24 @@ class ContextTests(unittest.TestCase): - self.assertFalse(ctx.check_hostname) - self._assert_context_options(ctx) - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - with warnings_helper.check_warnings(): - ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) - self._assert_context_options(ctx) - -- with warnings_helper.check_warnings(): -- ctx = ssl._create_stdlib_context( -- ssl.PROTOCOL_TLSv1_2, -- cert_reqs=ssl.CERT_REQUIRED, -- check_hostname=True -- ) -- self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -- self.assertTrue(ctx.check_hostname) -- self._assert_context_options(ctx) -+ if has_tls_protocol('PROTOCOL_TLSv1_2'): -+ with warnings_helper.check_warnings(): -+ ctx = ssl._create_stdlib_context( -+ ssl.PROTOCOL_TLSv1_2, -+ cert_reqs=ssl.CERT_REQUIRED, -+ check_hostname=True -+ ) -+ self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -+ self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -+ self.assertTrue(ctx.check_hostname) -+ self._assert_context_options(ctx) - - ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_SERVER) -@@ -3908,10 +3912,10 @@ class ThreadedTests(unittest.TestCase): - client_options=ssl.OP_NO_TLSv1_2) - - try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2') -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False) -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False) - -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index b45295b4c0c..6f75af86113 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -136,6 +136,17 @@ static void _PySSLFixErrno(void) { - #error Unsupported OpenSSL version - #endif - -+#if (OPENSSL_VERSION_NUMBER >= 0x40000000L) -+# define OPENSSL_NO_SSL3 -+# define OPENSSL_NO_TLS1 -+# define OPENSSL_NO_TLS1_1 -+# define OPENSSL_NO_TLS1_2 -+# define OPENSSL_NO_SSL3_METHOD -+# define OPENSSL_NO_TLS1_METHOD -+# define OPENSSL_NO_TLS1_1_METHOD -+# define OPENSSL_NO_TLS1_2_METHOD -+#endif -+ - /* OpenSSL API 1.1.0+ does not include version methods */ - #ifndef OPENSSL_NO_SSL3_METHOD - extern const SSL_METHOD *SSLv3_method(void); -@@ -1137,7 +1148,7 @@ _asn1obj2py(_sslmodulestate *state, const ASN1_OBJECT *name, int no_name) - - static PyObject * - _create_tuple_for_attribute(_sslmodulestate *state, -- ASN1_OBJECT *name, ASN1_STRING *value) -+ const ASN1_OBJECT *name, const ASN1_STRING *value) - { - Py_ssize_t buflen; - PyObject *pyattr; -@@ -1166,16 +1177,16 @@ _create_tuple_for_attribute(_sslmodulestate *state, - } - - static PyObject * --_create_tuple_for_X509_NAME (_sslmodulestate *state, X509_NAME *xname) -+_create_tuple_for_X509_NAME(_sslmodulestate *state, const X509_NAME *xname) - { - PyObject *dn = NULL; /* tuple which represents the "distinguished name" */ - PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */ - PyObject *rdnt; - PyObject *attr = NULL; /* tuple to hold an attribute */ - int entry_count = X509_NAME_entry_count(xname); -- X509_NAME_ENTRY *entry; -- ASN1_OBJECT *name; -- ASN1_STRING *value; -+ const X509_NAME_ENTRY *entry; -+ const ASN1_OBJECT *name; -+ const ASN1_STRING *value; - int index_counter; - int rdn_level = -1; - int retcode; -@@ -6599,9 +6610,15 @@ sslmodule_init_constants(PyObject *m) - ADD_INT_CONST("PROTOCOL_TLS", PY_SSL_VERSION_TLS); - ADD_INT_CONST("PROTOCOL_TLS_CLIENT", PY_SSL_VERSION_TLS_CLIENT); - ADD_INT_CONST("PROTOCOL_TLS_SERVER", PY_SSL_VERSION_TLS_SERVER); -+#ifndef OPENSSL_NO_TLS1 - ADD_INT_CONST("PROTOCOL_TLSv1", PY_SSL_VERSION_TLS1); -+#endif -+#ifndef OPENSSL_NO_TLS1_1 - ADD_INT_CONST("PROTOCOL_TLSv1_1", PY_SSL_VERSION_TLS1_1); -+#endif -+#ifndef OPENSSL_NO_TLS1_2 - ADD_INT_CONST("PROTOCOL_TLSv1_2", PY_SSL_VERSION_TLS1_2); -+#endif - - #define ADD_OPTION(NAME, VALUE) if (sslmodule_add_option(m, NAME, (VALUE)) < 0) return -1 - -diff --git a/Modules/_ssl/cert.c b/Modules/_ssl/cert.c -index f2e7be89668..061b0fb3171 100644 ---- a/Modules/_ssl/cert.c -+++ b/Modules/_ssl/cert.c -@@ -128,7 +128,8 @@ _ssl_Certificate_get_info_impl(PySSLCertificate *self) - } - - static PyObject* --_x509name_print(_sslmodulestate *state, X509_NAME *name, int indent, unsigned long flags) -+_x509name_print(_sslmodulestate *state, const X509_NAME *name, -+ int indent, unsigned long flags) - { - PyObject *res; - BIO *biobuf; -diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py -index 3b4507c6771..48207e5330f 100755 ---- a/Tools/ssl/multissltests.py -+++ b/Tools/ssl/multissltests.py -@@ -422,9 +422,11 @@ class BuildOpenSSL(AbstractBuilder): - def _post_install(self): - if self.version.startswith("3."): - self._post_install_3xx() -+ elif self.version.startswith("4."): -+ self._post_install_4xx() - - def _build_src(self, config_args=()): -- if self.version.startswith("3."): -+ if self.version.startswith(("3.", "4.")): - config_args += ("enable-fips",) - super()._build_src(config_args) - -@@ -440,6 +442,9 @@ class BuildOpenSSL(AbstractBuilder): - lib64 = self.lib_dir + "64" - os.symlink(lib64, self.lib_dir) - -+ def _post_install_4xx(self): -+ self._post_install_3xx() -+ - @property - def short_version(self): - """Short version for OpenSSL download URL""" diff --git a/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch new file mode 100644 index 00000000000..581dad9b2ee --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch @@ -0,0 +1,50 @@ +From 1db73a72041cdbbeb4ddef01595f25129a8138f7 Mon Sep 17 00:00:00 2001 +From: Tom Greenslade <thomgree@cisco.com> +Date: Thu, 29 Oct 2026 14:17:40 +0000 +Subject: [PATCH] gh-160881: Fix test_is_python_process_non_python_subprocess + with multicall sleep + +_wait_for_process_exec() waited for /proc/{pid}/exe to be named "sleep", +which never happens when sleep is a multicall binary (BusyBox on Alpine, +coreutils-single on RHEL UBI9). Wait instead until the child's executable +differs from the parent's, which means the child has called exec(). + +Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> + +Upstream-Status: Submitted [https://github.com/python/cpython/pull/160901] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + .../test_sampling_profiler/test_children.py | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_children.py b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +index 4b27c6dbb1896c1..9a8d529c4b82444 100644 +--- a/Lib/test/test_profiling/test_sampling_profiler/test_children.py ++++ b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +@@ -85,12 +85,14 @@ def reader(): + return result[0] + + +-def _wait_for_process_exec(proc, name, timeout): ++def _wait_for_process_exec(proc, timeout): + # Wait until a child process calls exec() to replace the forked process +- # executable. Raise AssertionError on timeout. ++ # executable. Don't check the executable name: it can be a multicall ++ # binary such as /bin/busybox. Raise AssertionError on timeout. ++ parent_exe = os.readlink("/proc/self/exe") + for _ in sleeping_retry(timeout, max_delay=0.1): + exe = os.readlink(f"/proc/{proc.pid}/exe") +- if os.path.basename(exe) == name: ++ if exe != parent_exe: + break + + +@@ -625,7 +627,7 @@ def test_is_python_process_non_python_subprocess(self): + ) + + try: +- _wait_for_process_exec(proc, "sleep", SHORT_TIMEOUT) ++ _wait_for_process_exec(proc, SHORT_TIMEOUT) + + self.assertFalse( + is_python_process(proc.pid), diff --git a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch index 525a2ca7000..e5043255928 100644 --- a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch +++ b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch @@ -1,4 +1,4 @@ -From 8d7fcf04c6513841c7985e64b746b1ef5de0c426 Mon Sep 17 00:00:00 2001 +From 57c51c6746c1efdae1654df443c5d23351b2d131 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@arm.com> Date: Fri, 17 Apr 2026 16:53:42 +0100 Subject: [PATCH] prefer valid entrypoints @@ -16,10 +16,10 @@ Signed-off-by: Ross Burton <ross.burton@arm.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 085378c..ff5cae4 100644 +index 32f4b7d..705f245 100644 --- a/Lib/importlib/metadata/__init__.py +++ b/Lib/importlib/metadata/__init__.py -@@ -1016,7 +1016,7 @@ def entry_points(**params) -> EntryPoints: +@@ -1120,7 +1120,7 @@ def entry_points(**params) -> EntryPoints: :return: EntryPoints for all installed packages. """ eps = itertools.chain.from_iterable( diff --git a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch index 7807827d9aa..e24d6b63b16 100644 --- a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch @@ -1,4 +1,4 @@ -From c10d1b295a9fb93836830cce441da3f22e5c7cd7 Mon Sep 17 00:00:00 2001 +From 07c5b43f29e93825e1c0b0fcebf40dc5971d438f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Sun, 12 Sep 2021 21:44:36 +0200 Subject: [PATCH] sysconfig.py: use platlibdir also for purelib @@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index faf8273..0a8bcc0 100644 +index b931551..924401c 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -29,7 +29,7 @@ _INSTALL_SCHEMES = { diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch index a60d082e2f4..12d87168ca5 100644 --- a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch +++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch @@ -1,4 +1,4 @@ -From f0ac5b479b99bfb7f5e937a941b31a596f4caafc Mon Sep 17 00:00:00 2001 +From c8d8b7aaf96faa50d8bf20c59ed31e7c6a8d698c Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Mon, 5 Aug 2019 15:57:39 +0800 Subject: [PATCH] test_locale.py: correct the test output format @@ -31,10 +31,10 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py -index f918435..1910a43 100644 +index a06c600..38b91d0 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py -@@ -499,7 +499,7 @@ class TestRealLocales(unittest.TestCase): +@@ -500,7 +500,7 @@ class TestRealLocales(unittest.TestCase): self.skipTest('test needs Turkish locale') loc = locale.getlocale(locale.LC_CTYPE) if verbose: diff --git a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch b/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch deleted file mode 100644 index 1b9a7fc9422..00000000000 --- a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch +++ /dev/null @@ -1,234 +0,0 @@ -From 3c2a3014af7d73cc34f2498f60fdf863d9bc7c6c Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 13:52:57 +0200 -Subject: [PATCH] gh-148292: Update _ssl._SSLSocket for OpenSSL 4 (#149102) - -The _SSLSocket object now remembers if it gets an EOF error. In this -case, read(), sendfile(), write() and do_handshake method calls fail -with SSLEOFError without calling the underlying OpenSSL function. - -Co-authored-by: Gregory P. Smith <greg@krypto.org> -(cherry picked from commit 7b7fa3f9bf3d7cdf3eb669d02b386e05b39c402a) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3c2a3014af7d] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 82 +++++++++++++++++++ - ...-04-28-17-47-55.gh-issue-148292.oIq3ml.rst | 7 ++ - Modules/_ssl.c | 42 ++++++++++ - 3 files changed, 131 insertions(+) - create mode 100644 Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 965dbc36f096499..03d9e3f9e5e96b5 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -3039,6 +3039,36 @@ class ThreadedEchoServer(threading.Thread): - def stop(self): - self.active = False - -+class TestEOFServer(threading.Thread): -+ def __init__(self): -+ super().__init__() -+ self.listening = threading.Event() -+ self.address = None -+ -+ def run(self): -+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) -+ context.load_cert_chain(CERTFILE) -+ server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ with server_sock: -+ server_sock.settimeout(support.SHORT_TIMEOUT) -+ server_sock.bind((HOST, 0)) -+ server_sock.listen(5) -+ -+ self.address = server_sock.getsockname() -+ self.listening.set() -+ -+ sock, addr = server_sock.accept() -+ sslconn = context.wrap_socket(sock, server_side=True) -+ with sslconn: -+ request = b'' -+ while chunk := sslconn.recv(1024): -+ request += chunk -+ if b'\n' in chunk: -+ break -+ -+ sslconn.sendall(b'server\n') -+ sslconn.shutdown(socket.SHUT_WR) -+ - class AsyncoreEchoServer(threading.Thread): - - # this one's based on asyncore.dispatcher -@@ -5079,6 +5109,58 @@ class ThreadedTests(unittest.TestCase): - if cm.exc_value is not None: - raise cm.exc_value - -+ def test_got_eof(self): -+ # gh-148292: Test that _ssl._SSLSocket behaves the same on all OpenSSL -+ # versions on calling methods after EOF (after the first SSLEOFError). -+ -+ server = TestEOFServer() -+ server.start() -+ if not server.listening.wait(support.SHORT_TIMEOUT): -+ raise RuntimeError("server took too long") -+ self.addCleanup(server.join) -+ -+ context = ssl.create_default_context(cafile=CERTFILE) -+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ sock.settimeout(support.SHORT_TIMEOUT) -+ sock.connect(server.address) -+ sslsock = context.wrap_socket(sock, server_hostname='localhost') -+ with sslsock: -+ sslsock.sendall(b'client\n') -+ # test the _ssl._SSLSocket object, not ssl.SSLSocket -+ sslobj = sslsock._sslobj -+ -+ data = sslobj.read(1024) -+ self.assertEqual(data, b'server\n') -+ -+ # The second read gets EOF error and sets got_eof_error to 1 -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.read(1024) -+ -+ # Following read(), sendfile(), write() and do_handshake() calls -+ # must raise SSLEOFError -+ with self.assertRaises(ssl.SSLEOFError): -+ # The _SSLSocket remembers the previous EOF error -+ # and raises again SSLEOFError -+ sslobj.read(1024) -+ if hasattr(sslobj, 'sendfile'): -+ with open(__file__, "rb") as fp: -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.sendfile(fp.fileno(), 0, 1) -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.write(b'client2\n') -+ with self.assertRaises(ssl.SSLEOFError): -+ sslsock.do_handshake() -+ -+ self.assertEqual(sslsock.pending(), 0) -+ try: -+ sslsock.shutdown(socket.SHUT_WR) -+ except OSError as exc: -+ self.assertEqual(exc.errno, errno.ENOTCONN) -+ else: -+ # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -+ # raise an error -+ pass -+ - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, - "Test needs TLS 1.3 PHA") -diff --git a/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -new file mode 100644 -index 000000000000000..e1f308df5a678e6 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -@@ -0,0 +1,7 @@ -+:mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` for -+OpenSSL 4. The classes now remember if they get a :exc:`ssl.SSLEOFError`. In this -+case, following :meth:`~ssl.SSLSocket.read`, :meth:`!sendfile`, -+:meth:`~ssl.SSLSocket.write`, and :meth:`~ssl.SSLSocket.do_handshake` calls -+raise :exc:`ssl.SSLEOFError` without calling the underlying OpenSSL function. -+Thanks to that, :class:`ssl.SSLSocket` behaves the same on all OpenSSL versions -+on EOF. Patch by Victor Stinner. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index 1603d0ffd559559..376df32b7cb4bd6 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -352,6 +352,16 @@ typedef struct { - * and shutdown methods check for chained exceptions. - */ - PyObject *exc; -+ // gh-148292: If non-zero, read(), sendfile(), write() and do_handshake() -+ // methods raise SSLEOFError without calling the underlying OpenSSL -+ // function. Set to 1 on PY_SSL_ERROR_EOF error. -+ // -+ // On OpenSSL 4, if SSL_read_ex() fails with -+ // SSL_R_UNEXPECTED_EOF_WHILE_READING, the following SSL_read_ex() call -+ // fails with a generic protocol error (ERR_peek_last_error() returns 0). -+ // Use got_eof_error to have the same behavior on OpenSSL 4 and newer and -+ // on OpenSSL 3 and older. -+ int got_eof_error; - } PySSLSocket; - - #define PySSLSocket_CAST(op) ((PySSLSocket *)(op)) -@@ -499,6 +509,10 @@ fill_and_set_sslerror(_sslmodulestate *state, - PyObject *init_value, *msg, *key; - PyUnicodeWriter *writer = NULL; - -+ if (ssl_errno == PY_SSL_ERROR_EOF && sslsock != NULL) { -+ sslsock->got_eof_error = 1; -+ } -+ - if (errcode != 0) { - int lib, reason; - -@@ -654,6 +668,18 @@ PySSL_ChainExceptions(PySSLSocket *sslsock) { - return -1; - } - -+ -+static void -+set_eof_error(PySSLSocket *sslsock) -+{ -+ _sslmodulestate *state = get_state_sock(sslsock); -+ fill_and_set_sslerror(state, sslsock, state->PySSLEOFErrorObject, -+ PY_SSL_ERROR_EOF, -+ "EOF occurred in violation of protocol", -+ __LINE__, 0); -+} -+ -+ - static PyObject * - PySSL_SetError(PySSLSocket *sslsock, const char *filename, int lineno) - { -@@ -901,6 +927,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, - self->server_hostname = NULL; - self->err = err; - self->exc = NULL; -+ self->got_eof_error = 0; - - /* Make sure the SSL error state is initialized */ - ERR_clear_error(); -@@ -1043,6 +1070,11 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2514,6 +2546,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2654,6 +2691,11 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len, - Py_INCREF(sock); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - if (!group_right_1) { - dest = PyBytes_FromStringAndSize(NULL, len); - if (dest == NULL) diff --git a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch b/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch deleted file mode 100644 index 59742290e8b..00000000000 --- a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 81911909bc439d6de8ce6a173b0691b3c58e9e1a Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 16:20:25 +0200 -Subject: [PATCH] gh-148292: Remove shutdown() test in test_ssl.test_got_eof() - (#149366) - -The shutdown() behavior depends too much on the operating system and -it's unrelated to the got_eof_error change. - -(cherry picked from commit 1e21cf6fee3830012e458c0fe5dbc6fcd45ace92) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/81911909bc43] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 03d9e3f9e5e96b5..6445f122b4272be 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -5152,14 +5152,6 @@ class ThreadedTests(unittest.TestCase): - sslsock.do_handshake() - - self.assertEqual(sslsock.pending(), 0) -- try: -- sslsock.shutdown(socket.SHUT_WR) -- except OSError as exc: -- self.assertEqual(exc.errno, errno.ENOTCONN) -- else: -- # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -- # raise an error -- pass - - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch index 7167d5b4e82..83ed34d9863 100644 --- a/meta/recipes-devtools/python/python3/makerace.patch +++ b/meta/recipes-devtools/python/python3/makerace.patch @@ -1,4 +1,4 @@ -From b41557f570ff4451c477669d6ca5bfacabe21c66 Mon Sep 17 00:00:00 2001 +From be6588c8090edae5379f14dd76f146d383b25e50 Mon Sep 17 00:00:00 2001 From: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue, 13 Jul 2021 23:19:29 +0100 Subject: [PATCH] python3: Fix make race @@ -17,10 +17,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index a7e536d..e946018 100644 +index 24ca285..a1d59e4 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2750,7 +2750,7 @@ COMPILEALL_OPTS=-j0 +@@ -2844,7 +2844,7 @@ COMPILEALL_OPTS=-j0 TEST_MODULES=@TEST_MODULES@ .PHONY: libinstall diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json index 008d41e5654..2605beb2ccc 100644 --- a/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/meta/recipes-devtools/python/python3/python3-manifest.json @@ -117,7 +117,7 @@ "${libdir}/python${PYTHON_MAJMIN}/asyncio", "${libdir}/python${PYTHON_MAJMIN}/concurrent", "${libdir}/python${PYTHON_MAJMIN}/concurrent/futures", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_asyncio.*.so" + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_remote_debugging.*.so" ], "cached": [] }, @@ -129,9 +129,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/wave.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc" - ] + "cached": [] }, "codecs": { "summary": "Python codec", @@ -153,11 +151,7 @@ "${libdir}/python${PYTHON_MAJMIN}/filecmp.py", "${libdir}/python${PYTHON_MAJMIN}/py_compile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/compileall.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/filecmp.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/py_compile.*.pyc" - ] + "cached": [] }, "compression": { "summary": "Python high-level compression support", @@ -165,20 +159,16 @@ "core" ], "files": [ + "${libdir}/python${PYTHON_MAJMIN}/compression/", "${libdir}/python${PYTHON_MAJMIN}/gzip.py", "${libdir}/python${PYTHON_MAJMIN}/tarfile.py", - "${libdir}/python${PYTHON_MAJMIN}/zipfile/", - "${libdir}/python${PYTHON_MAJMIN}/compression/", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so" + "${libdir}/python${PYTHON_MAJMIN}/zipfile/" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gzip.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc" - ] + "cached": [] }, "core": { "summary": "Python interpreter and core modules", - "rdepends": ["compression"], + "rdepends": [], "files": [ "${bindir}/python${PYTHON_MAJMIN}", "${bindir}/python${PYTHON_MAJMIN}.real", @@ -195,6 +185,7 @@ "${libdir}/python${PYTHON_MAJMIN}/_colorize.py", "${libdir}/python${PYTHON_MAJMIN}/_compression.py", "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py", + "${libdir}/python${PYTHON_MAJMIN}/_missing_stdlib_info.py", "${libdir}/python${PYTHON_MAJMIN}/_opcode_metadata.py", "${libdir}/python${PYTHON_MAJMIN}/_py_warnings.py", "${libdir}/python${PYTHON_MAJMIN}/_pyrepl", @@ -213,6 +204,11 @@ "${libdir}/python${PYTHON_MAJMIN}/codeop.py", "${libdir}/python${PYTHON_MAJMIN}/collections", "${libdir}/python${PYTHON_MAJMIN}/collections/abc.py", + "${libdir}/python${PYTHON_MAJMIN}/compression", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common/_streams.py", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd/_zstdfile.py", "${libdir}/python${PYTHON_MAJMIN}/configparser.py", "${libdir}/python${PYTHON_MAJMIN}/contextlib.py", "${libdir}/python${PYTHON_MAJMIN}/copy.py", @@ -252,11 +248,14 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_csv.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_heapq.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_interpreters.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_math_integer.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_opcode.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixsubprocess.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_struct.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_typing.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so", @@ -282,6 +281,8 @@ "${libdir}/python${PYTHON_MAJMIN}/pathlib.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_abc.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_local.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/_os.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/types.py", "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py", "${libdir}/python${PYTHON_MAJMIN}/platform.py", "${libdir}/python${PYTHON_MAJMIN}/posixpath.py", @@ -437,18 +438,18 @@ "${libdir}/python${PYTHON_MAJMIN}/hashlib.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hmac.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hashlib.*.pyc" - ] + "cached": [] }, "ctypes": { "summary": "Python C types support", "rdepends": [ + "compression", "core", "io", "math" @@ -480,14 +481,9 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/_strptime.py", "${libdir}/python${PYTHON_MAJMIN}/calendar.py", - "${libdir}/python${PYTHON_MAJMIN}/datetime.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_datetime.*.so" + "${libdir}/python${PYTHON_MAJMIN}/datetime.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_strptime.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/calendar.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/datetime.*.pyc" - ] + "cached": [] }, "db": { "summary": "Python file-based database support", @@ -503,7 +499,15 @@ "debugger": { "summary": "Python debugger", "rdepends": [ + "asyncio", + "compression", "core", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold" @@ -512,10 +516,7 @@ "${libdir}/python${PYTHON_MAJMIN}/bdb.py", "${libdir}/python${PYTHON_MAJMIN}/pdb.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bdb.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pdb.*.pyc" - ] + "cached": [] }, "dev": { "cached": [], @@ -545,16 +546,22 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/difflib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc" - ] + "cached": [] }, "doctest": { "summary": "Python framework for running examples in docstrings", "rdepends": [ + "asyncio", + "compression", "core", "debugger", "difflib", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold", @@ -563,9 +570,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/doctest.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/doctest.*.pyc" - ] + "cached": [] }, "email": { "summary": "Python email support", @@ -582,9 +587,7 @@ "${libdir}/python${PYTHON_MAJMIN}/email", "${libdir}/python${PYTHON_MAJMIN}/imaplib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imaplib.*.pyc" - ] + "cached": [] }, "ensurepip": { "summary": "Support for bootstrapping the pip installer", @@ -601,9 +604,7 @@ "rdepends": [ "core" ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so" - ], + "files": [], "cached": [] }, "gdbm": { @@ -645,13 +646,12 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/colorsys.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/colorsys.*.pyc" - ] + "cached": [] }, "io": { "summary": "Python low-level I/O", "rdepends": [ + "compression", "core", "math", "netclient" @@ -665,12 +665,7 @@ "${libdir}/python${PYTHON_MAJMIN}/ssl.py", "${libdir}/python${PYTHON_MAJMIN}/tempfile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pyio.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socket.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ssl.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tempfile.*.pyc" - ] + "cached": [] }, "json": { "summary": "Python JSON support", @@ -713,9 +708,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/mailbox.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mailbox.*.pyc" - ] + "cached": [] }, "math": { "summary": "Python math support", @@ -727,9 +720,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/cmath.*.so", "${libdir}/python${PYTHON_MAJMIN}/random.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/random.*.pyc" - ] + "cached": [] }, "mime": { "summary": "Python MIME handling APIs", @@ -739,9 +730,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/quopri.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/quopri.*.pyc" - ] + "cached": [] }, "mmap": { "summary": "Python memory-mapped file support", @@ -816,10 +805,12 @@ "multiprocessing": { "summary": "Python multiprocessing support", "rdepends": [ + "compression", "core", "crypt", "ctypes", "io", + "json", "math", "mmap", "netclient", @@ -859,16 +850,7 @@ "${libdir}/python${PYTHON_MAJMIN}/urllib", "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/base64.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ftplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hmac.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc" - ] + "cached": [] }, "netserver": { "summary": "Python Internet Protocol servers", @@ -879,9 +861,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/socketserver.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socketserver.*.pyc" - ] + "cached": [] }, "numbers": { "summary": "Python number APIs", @@ -893,17 +873,10 @@ "${libdir}/python${PYTHON_MAJMIN}/contextvars.py", "${libdir}/python${PYTHON_MAJMIN}/decimal.py", "${libdir}/python${PYTHON_MAJMIN}/fractions.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_contextvars.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_decimal.*.so", "${libdir}/python${PYTHON_MAJMIN}/numbers.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pydecimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/contextvars.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/decimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fractions.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/numbers.*.pyc" - ] + "cached": [] }, "pickle": { "summary": "Python serialisation/persistence support", @@ -917,12 +890,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pickletools.py", "${libdir}/python${PYTHON_MAJMIN}/shelve.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compat_pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickletools.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shelve.*.pyc" - ] + "cached": [] }, "pkgutil": { "summary": "Python package extension utility support", @@ -942,9 +910,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/plistlib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/plistlib.*.pyc" - ] + "cached": [] }, "pprint": { "summary": "Python pretty-print support", @@ -954,9 +920,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/pprint.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pprint.*.pyc" - ] + "cached": [] }, "profile": { "summary": "Python basic performance profiling support", @@ -967,13 +931,11 @@ "${libdir}/python${PYTHON_MAJMIN}/cProfile.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lsprof.*.so", "${libdir}/python${PYTHON_MAJMIN}/profile.py", + "${libdir}/python${PYTHON_MAJMIN}/profiling", + "${libdir}/python${PYTHON_MAJMIN}/profiling/tracing", "${libdir}/python${PYTHON_MAJMIN}/pstats.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cProfile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/profile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc" - ] + "cached": [] }, "pydoc": { "summary": "Python interactive help support", @@ -985,9 +947,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pydoc.py", "${libdir}/python${PYTHON_MAJMIN}/pydoc_data" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc" - ] + "cached": [] }, "resource": { "summary": "Python resource control interface", @@ -1002,17 +962,13 @@ "shell": { "summary": "Python shell-like functionality", "rdepends": [ - "core", - "stringold" + "core" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/cmd.py", "${libdir}/python${PYTHON_MAJMIN}/shlex.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc" - ] + "cached": [] }, "sqlite3": { "summary": "Python Sqlite3 database support", @@ -1037,9 +993,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_statistics.*.so", "${libdir}/python${PYTHON_MAJMIN}/statistics.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/statistics.*.pyc" - ] + "cached": [] }, "stringold": { "summary": "Common string operations", @@ -1072,10 +1026,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pty.py", "${libdir}/python${PYTHON_MAJMIN}/tty.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pty.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tty.*.pyc" - ] + "cached": [] }, "threading": { "summary": "Python threading & synchronization support", @@ -1087,10 +1038,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_queue.*.so", "${libdir}/python${PYTHON_MAJMIN}/queue.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_threading_local.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/queue.*.pyc" - ] + "cached": [] }, "tkinter": { "summary": "Python Tcl/Tk bindings", @@ -1141,15 +1089,15 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/getpass.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc" - ] + "cached": [] }, "venv": { "summary": "Provides support for creating lightweight virtual environments with their own site directories, optionally isolated from system site directories.", "rdepends": [ + "compression", "core", "logging", + "shell", "stringold" ], "files": [ @@ -1200,11 +1148,10 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/zipapp.py" + "${libdir}/python${PYTHON_MAJMIN}/zipapp.py", + "${libdir}/python${PYTHON_MAJMIN}/zipfile" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipapp.*.pyc" - ] + "cached": [] }, "zoneinfo": { "summary": "IANA time zone support", diff --git a/meta/recipes-devtools/python/python3/valid-dists.patch b/meta/recipes-devtools/python/python3/valid-dists.patch deleted file mode 100644 index 7fe18254e50..00000000000 --- a/meta/recipes-devtools/python/python3/valid-dists.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 66874ce1a9f21b4b00dc85919734d58e6243ca29 Mon Sep 17 00:00:00 2001 -From: "Jason R. Coombs" <jaraco@jaraco.com> -Date: Tue, 23 Jul 2024 08:36:16 -0400 -Subject: [PATCH] Prioritize valid dists to invalid dists when retrieving by - name. - -Closes python/importlib_metadata#489 - -Upstream-Status: Backport [https://github.com/python/importlib_metadata/commit/a65c29adc027b3615154cab73aaedd58a6aa23da] -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - Lib/importlib/metadata/__init__.py | 14 +++- - Lib/importlib/metadata/_itertools.py | 98 ++++++++++++++++++++++++++++ - 2 files changed, 110 insertions(+), 2 deletions(-) - -diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 8ce62dd..085378c 100644 ---- a/Lib/importlib/metadata/__init__.py -+++ b/Lib/importlib/metadata/__init__.py -@@ -21,7 +21,7 @@ import collections - from . import _meta - from ._collections import FreezableDefaultDict, Pair - from ._functools import method_cache, pass_none --from ._itertools import always_iterable, unique_everseen -+from ._itertools import always_iterable, bucket, unique_everseen - from ._meta import PackageMetadata, SimplePath - - from contextlib import suppress -@@ -404,7 +404,7 @@ class Distribution(DeprecatedNonAbstract): - if not name: - raise ValueError("A distribution name is required.") - try: -- return next(iter(cls.discover(name=name))) -+ return next(iter(cls._prefer_valid(cls.discover(name=name)))) - except StopIteration: - raise PackageNotFoundError(name) - -@@ -428,6 +428,16 @@ class Distribution(DeprecatedNonAbstract): - resolver(context) for resolver in cls._discover_resolvers() - ) - -+ @staticmethod -+ def _prefer_valid(dists: Iterable[Distribution]) -> Iterable[Distribution]: -+ """ -+ Prefer (move to the front) distributions that have metadata. -+ -+ Ref python/importlib_resources#489. -+ """ -+ buckets = bucket(dists, lambda dist: bool(dist.metadata)) -+ return itertools.chain(buckets[True], buckets[False]) -+ - @staticmethod - def at(path: str | os.PathLike[str]) -> Distribution: - """Return a Distribution for the indicated metadata path. -diff --git a/Lib/importlib/metadata/_itertools.py b/Lib/importlib/metadata/_itertools.py -index d4ca9b9..79d3719 100644 ---- a/Lib/importlib/metadata/_itertools.py -+++ b/Lib/importlib/metadata/_itertools.py -@@ -1,3 +1,4 @@ -+from collections import defaultdict, deque - from itertools import filterfalse - - -@@ -71,3 +72,100 @@ def always_iterable(obj, base_type=(str, bytes)): - return iter(obj) - except TypeError: - return iter((obj,)) -+ -+ -+# Copied from more_itertools 10.3 -+class bucket: -+ """Wrap *iterable* and return an object that buckets the iterable into -+ child iterables based on a *key* function. -+ -+ >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] -+ >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character -+ >>> sorted(list(s)) # Get the keys -+ ['a', 'b', 'c'] -+ >>> a_iterable = s['a'] -+ >>> next(a_iterable) -+ 'a1' -+ >>> next(a_iterable) -+ 'a2' -+ >>> list(s['b']) -+ ['b1', 'b2', 'b3'] -+ -+ The original iterable will be advanced and its items will be cached until -+ they are used by the child iterables. This may require significant storage. -+ -+ By default, attempting to select a bucket to which no items belong will -+ exhaust the iterable and cache all values. -+ If you specify a *validator* function, selected buckets will instead be -+ checked against it. -+ -+ >>> from itertools import count -+ >>> it = count(1, 2) # Infinite sequence of odd numbers -+ >>> key = lambda x: x % 10 # Bucket by last digit -+ >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only -+ >>> s = bucket(it, key=key, validator=validator) -+ >>> 2 in s -+ False -+ >>> list(s[2]) -+ [] -+ -+ """ -+ -+ def __init__(self, iterable, key, validator=None): -+ self._it = iter(iterable) -+ self._key = key -+ self._cache = defaultdict(deque) -+ self._validator = validator or (lambda x: True) -+ -+ def __contains__(self, value): -+ if not self._validator(value): -+ return False -+ -+ try: -+ item = next(self[value]) -+ except StopIteration: -+ return False -+ else: -+ self._cache[value].appendleft(item) -+ -+ return True -+ -+ def _get_values(self, value): -+ """ -+ Helper to yield items from the parent iterator that match *value*. -+ Items that don't match are stored in the local cache as they -+ are encountered. -+ """ -+ while True: -+ # If we've cached some items that match the target value, emit -+ # the first one and evict it from the cache. -+ if self._cache[value]: -+ yield self._cache[value].popleft() -+ # Otherwise we need to advance the parent iterator to search for -+ # a matching item, caching the rest. -+ else: -+ while True: -+ try: -+ item = next(self._it) -+ except StopIteration: -+ return -+ item_value = self._key(item) -+ if item_value == value: -+ yield item -+ break -+ elif self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ def __iter__(self): -+ for item in self._it: -+ item_value = self._key(item) -+ if self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ yield from self._cache.keys() -+ -+ def __getitem__(self, value): -+ if not self._validator(value): -+ return iter(()) -+ -+ return self._get_values(value) diff --git a/meta/recipes-devtools/python/python3_3.14.10.bb b/meta/recipes-devtools/python/python3_3.15.2.bb similarity index 98% rename from meta/recipes-devtools/python/python3_3.14.10.bb rename to meta/recipes-devtools/python/python3_3.15.2.bb index b062b4e7c50..0ead68b7497 100644 --- a/meta/recipes-devtools/python/python3_3.14.10.bb +++ b/meta/recipes-devtools/python/python3_3.15.2.bb @@ -18,19 +18,17 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://makerace.patch \ file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \ file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \ - file://valid-dists.patch \ file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \ file://0001-prefer-valid-entrypoints.patch \ - file://0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch \ - file://0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch \ - file://0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch \ + file://0001-configure-clear-RUNSHARED-when-cross-compiling.patch \ + file://0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch \ " SRC_URI:append:class-native = " \ file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ " -SRC_URI[sha256sum] = "de414a57119abef52784d8993e341d53aed635fc2b05c2607d9f98a2c5b72032" +SRC_URI[sha256sum] = "8b5536d280142ecf6cdfe15d12a21ba1c65e300bbf7b28a8d0cdb849575797de" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" @@ -41,7 +39,7 @@ inherit upstream-stable-release-point CVE_PRODUCT = "python:python python_software_foundation:python cpython" -PYTHON_MAJMIN = "3.14" +PYTHON_MAJMIN = "3.15" S = "${UNPACKDIR}/Python-${PV}" @@ -75,7 +73,7 @@ DEPENDS = "\ DEPENDS:append:class-target = " python3-native" DEPENDS:append:class-nativesdk = " python3-native" -EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat" +EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat --without-system-libmpdec" EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3 PLATFORM_TRIPLET=${HOST_ARCH}-${HOST_OS}" EXTRA_OECONF:append:class-nativesdk = " --with-build-python=nativepython3" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [OE-core] [PATCH v3 2/2] python3: Upgrade 3.14.10 -> 3.15.2 2026-10-29 21:06 ` [PATCH v3 2/2] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam @ 2026-10-31 8:40 ` Mathieu Dubois-Briand 0 siblings, 0 replies; 28+ messages in thread From: Mathieu Dubois-Briand @ 2026-10-31 8:40 UTC (permalink / raw) To: Jaipaul Cheernam, openembedded-core On Thu Oct 29, 2026 at 10:06 PM CET, Jaipaul Cheernam wrote: > ReleaseNotes: https://docs.python.org/3/whatsnew/changelog.html#python-3-15-2-final > > - Drop patches which are part of upstream release > - 0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch > - 0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch > - 0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch > - valid-dists.patch > - Add --without-system-libmpdec as EXTRA_OECONF configure option > (--with-system-libmpdec is needed new package mpdecimal [1]) > - Bump PYTHON_BASEVERSION to 3.15 in python3-dir.bbclass > - Update python3-manifest > - Refresh existing patches > - Add two fixes needed for the new release > - 0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch > - 0001-configure-clear-RUNSHARED-when-cross-compiling.patch > > Verification: > - Built python3 for glibc and musl > - verified ptest for all 34 python3 packages which supports ptest > > [1] https://github.com/python/cpython/issues/115119 > > Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> > --- Hi Jaipaul, Thanks for the new version, it does fix the previous issues. Yet we still have a failure in glib: AssertionError: Failed ptests: {'glib-2.0': ['glib/memory-monitor-portal.test', 'glib/power-profile-monitor-portal.test', 'glib/power-profile-monitor-dbus.test', 'glib/memory-monitor-dbus.test']} https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/4842 https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/4813 https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2699 Can you have a look at the issue? Thanks, Mathieu -- Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 0/3] python3: Upgrade to 3.15.2 2026-10-12 9:00 ` [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 Jaipaul Cheernam 2026-10-12 9:40 ` [OE-core] " Marko, Peter 2026-10-29 21:06 ` [PATCH v3 0/2] python3 upgrade to 3.15.2 Jaipaul Cheernam @ 2026-11-02 7:01 ` Jaipaul Cheernam 2026-11-02 7:01 ` [PATCH v4 1/3] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam ` (2 more replies) 2026-11-02 8:08 ` [PATCH v5 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam ` (2 subsequent siblings) 5 siblings, 3 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-02 7:01 UTC (permalink / raw) To: openembedded-core python3-maturin: Add support for python 3.15.2 can be dropped if https://lists.openembedded.org/g/openembedded-core/message/249174 merged before this series python3-maturin 1.16.0 contains Update-maximum-Python-PyPy-version changes Jaipaul Cheernam (3): python3-maturin: Add support for python 3.15.2 python3-dbus: Upgrade 1.4.0 -> 1.5.1 python3: Upgrade 3.14.10 -> 3.15.2 meta/classes-recipe/python3-dir.bbclass | 2 +- ...n3-dbus_1.4.0.bb => python3-dbus_1.5.1.bb} | 16 +- ...1-Update-maximum-Python-PyPy-version.patch | 99 +++++++ .../python/python3-maturin_1.15.0.bb | 4 +- ...shebang-overflow-on-python-config.py.patch | 6 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 6 +- ...-qemu-wrapper-when-gathering-profile.patch | 6 +- ...est_sysconfig-for-posix_user-purelib.patch | 6 +- ...clear-RUNSHARED-when-cross-compiling.patch | 46 ++++ ...146207-Add-support-for-OpenSSL-4.0.0.patch | 254 ------------------ ...st_is_python_process_non_python_subp.patch | 50 ++++ .../0001-prefer-valid-entrypoints.patch | 6 +- ...g.py-use-platlibdir-also-for-purelib.patch | 4 +- ...le.py-correct-the-test-output-format.patch | 6 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 6 +- .../python/python3/python3-manifest.json | 199 +++++--------- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.10.bb => python3_3.15.2.bb} | 12 +- 21 files changed, 311 insertions(+), 858 deletions(-) rename meta/recipes-devtools/python/{python3-dbus_1.4.0.bb => python3-dbus_1.5.1.bb} (50%) create mode 100644 meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch create mode 100644 meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch create mode 100644 meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.10.bb => python3_3.15.2.bb} (98%) ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 1/3] python3-maturin: Add support for python 3.15.2 2026-11-02 7:01 ` [PATCH v4 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam @ 2026-11-02 7:01 ` Jaipaul Cheernam 2026-11-02 7:01 ` [PATCH v4 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 Jaipaul Cheernam 2026-11-02 7:01 ` [PATCH v4 3/3] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-02 7:01 UTC (permalink / raw) To: openembedded-core Backport the upstream fix which raises the maximum Python version to 3.15 and PyPy to 3.12 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...1-Update-maximum-Python-PyPy-version.patch | 99 +++++++++++++++++++ .../python/python3-maturin_1.15.0.bb | 4 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch diff --git a/meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch b/meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch new file mode 100644 index 00000000000..1c78bced287 --- /dev/null +++ b/meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch @@ -0,0 +1,99 @@ +From 713a7088e1ca9f1fe71efd670826d6b77470c24d Mon Sep 17 00:00:00 2001 +From: messense <messense@icloud.com> +Date: Thu, 29 Oct 2026 21:46:23 +0800 +Subject: [PATCH] Update maximum Python & PyPy version + +Upstream-Status: Backport [https://github.com/PyO3/maturin/commit/3bec0a32ae2b67ad4fac0194f762f44141e51473] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + src/python_interpreter/discovery.rs | 12 ++++++++++++ + src/python_interpreter/mod.rs | 4 ++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/python_interpreter/discovery.rs b/src/python_interpreter/discovery.rs +index e4bcb73..47548aa 100644 +--- a/src/python_interpreter/discovery.rs ++++ b/src/python_interpreter/discovery.rs +@@ -708,10 +708,12 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "PyPy 3.8", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -740,10 +742,13 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "CPython 3.14t", ++ "CPython 3.15t", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -765,10 +770,12 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "PyPy 3.8", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -788,8 +795,10 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -817,10 +826,13 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "CPython 3.14t", ++ "CPython 3.15t", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +diff --git a/src/python_interpreter/mod.rs b/src/python_interpreter/mod.rs +index dca016f..9dcdaf8 100644 +--- a/src/python_interpreter/mod.rs ++++ b/src/python_interpreter/mod.rs +@@ -23,11 +23,11 @@ pub const MINIMUM_PYTHON_MINOR: usize = 7; + /// Minimum supported PyPy minor version. + pub const MINIMUM_PYPY_MINOR: usize = 8; + /// Be liberal here to include preview versions +-pub const MAXIMUM_PYTHON_MINOR: usize = 14; ++pub const MAXIMUM_PYTHON_MINOR: usize = 15; + /// Minimum supported version for free-threaded CPython + pub const FREE_THREADED_MINIMUM_PYTHON_MINOR: usize = 14; + /// Maximum supported PyPy minor version. +-pub const MAXIMUM_PYPY_MINOR: usize = 11; ++pub const MAXIMUM_PYPY_MINOR: usize = 12; + + /// The kind of Python interpreter (CPython, PyPy, or GraalPy). + #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, serde::Deserialize, clap::ValueEnum)] diff --git a/meta/recipes-devtools/python/python3-maturin_1.15.0.bb b/meta/recipes-devtools/python/python3-maturin_1.15.0.bb index a29e29bda9e..e8c0b6a6ad1 100644 --- a/meta/recipes-devtools/python/python3-maturin_1.15.0.bb +++ b/meta/recipes-devtools/python/python3-maturin_1.15.0.bb @@ -5,7 +5,9 @@ LICENSE = "Apache-2.0 OR MIT" LIC_FILES_CHKSUM = "file://license-apache;md5=1836efb2eb779966696f473ee8540542 \ file://license-mit;md5=85fd3b67069cff784d98ebfc7d5c0797" -SRC_URI += "file://0001-Cargo.lock-Update-rustix-to-1.1.5.patch" +SRC_URI += "file://0001-Cargo.lock-Update-rustix-to-1.1.5.patch \ + file://0001-Update-maximum-Python-PyPy-version.patch \ + " SRC_URI[sha256sum] = "94b26cc8e8aba61a5f2099715fe640e18c5f678e9a500408b38761263954228a" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v4 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 2026-11-02 7:01 ` [PATCH v4 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam 2026-11-02 7:01 ` [PATCH v4 1/3] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam @ 2026-11-02 7:01 ` Jaipaul Cheernam 2026-11-02 7:17 ` Patchtest results for " patchtest 2026-11-02 7:01 ` [PATCH v4 3/3] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2 siblings, 1 reply; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-02 7:01 UTC (permalink / raw) To: openembedded-core NEWS: https://gitlab.freedesktop.org/dbus/dbus-python/-/raw/dbus-python-1.5.1/NEWS few notable changes: - The sdist is now called dbus_python and ships as a .tar.gz (PEP-625), so SRC_URI and S need updating. - Autotools is gone, but we already build with meson. -Dtests=false is now deprecated, so switch to -Dtests=disabled. - The tree is REUSE-compliant now, so LICENSE grows to cover the bundled dbus-gmain bits (AFL-2.1 or GPL-2.0-or-later) next to dbus-python's own MIT, with LIC_FILES_CHKSUM pointing at the individual license files. Full NEWS: dbus Python Bindings 1.5.1 (2026-10-23) ======================================= Fixes: * Fix a memory leak when freeing UnixFd objects (dbus-python#62, Nieves Montero Fernandez) * Avoid libdbus assertion failures in some configurations if attempting to write an invalid item into a variant, for example a non-UTF-8 bytestring (dbus-python#60, Nieves Montero Fernandez) * Be more consistent about how containers are closed, to avoid mistakes similar to dbus-python#60 (Simon McVittie) dbus Python Bindings 1.5.0 (2026-09-27) ======================================= Dependencies: * The Meson build system is required. Installation via `pip` and similar PEP-0517 build system frontends requires meson-python (mesonpy) and its dependencies. * Python 3.7 or later is required. * Python 3.9 or later is strongly recommended. Older versions are no longer tested or supported. Build system changes: * The source release is now built as a sdist using mesonpy, with a name that includes dbus_python, not dbus-python, matching the project's name on PyPI and PEP-0625 * The Autotools build system is no longer available Enhancements: * Add a `test_socket_dir` build-time option for systems where /tmp is not available (dbus-python!38, Emily) * Documentation and "as-installed" tests (if enabled) are associated with `meson install --tags=doc` and `--tags=tests` respectively (Simon McVittie) Fixes: * Revert a broken implementation of weak references that caused crashes, especially in Python 3.15 (regression in 1.4.0; dbus-python#59, Simon McVittie) * Avoid repeated configuration reloads during unit testing when dbus was compiled with kqueue (dbus-python#56, Jakub Kulík) * Add some unit tests for weak references and object destruction (dbus-python#59, Maximiliano Curia) * Metadata updates (Simon McVittie) * CI updates (Simon McVittie) Licensing: * REUSE metadata is now in TOML format * After the removal of the Autotools build system, all remaining files outside subprojects/ are believed to be MIT-licensed. The GLib main loop integration in subprojects/dbus-gmain/ continues to be under the same "AFL-2.1 OR GPL-2.0-or-later" dual-license as libdbus. Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...thon3-dbus_1.4.0.bb => python3-dbus_1.5.1.bb} | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) rename meta/recipes-devtools/python/{python3-dbus_1.4.0.bb => python3-dbus_1.5.1.bb} (50%) diff --git a/meta/recipes-devtools/python/python3-dbus_1.4.0.bb b/meta/recipes-devtools/python/python3-dbus_1.5.1.bb similarity index 50% rename from meta/recipes-devtools/python/python3-dbus_1.4.0.bb rename to meta/recipes-devtools/python/python3-dbus_1.5.1.bb index 2854eda30a0..4126c4639a0 100644 --- a/meta/recipes-devtools/python/python3-dbus_1.4.0.bb +++ b/meta/recipes-devtools/python/python3-dbus_1.5.1.bb @@ -1,20 +1,24 @@ SUMMARY = "Python bindings for the DBus inter-process communication system" SECTION = "devel/python" HOMEPAGE = "http://www.freedesktop.org/Software/dbus" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=97f58951300aa52a9f9e3a62bd5c846c" +LICENSE = "MIT AND (AFL-2.1 OR GPL-2.0-or-later)" +LIC_FILES_CHKSUM = "file://COPYING;md5=97f58951300aa52a9f9e3a62bd5c846c \ + file://LICENSES/MIT.txt;md5=7dda4e90ded66ab88b86f76169f28663 \ + file://subprojects/dbus-gmain/LICENSES/GPL-2.0-or-later.txt;md5=3d26203303a722dedc6bf909d95ba815 \ + file://subprojects/dbus-gmain/LICENSES/AFL-2.1.txt;md5=f3ad2f482ec639b440413665cfb9e714 \ + " DEPENDS = "expat dbus glib-2.0 virtual/libintl" -SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.xz" +SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus_python-${PV}.tar.gz" -SRC_URI[sha256sum] = "c36b28f10ffcc8f1f798aca973bcc132f91f33eb9b6b8904381b4077766043d5" +SRC_URI[sha256sum] = "57423cf87d09b7d084f420b55b737fe654c33339b06df77945620d97795c6ac4" -S = "${UNPACKDIR}/dbus-python-${PV}" +S = "${UNPACKDIR}/dbus_python-${PV}" inherit setuptools3-base meson pkgconfig # requires dbus-run-session -EXTRA_OEMESON += "-Dtests=false" +EXTRA_OEMESON += "-Dtests=disabled" RDEPENDS:${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Patchtest results for [PATCH v4 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 2026-11-02 7:01 ` [PATCH v4 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 Jaipaul Cheernam @ 2026-11-02 7:17 ` patchtest 0 siblings, 0 replies; 28+ messages in thread From: patchtest @ 2026-11-02 7:17 UTC (permalink / raw) To: Jaipaul Cheernam; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 3131 bytes --] Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information: --- Testing patch /home/patchtest/share/mboxes/v4-2-3-python3-dbus-Upgrade-1.4.0---1.5.1.patch FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned) PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files) PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore) PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence) PASS: test auh changelog truncation notice (test_mbox.TestMbox.test_auh_changelog_truncation_notice) PASS: test author valid (test_mbox.TestMbox.test_author_valid) PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence) PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags) PASS: test max line length (test_metadata.TestMetadata.test_max_line_length) PASS: test mbox format (test_mbox.TestMbox.test_mbox_format) PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade) PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format) PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length) PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files) PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list) SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint) SKIP: test CVE tag format: No new source patches introduced (test_patch.TestPatch.test_cve_tag_format) SKIP: test Signed-off-by presence: No new source patches introduced (test_patch.TestPatch.test_signed_off_by_presence) SKIP: test Upstream-Status presence: No new source patches introduced (test_patch.TestPatch.test_upstream_status_presence_format) SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format) SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence) SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence) SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint) SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head) SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence) --- Please address the issues identified and submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you! ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v4 3/3] python3: Upgrade 3.14.10 -> 3.15.2 2026-11-02 7:01 ` [PATCH v4 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam 2026-11-02 7:01 ` [PATCH v4 1/3] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam 2026-11-02 7:01 ` [PATCH v4 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 Jaipaul Cheernam @ 2026-11-02 7:01 ` Jaipaul Cheernam 2 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-02 7:01 UTC (permalink / raw) To: openembedded-core ReleaseNotes: https://docs.python.org/3/whatsnew/changelog.html#python-3-15-2-final - Drop patches which are part of upstream release - 0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch - 0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch - 0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch - valid-dists.patch - Add --without-system-libmpdec as EXTRA_OECONF configure option (--with-system-libmpdec is needed new package mpdecimal [1]) - Bump PYTHON_BASEVERSION to 3.15 in python3-dir.bbclass - Update python3-manifest - Refresh existing patches - Add two fixes needed for the new release - 0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch - 0001-configure-clear-RUNSHARED-when-cross-compiling.patch Verification: - Built python3 for glibc and musl - verified ptest for all 34 python3 packages which supports ptest [1] https://github.com/python/cpython/issues/115119 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- Changes since v3: - Upgrade python3-dbus which is causing failure for glib-2.0 Changes since v2: - Drop mpdecimal new package and add --without-system-libmpdec - Add patch for maturin failure - verified ptest on all 34 python3 packages - Verified with glibc and musl as well Changes since v1: - Update python3-manifest meta/classes-recipe/python3-dir.bbclass | 2 +- ...shebang-overflow-on-python-config.py.patch | 6 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 6 +- ...-qemu-wrapper-when-gathering-profile.patch | 6 +- ...est_sysconfig-for-posix_user-purelib.patch | 6 +- ...clear-RUNSHARED-when-cross-compiling.patch | 46 ++++ ...146207-Add-support-for-OpenSSL-4.0.0.patch | 254 ------------------ ...st_is_python_process_non_python_subp.patch | 50 ++++ .../0001-prefer-valid-entrypoints.patch | 6 +- ...g.py-use-platlibdir-also-for-purelib.patch | 4 +- ...le.py-correct-the-test-output-format.patch | 6 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 6 +- .../python/python3/python3-manifest.json | 199 +++++--------- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.10.bb => python3_3.15.2.bb} | 12 +- 18 files changed, 199 insertions(+), 851 deletions(-) create mode 100644 meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch create mode 100644 meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.10.bb => python3_3.15.2.bb} (98%) diff --git a/meta/classes-recipe/python3-dir.bbclass b/meta/classes-recipe/python3-dir.bbclass index 3eb0dea9b2e..b26621f3652 100644 --- a/meta/classes-recipe/python3-dir.bbclass +++ b/meta/classes-recipe/python3-dir.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -PYTHON_BASEVERSION = "3.14" +PYTHON_BASEVERSION = "3.15" PYTHON_ABI = "" PYTHON_DIR = "python${PYTHON_BASEVERSION}" PYTHON_PN = "python3" diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 79fee9803fe..f5acfb789c0 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch @@ -1,4 +1,4 @@ -From 3f2df0e1fce8c7425998dade00d084f1b101a982 Mon Sep 17 00:00:00 2001 +From c7712b4345e16786ee237427537b83787022c733 Mon Sep 17 00:00:00 2001 From: Paulo Neves <ptsneves@gmail.com> Date: Tue, 7 Jun 2022 16:16:41 +0200 Subject: [PATCH] Avoid shebang overflow on python-config.py @@ -16,10 +16,10 @@ Upstream-Status: Denied [distribution] 1 file changed, 2 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in -index e946018..345ed29 100644 +index a1d59e4..26a90e6 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2844,6 +2844,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh +@@ -2938,6 +2938,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh @ # Substitution happens here, as the completely-expanded BINDIR @ # is not available in configure sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py diff --git a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch index 532adfe69a9..322de292ce4 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch @@ -1,4 +1,4 @@ -From 9cd44429215352eb2753e0fd8e25fef24f714006 Mon Sep 17 00:00:00 2001 +From 1e6d7f34c558ed05f7d35f4a2b86f079318fb6be Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Thu, 16 Sep 2021 16:35:37 +0200 Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch index 580d38a4031..ce2efd431c5 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch @@ -1,4 +1,4 @@ -From b5aad6a9b6c5add7a85861aed8aa030c1ad3d52f Mon Sep 17 00:00:00 2001 +From 7338a6821cdc4e7cab17ca255e484bf19b4b3670 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Fri, 17 Nov 2023 14:26:32 +0100 Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration @@ -18,10 +18,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 0a8bcc0..a2341f2 100644 +index 924401c..0ff84f7 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py -@@ -539,12 +539,12 @@ def _init_config_vars(): +@@ -537,12 +537,12 @@ def _init_config_vars(): _CONFIG_VARS['py_version'] = _PY_VERSION _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT _CONFIG_VARS['py_version_nodot'] = _PY_VERSION_SHORT_NO_DOT diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch index d3f46c372a6..dd5a87cd541 100644 --- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch +++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch @@ -1,4 +1,4 @@ -From d6f77e3a934616d1f6c083b7144c50a32e08b70a Mon Sep 17 00:00:00 2001 +From 61b446b8554b91b93f8ae40c654abf9d8a77145d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 30 Jan 2019 12:41:04 +0100 Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data @@ -15,10 +15,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 526d500..a7e536d 100644 +index 95fefcc..24ca285 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -864,8 +864,7 @@ profile-run-stamp: +@@ -879,8 +879,7 @@ profile-run-stamp: # enabled. $(MAKE) profile-gen-stamp # Next, run the profile task to generate the profile information. diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch index 0864f23926a..6cc7ae187e6 100644 --- a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch @@ -1,4 +1,4 @@ -From c608cb4b3c8c31f1aa25ad1264ff58733fb99769 Mon Sep 17 00:00:00 2001 +From f1e23d641d6edb5bb82cd24272b7b1f8c42c64dd Mon Sep 17 00:00:00 2001 From: Wentao Zhang <wentao.zhang@windriver.com> Date: Mon, 20 Mar 2023 13:39:52 +0800 Subject: [PATCH] Update test_sysconfig for posix_user purelib @@ -22,10 +22,10 @@ Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py -index 1fe4b68..383142a 100644 +index ce3a3c6..4eb65fb 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py -@@ -435,7 +435,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): +@@ -432,7 +432,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): expected = os.path.normpath(global_path.replace(base, user, 1)) # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, # whereas posix_prefix does. diff --git a/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch new file mode 100644 index 00000000000..f5f09e81ee9 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +Date: Tue, 27 Oct 2026 10:00:00 +0000 +Subject: [PATCH] configure: clear RUNSHARED when cross compiling + +Since 3.15 the checksharedmods target runs the host build python with the +target LD_LIBRARY_PATH, which breaks musl cross builds (host cannot load +libc.so). Clear RUNSHARED for cross builds as before. + +Upstream-Status: Submitted [https://github.com/python/cpython/issues/160924] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + configure | 4 ++++ + configure.ac | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/configure b/configure +index 6f7ff1b..9702135 100755 +--- a/configure ++++ b/configure +@@ -7867,6 +7867,10 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 + printf "%s\n" "$LDLIBRARY" >&6; } + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOSTRUNNER" >&5 + printf %s "checking HOSTRUNNER... " >&6; } +diff --git a/configure.ac b/configure.ac +index 9923805..9e86057 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1670,6 +1670,10 @@ else # shared is disabled + fi + AC_MSG_RESULT([$LDLIBRARY]) + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + AC_MSG_CHECKING([HOSTRUNNER]) + if test -z "$HOSTRUNNER" diff --git a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch b/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch deleted file mode 100644 index 37f55de65c2..00000000000 --- a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch +++ /dev/null @@ -1,254 +0,0 @@ -From 3364e7e62fa24d0e19133fb0f90b1c24ef1110c5 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Wed, 25 Mar 2026 07:44:47 +0100 -Subject: [PATCH] gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217) - -OpenSSL 4.0.0 alpha1 removed these functions: - -* SSLv3_method() -* TLSv1_method() -* TLSv1_1_method() -* TLSv1_2_method() - -Other changes: - -* Update test_openssl_version(). -* Update multissltests.py for OpenSSL 4. -* Add const qualifier to fix compiler warnings. - -Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> -Signed-off-by: Victor Stinner <vstinner@python.org> - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3364e7e62fa24d0e19133fb0f90b1c24ef1110c5] -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 52 ++++++++++++++++++++------------------ - Modules/_ssl.c | 27 ++++++++++++++++---- - Modules/_ssl/cert.c | 3 ++- - Tools/ssl/multissltests.py | 7 ++++- - 4 files changed, 58 insertions(+), 31 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index dc795c6bd8a..61355927296 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -439,7 +439,7 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_COMPRESSION - self.assertEqual(ssl.HAS_SNI, True) - self.assertEqual(ssl.HAS_ECDH, True) -- self.assertEqual(ssl.HAS_TLSv1_2, True) -+ self.assertIsInstance(ssl.HAS_TLSv1_2, bool) - self.assertEqual(ssl.HAS_TLSv1_3, True) - ssl.OP_NO_SSLv2 - ssl.OP_NO_SSLv3 -@@ -630,11 +630,11 @@ class BasicSocketTests(unittest.TestCase): - # Some sanity checks follow - # >= 1.1.1 - self.assertGreaterEqual(n, 0x10101000) -- # < 4.0 -- self.assertLess(n, 0x40000000) -+ # < 5.0 -+ self.assertLess(n, 0x50000000) - major, minor, fix, patch, status = t - self.assertGreaterEqual(major, 1) -- self.assertLess(major, 4) -+ self.assertLess(major, 5) - self.assertGreaterEqual(minor, 0) - self.assertLess(minor, 256) - self.assertGreaterEqual(fix, 0) -@@ -700,12 +700,14 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_TLSv1_2, - ssl.OP_NO_TLSv1_3 - ] -- protocols = [ -- ssl.PROTOCOL_TLSv1, -- ssl.PROTOCOL_TLSv1_1, -- ssl.PROTOCOL_TLSv1_2, -- ssl.PROTOCOL_TLS -- ] -+ protocols = [] -+ if hasattr(ssl, 'PROTOCOL_TLSv1'): -+ protocols.append(ssl.PROTOCOL_TLSv1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_1'): -+ protocols.append(ssl.PROTOCOL_TLSv1_1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_2'): -+ protocols.append(ssl.PROTOCOL_TLSv1_2) -+ protocols.append(ssl.PROTOCOL_TLS) - versions = [ - ssl.TLSVersion.SSLv3, - ssl.TLSVersion.TLSv1, -@@ -1199,6 +1201,7 @@ class ContextTests(unittest.TestCase): - ssl.TLSVersion.TLSv1, - ssl.TLSVersion.TLSv1_1, - ssl.TLSVersion.TLSv1_2, -+ ssl.TLSVersion.TLSv1_3, - ssl.TLSVersion.SSLv3, - } - ) -@@ -1212,7 +1215,7 @@ class ContextTests(unittest.TestCase): - with self.assertRaises(ValueError): - ctx.minimum_version = 42 - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_1) - - self.assertIn( -@@ -1764,23 +1767,24 @@ class ContextTests(unittest.TestCase): - self.assertFalse(ctx.check_hostname) - self._assert_context_options(ctx) - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - with warnings_helper.check_warnings(): - ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) - self._assert_context_options(ctx) - -- with warnings_helper.check_warnings(): -- ctx = ssl._create_stdlib_context( -- ssl.PROTOCOL_TLSv1_2, -- cert_reqs=ssl.CERT_REQUIRED, -- check_hostname=True -- ) -- self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -- self.assertTrue(ctx.check_hostname) -- self._assert_context_options(ctx) -+ if has_tls_protocol('PROTOCOL_TLSv1_2'): -+ with warnings_helper.check_warnings(): -+ ctx = ssl._create_stdlib_context( -+ ssl.PROTOCOL_TLSv1_2, -+ cert_reqs=ssl.CERT_REQUIRED, -+ check_hostname=True -+ ) -+ self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -+ self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -+ self.assertTrue(ctx.check_hostname) -+ self._assert_context_options(ctx) - - ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_SERVER) -@@ -3908,10 +3912,10 @@ class ThreadedTests(unittest.TestCase): - client_options=ssl.OP_NO_TLSv1_2) - - try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2') -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False) -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False) - -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index b45295b4c0c..6f75af86113 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -136,6 +136,17 @@ static void _PySSLFixErrno(void) { - #error Unsupported OpenSSL version - #endif - -+#if (OPENSSL_VERSION_NUMBER >= 0x40000000L) -+# define OPENSSL_NO_SSL3 -+# define OPENSSL_NO_TLS1 -+# define OPENSSL_NO_TLS1_1 -+# define OPENSSL_NO_TLS1_2 -+# define OPENSSL_NO_SSL3_METHOD -+# define OPENSSL_NO_TLS1_METHOD -+# define OPENSSL_NO_TLS1_1_METHOD -+# define OPENSSL_NO_TLS1_2_METHOD -+#endif -+ - /* OpenSSL API 1.1.0+ does not include version methods */ - #ifndef OPENSSL_NO_SSL3_METHOD - extern const SSL_METHOD *SSLv3_method(void); -@@ -1137,7 +1148,7 @@ _asn1obj2py(_sslmodulestate *state, const ASN1_OBJECT *name, int no_name) - - static PyObject * - _create_tuple_for_attribute(_sslmodulestate *state, -- ASN1_OBJECT *name, ASN1_STRING *value) -+ const ASN1_OBJECT *name, const ASN1_STRING *value) - { - Py_ssize_t buflen; - PyObject *pyattr; -@@ -1166,16 +1177,16 @@ _create_tuple_for_attribute(_sslmodulestate *state, - } - - static PyObject * --_create_tuple_for_X509_NAME (_sslmodulestate *state, X509_NAME *xname) -+_create_tuple_for_X509_NAME(_sslmodulestate *state, const X509_NAME *xname) - { - PyObject *dn = NULL; /* tuple which represents the "distinguished name" */ - PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */ - PyObject *rdnt; - PyObject *attr = NULL; /* tuple to hold an attribute */ - int entry_count = X509_NAME_entry_count(xname); -- X509_NAME_ENTRY *entry; -- ASN1_OBJECT *name; -- ASN1_STRING *value; -+ const X509_NAME_ENTRY *entry; -+ const ASN1_OBJECT *name; -+ const ASN1_STRING *value; - int index_counter; - int rdn_level = -1; - int retcode; -@@ -6599,9 +6610,15 @@ sslmodule_init_constants(PyObject *m) - ADD_INT_CONST("PROTOCOL_TLS", PY_SSL_VERSION_TLS); - ADD_INT_CONST("PROTOCOL_TLS_CLIENT", PY_SSL_VERSION_TLS_CLIENT); - ADD_INT_CONST("PROTOCOL_TLS_SERVER", PY_SSL_VERSION_TLS_SERVER); -+#ifndef OPENSSL_NO_TLS1 - ADD_INT_CONST("PROTOCOL_TLSv1", PY_SSL_VERSION_TLS1); -+#endif -+#ifndef OPENSSL_NO_TLS1_1 - ADD_INT_CONST("PROTOCOL_TLSv1_1", PY_SSL_VERSION_TLS1_1); -+#endif -+#ifndef OPENSSL_NO_TLS1_2 - ADD_INT_CONST("PROTOCOL_TLSv1_2", PY_SSL_VERSION_TLS1_2); -+#endif - - #define ADD_OPTION(NAME, VALUE) if (sslmodule_add_option(m, NAME, (VALUE)) < 0) return -1 - -diff --git a/Modules/_ssl/cert.c b/Modules/_ssl/cert.c -index f2e7be89668..061b0fb3171 100644 ---- a/Modules/_ssl/cert.c -+++ b/Modules/_ssl/cert.c -@@ -128,7 +128,8 @@ _ssl_Certificate_get_info_impl(PySSLCertificate *self) - } - - static PyObject* --_x509name_print(_sslmodulestate *state, X509_NAME *name, int indent, unsigned long flags) -+_x509name_print(_sslmodulestate *state, const X509_NAME *name, -+ int indent, unsigned long flags) - { - PyObject *res; - BIO *biobuf; -diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py -index 3b4507c6771..48207e5330f 100755 ---- a/Tools/ssl/multissltests.py -+++ b/Tools/ssl/multissltests.py -@@ -422,9 +422,11 @@ class BuildOpenSSL(AbstractBuilder): - def _post_install(self): - if self.version.startswith("3."): - self._post_install_3xx() -+ elif self.version.startswith("4."): -+ self._post_install_4xx() - - def _build_src(self, config_args=()): -- if self.version.startswith("3."): -+ if self.version.startswith(("3.", "4.")): - config_args += ("enable-fips",) - super()._build_src(config_args) - -@@ -440,6 +442,9 @@ class BuildOpenSSL(AbstractBuilder): - lib64 = self.lib_dir + "64" - os.symlink(lib64, self.lib_dir) - -+ def _post_install_4xx(self): -+ self._post_install_3xx() -+ - @property - def short_version(self): - """Short version for OpenSSL download URL""" diff --git a/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch new file mode 100644 index 00000000000..581dad9b2ee --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch @@ -0,0 +1,50 @@ +From 1db73a72041cdbbeb4ddef01595f25129a8138f7 Mon Sep 17 00:00:00 2001 +From: Tom Greenslade <thomgree@cisco.com> +Date: Thu, 29 Oct 2026 14:17:40 +0000 +Subject: [PATCH] gh-160881: Fix test_is_python_process_non_python_subprocess + with multicall sleep + +_wait_for_process_exec() waited for /proc/{pid}/exe to be named "sleep", +which never happens when sleep is a multicall binary (BusyBox on Alpine, +coreutils-single on RHEL UBI9). Wait instead until the child's executable +differs from the parent's, which means the child has called exec(). + +Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> + +Upstream-Status: Submitted [https://github.com/python/cpython/pull/160901] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + .../test_sampling_profiler/test_children.py | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_children.py b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +index 4b27c6dbb1896c1..9a8d529c4b82444 100644 +--- a/Lib/test/test_profiling/test_sampling_profiler/test_children.py ++++ b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +@@ -85,12 +85,14 @@ def reader(): + return result[0] + + +-def _wait_for_process_exec(proc, name, timeout): ++def _wait_for_process_exec(proc, timeout): + # Wait until a child process calls exec() to replace the forked process +- # executable. Raise AssertionError on timeout. ++ # executable. Don't check the executable name: it can be a multicall ++ # binary such as /bin/busybox. Raise AssertionError on timeout. ++ parent_exe = os.readlink("/proc/self/exe") + for _ in sleeping_retry(timeout, max_delay=0.1): + exe = os.readlink(f"/proc/{proc.pid}/exe") +- if os.path.basename(exe) == name: ++ if exe != parent_exe: + break + + +@@ -625,7 +627,7 @@ def test_is_python_process_non_python_subprocess(self): + ) + + try: +- _wait_for_process_exec(proc, "sleep", SHORT_TIMEOUT) ++ _wait_for_process_exec(proc, SHORT_TIMEOUT) + + self.assertFalse( + is_python_process(proc.pid), diff --git a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch index 525a2ca7000..e5043255928 100644 --- a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch +++ b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch @@ -1,4 +1,4 @@ -From 8d7fcf04c6513841c7985e64b746b1ef5de0c426 Mon Sep 17 00:00:00 2001 +From 57c51c6746c1efdae1654df443c5d23351b2d131 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@arm.com> Date: Fri, 17 Apr 2026 16:53:42 +0100 Subject: [PATCH] prefer valid entrypoints @@ -16,10 +16,10 @@ Signed-off-by: Ross Burton <ross.burton@arm.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 085378c..ff5cae4 100644 +index 32f4b7d..705f245 100644 --- a/Lib/importlib/metadata/__init__.py +++ b/Lib/importlib/metadata/__init__.py -@@ -1016,7 +1016,7 @@ def entry_points(**params) -> EntryPoints: +@@ -1120,7 +1120,7 @@ def entry_points(**params) -> EntryPoints: :return: EntryPoints for all installed packages. """ eps = itertools.chain.from_iterable( diff --git a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch index 7807827d9aa..e24d6b63b16 100644 --- a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch @@ -1,4 +1,4 @@ -From c10d1b295a9fb93836830cce441da3f22e5c7cd7 Mon Sep 17 00:00:00 2001 +From 07c5b43f29e93825e1c0b0fcebf40dc5971d438f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Sun, 12 Sep 2021 21:44:36 +0200 Subject: [PATCH] sysconfig.py: use platlibdir also for purelib @@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index faf8273..0a8bcc0 100644 +index b931551..924401c 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -29,7 +29,7 @@ _INSTALL_SCHEMES = { diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch index a60d082e2f4..12d87168ca5 100644 --- a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch +++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch @@ -1,4 +1,4 @@ -From f0ac5b479b99bfb7f5e937a941b31a596f4caafc Mon Sep 17 00:00:00 2001 +From c8d8b7aaf96faa50d8bf20c59ed31e7c6a8d698c Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Mon, 5 Aug 2019 15:57:39 +0800 Subject: [PATCH] test_locale.py: correct the test output format @@ -31,10 +31,10 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py -index f918435..1910a43 100644 +index a06c600..38b91d0 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py -@@ -499,7 +499,7 @@ class TestRealLocales(unittest.TestCase): +@@ -500,7 +500,7 @@ class TestRealLocales(unittest.TestCase): self.skipTest('test needs Turkish locale') loc = locale.getlocale(locale.LC_CTYPE) if verbose: diff --git a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch b/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch deleted file mode 100644 index 1b9a7fc9422..00000000000 --- a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch +++ /dev/null @@ -1,234 +0,0 @@ -From 3c2a3014af7d73cc34f2498f60fdf863d9bc7c6c Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 13:52:57 +0200 -Subject: [PATCH] gh-148292: Update _ssl._SSLSocket for OpenSSL 4 (#149102) - -The _SSLSocket object now remembers if it gets an EOF error. In this -case, read(), sendfile(), write() and do_handshake method calls fail -with SSLEOFError without calling the underlying OpenSSL function. - -Co-authored-by: Gregory P. Smith <greg@krypto.org> -(cherry picked from commit 7b7fa3f9bf3d7cdf3eb669d02b386e05b39c402a) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3c2a3014af7d] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 82 +++++++++++++++++++ - ...-04-28-17-47-55.gh-issue-148292.oIq3ml.rst | 7 ++ - Modules/_ssl.c | 42 ++++++++++ - 3 files changed, 131 insertions(+) - create mode 100644 Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 965dbc36f096499..03d9e3f9e5e96b5 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -3039,6 +3039,36 @@ class ThreadedEchoServer(threading.Thread): - def stop(self): - self.active = False - -+class TestEOFServer(threading.Thread): -+ def __init__(self): -+ super().__init__() -+ self.listening = threading.Event() -+ self.address = None -+ -+ def run(self): -+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) -+ context.load_cert_chain(CERTFILE) -+ server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ with server_sock: -+ server_sock.settimeout(support.SHORT_TIMEOUT) -+ server_sock.bind((HOST, 0)) -+ server_sock.listen(5) -+ -+ self.address = server_sock.getsockname() -+ self.listening.set() -+ -+ sock, addr = server_sock.accept() -+ sslconn = context.wrap_socket(sock, server_side=True) -+ with sslconn: -+ request = b'' -+ while chunk := sslconn.recv(1024): -+ request += chunk -+ if b'\n' in chunk: -+ break -+ -+ sslconn.sendall(b'server\n') -+ sslconn.shutdown(socket.SHUT_WR) -+ - class AsyncoreEchoServer(threading.Thread): - - # this one's based on asyncore.dispatcher -@@ -5079,6 +5109,58 @@ class ThreadedTests(unittest.TestCase): - if cm.exc_value is not None: - raise cm.exc_value - -+ def test_got_eof(self): -+ # gh-148292: Test that _ssl._SSLSocket behaves the same on all OpenSSL -+ # versions on calling methods after EOF (after the first SSLEOFError). -+ -+ server = TestEOFServer() -+ server.start() -+ if not server.listening.wait(support.SHORT_TIMEOUT): -+ raise RuntimeError("server took too long") -+ self.addCleanup(server.join) -+ -+ context = ssl.create_default_context(cafile=CERTFILE) -+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ sock.settimeout(support.SHORT_TIMEOUT) -+ sock.connect(server.address) -+ sslsock = context.wrap_socket(sock, server_hostname='localhost') -+ with sslsock: -+ sslsock.sendall(b'client\n') -+ # test the _ssl._SSLSocket object, not ssl.SSLSocket -+ sslobj = sslsock._sslobj -+ -+ data = sslobj.read(1024) -+ self.assertEqual(data, b'server\n') -+ -+ # The second read gets EOF error and sets got_eof_error to 1 -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.read(1024) -+ -+ # Following read(), sendfile(), write() and do_handshake() calls -+ # must raise SSLEOFError -+ with self.assertRaises(ssl.SSLEOFError): -+ # The _SSLSocket remembers the previous EOF error -+ # and raises again SSLEOFError -+ sslobj.read(1024) -+ if hasattr(sslobj, 'sendfile'): -+ with open(__file__, "rb") as fp: -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.sendfile(fp.fileno(), 0, 1) -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.write(b'client2\n') -+ with self.assertRaises(ssl.SSLEOFError): -+ sslsock.do_handshake() -+ -+ self.assertEqual(sslsock.pending(), 0) -+ try: -+ sslsock.shutdown(socket.SHUT_WR) -+ except OSError as exc: -+ self.assertEqual(exc.errno, errno.ENOTCONN) -+ else: -+ # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -+ # raise an error -+ pass -+ - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, - "Test needs TLS 1.3 PHA") -diff --git a/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -new file mode 100644 -index 000000000000000..e1f308df5a678e6 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -@@ -0,0 +1,7 @@ -+:mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` for -+OpenSSL 4. The classes now remember if they get a :exc:`ssl.SSLEOFError`. In this -+case, following :meth:`~ssl.SSLSocket.read`, :meth:`!sendfile`, -+:meth:`~ssl.SSLSocket.write`, and :meth:`~ssl.SSLSocket.do_handshake` calls -+raise :exc:`ssl.SSLEOFError` without calling the underlying OpenSSL function. -+Thanks to that, :class:`ssl.SSLSocket` behaves the same on all OpenSSL versions -+on EOF. Patch by Victor Stinner. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index 1603d0ffd559559..376df32b7cb4bd6 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -352,6 +352,16 @@ typedef struct { - * and shutdown methods check for chained exceptions. - */ - PyObject *exc; -+ // gh-148292: If non-zero, read(), sendfile(), write() and do_handshake() -+ // methods raise SSLEOFError without calling the underlying OpenSSL -+ // function. Set to 1 on PY_SSL_ERROR_EOF error. -+ // -+ // On OpenSSL 4, if SSL_read_ex() fails with -+ // SSL_R_UNEXPECTED_EOF_WHILE_READING, the following SSL_read_ex() call -+ // fails with a generic protocol error (ERR_peek_last_error() returns 0). -+ // Use got_eof_error to have the same behavior on OpenSSL 4 and newer and -+ // on OpenSSL 3 and older. -+ int got_eof_error; - } PySSLSocket; - - #define PySSLSocket_CAST(op) ((PySSLSocket *)(op)) -@@ -499,6 +509,10 @@ fill_and_set_sslerror(_sslmodulestate *state, - PyObject *init_value, *msg, *key; - PyUnicodeWriter *writer = NULL; - -+ if (ssl_errno == PY_SSL_ERROR_EOF && sslsock != NULL) { -+ sslsock->got_eof_error = 1; -+ } -+ - if (errcode != 0) { - int lib, reason; - -@@ -654,6 +668,18 @@ PySSL_ChainExceptions(PySSLSocket *sslsock) { - return -1; - } - -+ -+static void -+set_eof_error(PySSLSocket *sslsock) -+{ -+ _sslmodulestate *state = get_state_sock(sslsock); -+ fill_and_set_sslerror(state, sslsock, state->PySSLEOFErrorObject, -+ PY_SSL_ERROR_EOF, -+ "EOF occurred in violation of protocol", -+ __LINE__, 0); -+} -+ -+ - static PyObject * - PySSL_SetError(PySSLSocket *sslsock, const char *filename, int lineno) - { -@@ -901,6 +927,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, - self->server_hostname = NULL; - self->err = err; - self->exc = NULL; -+ self->got_eof_error = 0; - - /* Make sure the SSL error state is initialized */ - ERR_clear_error(); -@@ -1043,6 +1070,11 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2514,6 +2546,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2654,6 +2691,11 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len, - Py_INCREF(sock); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - if (!group_right_1) { - dest = PyBytes_FromStringAndSize(NULL, len); - if (dest == NULL) diff --git a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch b/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch deleted file mode 100644 index 59742290e8b..00000000000 --- a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 81911909bc439d6de8ce6a173b0691b3c58e9e1a Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 16:20:25 +0200 -Subject: [PATCH] gh-148292: Remove shutdown() test in test_ssl.test_got_eof() - (#149366) - -The shutdown() behavior depends too much on the operating system and -it's unrelated to the got_eof_error change. - -(cherry picked from commit 1e21cf6fee3830012e458c0fe5dbc6fcd45ace92) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/81911909bc43] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 03d9e3f9e5e96b5..6445f122b4272be 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -5152,14 +5152,6 @@ class ThreadedTests(unittest.TestCase): - sslsock.do_handshake() - - self.assertEqual(sslsock.pending(), 0) -- try: -- sslsock.shutdown(socket.SHUT_WR) -- except OSError as exc: -- self.assertEqual(exc.errno, errno.ENOTCONN) -- else: -- # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -- # raise an error -- pass - - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch index 7167d5b4e82..83ed34d9863 100644 --- a/meta/recipes-devtools/python/python3/makerace.patch +++ b/meta/recipes-devtools/python/python3/makerace.patch @@ -1,4 +1,4 @@ -From b41557f570ff4451c477669d6ca5bfacabe21c66 Mon Sep 17 00:00:00 2001 +From be6588c8090edae5379f14dd76f146d383b25e50 Mon Sep 17 00:00:00 2001 From: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue, 13 Jul 2021 23:19:29 +0100 Subject: [PATCH] python3: Fix make race @@ -17,10 +17,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index a7e536d..e946018 100644 +index 24ca285..a1d59e4 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2750,7 +2750,7 @@ COMPILEALL_OPTS=-j0 +@@ -2844,7 +2844,7 @@ COMPILEALL_OPTS=-j0 TEST_MODULES=@TEST_MODULES@ .PHONY: libinstall diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json index 008d41e5654..2605beb2ccc 100644 --- a/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/meta/recipes-devtools/python/python3/python3-manifest.json @@ -117,7 +117,7 @@ "${libdir}/python${PYTHON_MAJMIN}/asyncio", "${libdir}/python${PYTHON_MAJMIN}/concurrent", "${libdir}/python${PYTHON_MAJMIN}/concurrent/futures", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_asyncio.*.so" + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_remote_debugging.*.so" ], "cached": [] }, @@ -129,9 +129,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/wave.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc" - ] + "cached": [] }, "codecs": { "summary": "Python codec", @@ -153,11 +151,7 @@ "${libdir}/python${PYTHON_MAJMIN}/filecmp.py", "${libdir}/python${PYTHON_MAJMIN}/py_compile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/compileall.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/filecmp.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/py_compile.*.pyc" - ] + "cached": [] }, "compression": { "summary": "Python high-level compression support", @@ -165,20 +159,16 @@ "core" ], "files": [ + "${libdir}/python${PYTHON_MAJMIN}/compression/", "${libdir}/python${PYTHON_MAJMIN}/gzip.py", "${libdir}/python${PYTHON_MAJMIN}/tarfile.py", - "${libdir}/python${PYTHON_MAJMIN}/zipfile/", - "${libdir}/python${PYTHON_MAJMIN}/compression/", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so" + "${libdir}/python${PYTHON_MAJMIN}/zipfile/" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gzip.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc" - ] + "cached": [] }, "core": { "summary": "Python interpreter and core modules", - "rdepends": ["compression"], + "rdepends": [], "files": [ "${bindir}/python${PYTHON_MAJMIN}", "${bindir}/python${PYTHON_MAJMIN}.real", @@ -195,6 +185,7 @@ "${libdir}/python${PYTHON_MAJMIN}/_colorize.py", "${libdir}/python${PYTHON_MAJMIN}/_compression.py", "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py", + "${libdir}/python${PYTHON_MAJMIN}/_missing_stdlib_info.py", "${libdir}/python${PYTHON_MAJMIN}/_opcode_metadata.py", "${libdir}/python${PYTHON_MAJMIN}/_py_warnings.py", "${libdir}/python${PYTHON_MAJMIN}/_pyrepl", @@ -213,6 +204,11 @@ "${libdir}/python${PYTHON_MAJMIN}/codeop.py", "${libdir}/python${PYTHON_MAJMIN}/collections", "${libdir}/python${PYTHON_MAJMIN}/collections/abc.py", + "${libdir}/python${PYTHON_MAJMIN}/compression", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common/_streams.py", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd/_zstdfile.py", "${libdir}/python${PYTHON_MAJMIN}/configparser.py", "${libdir}/python${PYTHON_MAJMIN}/contextlib.py", "${libdir}/python${PYTHON_MAJMIN}/copy.py", @@ -252,11 +248,14 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_csv.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_heapq.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_interpreters.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_math_integer.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_opcode.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixsubprocess.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_struct.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_typing.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so", @@ -282,6 +281,8 @@ "${libdir}/python${PYTHON_MAJMIN}/pathlib.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_abc.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_local.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/_os.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/types.py", "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py", "${libdir}/python${PYTHON_MAJMIN}/platform.py", "${libdir}/python${PYTHON_MAJMIN}/posixpath.py", @@ -437,18 +438,18 @@ "${libdir}/python${PYTHON_MAJMIN}/hashlib.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hmac.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hashlib.*.pyc" - ] + "cached": [] }, "ctypes": { "summary": "Python C types support", "rdepends": [ + "compression", "core", "io", "math" @@ -480,14 +481,9 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/_strptime.py", "${libdir}/python${PYTHON_MAJMIN}/calendar.py", - "${libdir}/python${PYTHON_MAJMIN}/datetime.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_datetime.*.so" + "${libdir}/python${PYTHON_MAJMIN}/datetime.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_strptime.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/calendar.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/datetime.*.pyc" - ] + "cached": [] }, "db": { "summary": "Python file-based database support", @@ -503,7 +499,15 @@ "debugger": { "summary": "Python debugger", "rdepends": [ + "asyncio", + "compression", "core", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold" @@ -512,10 +516,7 @@ "${libdir}/python${PYTHON_MAJMIN}/bdb.py", "${libdir}/python${PYTHON_MAJMIN}/pdb.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bdb.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pdb.*.pyc" - ] + "cached": [] }, "dev": { "cached": [], @@ -545,16 +546,22 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/difflib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc" - ] + "cached": [] }, "doctest": { "summary": "Python framework for running examples in docstrings", "rdepends": [ + "asyncio", + "compression", "core", "debugger", "difflib", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold", @@ -563,9 +570,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/doctest.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/doctest.*.pyc" - ] + "cached": [] }, "email": { "summary": "Python email support", @@ -582,9 +587,7 @@ "${libdir}/python${PYTHON_MAJMIN}/email", "${libdir}/python${PYTHON_MAJMIN}/imaplib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imaplib.*.pyc" - ] + "cached": [] }, "ensurepip": { "summary": "Support for bootstrapping the pip installer", @@ -601,9 +604,7 @@ "rdepends": [ "core" ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so" - ], + "files": [], "cached": [] }, "gdbm": { @@ -645,13 +646,12 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/colorsys.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/colorsys.*.pyc" - ] + "cached": [] }, "io": { "summary": "Python low-level I/O", "rdepends": [ + "compression", "core", "math", "netclient" @@ -665,12 +665,7 @@ "${libdir}/python${PYTHON_MAJMIN}/ssl.py", "${libdir}/python${PYTHON_MAJMIN}/tempfile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pyio.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socket.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ssl.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tempfile.*.pyc" - ] + "cached": [] }, "json": { "summary": "Python JSON support", @@ -713,9 +708,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/mailbox.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mailbox.*.pyc" - ] + "cached": [] }, "math": { "summary": "Python math support", @@ -727,9 +720,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/cmath.*.so", "${libdir}/python${PYTHON_MAJMIN}/random.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/random.*.pyc" - ] + "cached": [] }, "mime": { "summary": "Python MIME handling APIs", @@ -739,9 +730,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/quopri.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/quopri.*.pyc" - ] + "cached": [] }, "mmap": { "summary": "Python memory-mapped file support", @@ -816,10 +805,12 @@ "multiprocessing": { "summary": "Python multiprocessing support", "rdepends": [ + "compression", "core", "crypt", "ctypes", "io", + "json", "math", "mmap", "netclient", @@ -859,16 +850,7 @@ "${libdir}/python${PYTHON_MAJMIN}/urllib", "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/base64.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ftplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hmac.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc" - ] + "cached": [] }, "netserver": { "summary": "Python Internet Protocol servers", @@ -879,9 +861,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/socketserver.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socketserver.*.pyc" - ] + "cached": [] }, "numbers": { "summary": "Python number APIs", @@ -893,17 +873,10 @@ "${libdir}/python${PYTHON_MAJMIN}/contextvars.py", "${libdir}/python${PYTHON_MAJMIN}/decimal.py", "${libdir}/python${PYTHON_MAJMIN}/fractions.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_contextvars.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_decimal.*.so", "${libdir}/python${PYTHON_MAJMIN}/numbers.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pydecimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/contextvars.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/decimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fractions.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/numbers.*.pyc" - ] + "cached": [] }, "pickle": { "summary": "Python serialisation/persistence support", @@ -917,12 +890,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pickletools.py", "${libdir}/python${PYTHON_MAJMIN}/shelve.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compat_pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickletools.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shelve.*.pyc" - ] + "cached": [] }, "pkgutil": { "summary": "Python package extension utility support", @@ -942,9 +910,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/plistlib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/plistlib.*.pyc" - ] + "cached": [] }, "pprint": { "summary": "Python pretty-print support", @@ -954,9 +920,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/pprint.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pprint.*.pyc" - ] + "cached": [] }, "profile": { "summary": "Python basic performance profiling support", @@ -967,13 +931,11 @@ "${libdir}/python${PYTHON_MAJMIN}/cProfile.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lsprof.*.so", "${libdir}/python${PYTHON_MAJMIN}/profile.py", + "${libdir}/python${PYTHON_MAJMIN}/profiling", + "${libdir}/python${PYTHON_MAJMIN}/profiling/tracing", "${libdir}/python${PYTHON_MAJMIN}/pstats.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cProfile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/profile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc" - ] + "cached": [] }, "pydoc": { "summary": "Python interactive help support", @@ -985,9 +947,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pydoc.py", "${libdir}/python${PYTHON_MAJMIN}/pydoc_data" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc" - ] + "cached": [] }, "resource": { "summary": "Python resource control interface", @@ -1002,17 +962,13 @@ "shell": { "summary": "Python shell-like functionality", "rdepends": [ - "core", - "stringold" + "core" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/cmd.py", "${libdir}/python${PYTHON_MAJMIN}/shlex.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc" - ] + "cached": [] }, "sqlite3": { "summary": "Python Sqlite3 database support", @@ -1037,9 +993,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_statistics.*.so", "${libdir}/python${PYTHON_MAJMIN}/statistics.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/statistics.*.pyc" - ] + "cached": [] }, "stringold": { "summary": "Common string operations", @@ -1072,10 +1026,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pty.py", "${libdir}/python${PYTHON_MAJMIN}/tty.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pty.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tty.*.pyc" - ] + "cached": [] }, "threading": { "summary": "Python threading & synchronization support", @@ -1087,10 +1038,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_queue.*.so", "${libdir}/python${PYTHON_MAJMIN}/queue.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_threading_local.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/queue.*.pyc" - ] + "cached": [] }, "tkinter": { "summary": "Python Tcl/Tk bindings", @@ -1141,15 +1089,15 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/getpass.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc" - ] + "cached": [] }, "venv": { "summary": "Provides support for creating lightweight virtual environments with their own site directories, optionally isolated from system site directories.", "rdepends": [ + "compression", "core", "logging", + "shell", "stringold" ], "files": [ @@ -1200,11 +1148,10 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/zipapp.py" + "${libdir}/python${PYTHON_MAJMIN}/zipapp.py", + "${libdir}/python${PYTHON_MAJMIN}/zipfile" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipapp.*.pyc" - ] + "cached": [] }, "zoneinfo": { "summary": "IANA time zone support", diff --git a/meta/recipes-devtools/python/python3/valid-dists.patch b/meta/recipes-devtools/python/python3/valid-dists.patch deleted file mode 100644 index 7fe18254e50..00000000000 --- a/meta/recipes-devtools/python/python3/valid-dists.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 66874ce1a9f21b4b00dc85919734d58e6243ca29 Mon Sep 17 00:00:00 2001 -From: "Jason R. Coombs" <jaraco@jaraco.com> -Date: Tue, 23 Jul 2024 08:36:16 -0400 -Subject: [PATCH] Prioritize valid dists to invalid dists when retrieving by - name. - -Closes python/importlib_metadata#489 - -Upstream-Status: Backport [https://github.com/python/importlib_metadata/commit/a65c29adc027b3615154cab73aaedd58a6aa23da] -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - Lib/importlib/metadata/__init__.py | 14 +++- - Lib/importlib/metadata/_itertools.py | 98 ++++++++++++++++++++++++++++ - 2 files changed, 110 insertions(+), 2 deletions(-) - -diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 8ce62dd..085378c 100644 ---- a/Lib/importlib/metadata/__init__.py -+++ b/Lib/importlib/metadata/__init__.py -@@ -21,7 +21,7 @@ import collections - from . import _meta - from ._collections import FreezableDefaultDict, Pair - from ._functools import method_cache, pass_none --from ._itertools import always_iterable, unique_everseen -+from ._itertools import always_iterable, bucket, unique_everseen - from ._meta import PackageMetadata, SimplePath - - from contextlib import suppress -@@ -404,7 +404,7 @@ class Distribution(DeprecatedNonAbstract): - if not name: - raise ValueError("A distribution name is required.") - try: -- return next(iter(cls.discover(name=name))) -+ return next(iter(cls._prefer_valid(cls.discover(name=name)))) - except StopIteration: - raise PackageNotFoundError(name) - -@@ -428,6 +428,16 @@ class Distribution(DeprecatedNonAbstract): - resolver(context) for resolver in cls._discover_resolvers() - ) - -+ @staticmethod -+ def _prefer_valid(dists: Iterable[Distribution]) -> Iterable[Distribution]: -+ """ -+ Prefer (move to the front) distributions that have metadata. -+ -+ Ref python/importlib_resources#489. -+ """ -+ buckets = bucket(dists, lambda dist: bool(dist.metadata)) -+ return itertools.chain(buckets[True], buckets[False]) -+ - @staticmethod - def at(path: str | os.PathLike[str]) -> Distribution: - """Return a Distribution for the indicated metadata path. -diff --git a/Lib/importlib/metadata/_itertools.py b/Lib/importlib/metadata/_itertools.py -index d4ca9b9..79d3719 100644 ---- a/Lib/importlib/metadata/_itertools.py -+++ b/Lib/importlib/metadata/_itertools.py -@@ -1,3 +1,4 @@ -+from collections import defaultdict, deque - from itertools import filterfalse - - -@@ -71,3 +72,100 @@ def always_iterable(obj, base_type=(str, bytes)): - return iter(obj) - except TypeError: - return iter((obj,)) -+ -+ -+# Copied from more_itertools 10.3 -+class bucket: -+ """Wrap *iterable* and return an object that buckets the iterable into -+ child iterables based on a *key* function. -+ -+ >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] -+ >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character -+ >>> sorted(list(s)) # Get the keys -+ ['a', 'b', 'c'] -+ >>> a_iterable = s['a'] -+ >>> next(a_iterable) -+ 'a1' -+ >>> next(a_iterable) -+ 'a2' -+ >>> list(s['b']) -+ ['b1', 'b2', 'b3'] -+ -+ The original iterable will be advanced and its items will be cached until -+ they are used by the child iterables. This may require significant storage. -+ -+ By default, attempting to select a bucket to which no items belong will -+ exhaust the iterable and cache all values. -+ If you specify a *validator* function, selected buckets will instead be -+ checked against it. -+ -+ >>> from itertools import count -+ >>> it = count(1, 2) # Infinite sequence of odd numbers -+ >>> key = lambda x: x % 10 # Bucket by last digit -+ >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only -+ >>> s = bucket(it, key=key, validator=validator) -+ >>> 2 in s -+ False -+ >>> list(s[2]) -+ [] -+ -+ """ -+ -+ def __init__(self, iterable, key, validator=None): -+ self._it = iter(iterable) -+ self._key = key -+ self._cache = defaultdict(deque) -+ self._validator = validator or (lambda x: True) -+ -+ def __contains__(self, value): -+ if not self._validator(value): -+ return False -+ -+ try: -+ item = next(self[value]) -+ except StopIteration: -+ return False -+ else: -+ self._cache[value].appendleft(item) -+ -+ return True -+ -+ def _get_values(self, value): -+ """ -+ Helper to yield items from the parent iterator that match *value*. -+ Items that don't match are stored in the local cache as they -+ are encountered. -+ """ -+ while True: -+ # If we've cached some items that match the target value, emit -+ # the first one and evict it from the cache. -+ if self._cache[value]: -+ yield self._cache[value].popleft() -+ # Otherwise we need to advance the parent iterator to search for -+ # a matching item, caching the rest. -+ else: -+ while True: -+ try: -+ item = next(self._it) -+ except StopIteration: -+ return -+ item_value = self._key(item) -+ if item_value == value: -+ yield item -+ break -+ elif self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ def __iter__(self): -+ for item in self._it: -+ item_value = self._key(item) -+ if self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ yield from self._cache.keys() -+ -+ def __getitem__(self, value): -+ if not self._validator(value): -+ return iter(()) -+ -+ return self._get_values(value) diff --git a/meta/recipes-devtools/python/python3_3.14.10.bb b/meta/recipes-devtools/python/python3_3.15.2.bb similarity index 98% rename from meta/recipes-devtools/python/python3_3.14.10.bb rename to meta/recipes-devtools/python/python3_3.15.2.bb index b062b4e7c50..0ead68b7497 100644 --- a/meta/recipes-devtools/python/python3_3.14.10.bb +++ b/meta/recipes-devtools/python/python3_3.15.2.bb @@ -18,19 +18,17 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://makerace.patch \ file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \ file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \ - file://valid-dists.patch \ file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \ file://0001-prefer-valid-entrypoints.patch \ - file://0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch \ - file://0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch \ - file://0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch \ + file://0001-configure-clear-RUNSHARED-when-cross-compiling.patch \ + file://0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch \ " SRC_URI:append:class-native = " \ file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ " -SRC_URI[sha256sum] = "de414a57119abef52784d8993e341d53aed635fc2b05c2607d9f98a2c5b72032" +SRC_URI[sha256sum] = "8b5536d280142ecf6cdfe15d12a21ba1c65e300bbf7b28a8d0cdb849575797de" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" @@ -41,7 +39,7 @@ inherit upstream-stable-release-point CVE_PRODUCT = "python:python python_software_foundation:python cpython" -PYTHON_MAJMIN = "3.14" +PYTHON_MAJMIN = "3.15" S = "${UNPACKDIR}/Python-${PV}" @@ -75,7 +73,7 @@ DEPENDS = "\ DEPENDS:append:class-target = " python3-native" DEPENDS:append:class-nativesdk = " python3-native" -EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat" +EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat --without-system-libmpdec" EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3 PLATFORM_TRIPLET=${HOST_ARCH}-${HOST_OS}" EXTRA_OECONF:append:class-nativesdk = " --with-build-python=nativepython3" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v5 0/3] python3: Upgrade to 3.15.2 2026-10-12 9:00 ` [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 Jaipaul Cheernam ` (2 preceding siblings ...) 2026-11-02 7:01 ` [PATCH v4 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam @ 2026-11-02 8:08 ` Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 1/3] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam ` (2 more replies) 2026-11-04 15:28 ` [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 0/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 5 siblings, 3 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-02 8:08 UTC (permalink / raw) To: openembedded-core python3-maturin: Add support for python 3.15.2 can be dropped if https://lists.openembedded.org/g/openembedded-core/message/249174 merged before this series python3-maturin 1.16.0 contains Update-maximum-Python-PyPy-version changes Jaipaul Cheernam (3): python3-maturin: Add support for python 3.15.2 python3-dbus: Upgrade 1.4.0 -> 1.5.1 python3: Upgrade 3.14.10 -> 3.15.2 meta/classes-recipe/python3-dir.bbclass | 2 +- ...n3-dbus_1.4.0.bb => python3-dbus_1.5.1.bb} | 16 +- ...1-Update-maximum-Python-PyPy-version.patch | 99 +++++++ .../python/python3-maturin_1.15.0.bb | 4 +- ...shebang-overflow-on-python-config.py.patch | 6 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 6 +- ...-qemu-wrapper-when-gathering-profile.patch | 6 +- ...est_sysconfig-for-posix_user-purelib.patch | 6 +- ...clear-RUNSHARED-when-cross-compiling.patch | 46 ++++ ...146207-Add-support-for-OpenSSL-4.0.0.patch | 254 ------------------ ...st_is_python_process_non_python_subp.patch | 50 ++++ .../0001-prefer-valid-entrypoints.patch | 6 +- ...g.py-use-platlibdir-also-for-purelib.patch | 4 +- ...le.py-correct-the-test-output-format.patch | 6 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 6 +- .../python/python3/python3-manifest.json | 199 +++++--------- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.10.bb => python3_3.15.2.bb} | 12 +- 21 files changed, 311 insertions(+), 858 deletions(-) rename meta/recipes-devtools/python/{python3-dbus_1.4.0.bb => python3-dbus_1.5.1.bb} (50%) create mode 100644 meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch create mode 100644 meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch create mode 100644 meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.10.bb => python3_3.15.2.bb} (98%) ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v5 1/3] python3-maturin: Add support for python 3.15.2 2026-11-02 8:08 ` [PATCH v5 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam @ 2026-11-02 8:08 ` Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 3/3] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-02 8:08 UTC (permalink / raw) To: openembedded-core Backport the upstream fix which raises the maximum Python version to 3.15 and PyPy to 3.12 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...1-Update-maximum-Python-PyPy-version.patch | 99 +++++++++++++++++++ .../python/python3-maturin_1.15.0.bb | 4 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch diff --git a/meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch b/meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch new file mode 100644 index 00000000000..1c78bced287 --- /dev/null +++ b/meta/recipes-devtools/python/python3-maturin/0001-Update-maximum-Python-PyPy-version.patch @@ -0,0 +1,99 @@ +From 713a7088e1ca9f1fe71efd670826d6b77470c24d Mon Sep 17 00:00:00 2001 +From: messense <messense@icloud.com> +Date: Thu, 29 Oct 2026 21:46:23 +0800 +Subject: [PATCH] Update maximum Python & PyPy version + +Upstream-Status: Backport [https://github.com/PyO3/maturin/commit/3bec0a32ae2b67ad4fac0194f762f44141e51473] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + src/python_interpreter/discovery.rs | 12 ++++++++++++ + src/python_interpreter/mod.rs | 4 ++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/python_interpreter/discovery.rs b/src/python_interpreter/discovery.rs +index e4bcb73..47548aa 100644 +--- a/src/python_interpreter/discovery.rs ++++ b/src/python_interpreter/discovery.rs +@@ -708,10 +708,12 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "PyPy 3.8", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -740,10 +742,13 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "CPython 3.14t", ++ "CPython 3.15t", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -765,10 +770,12 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "PyPy 3.8", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -788,8 +795,10 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +@@ -817,10 +826,13 @@ mod tests { + "CPython 3.12", + "CPython 3.13", + "CPython 3.14", ++ "CPython 3.15", + "CPython 3.14t", ++ "CPython 3.15t", + "PyPy 3.9", + "PyPy 3.10", + "PyPy 3.11", ++ "PyPy 3.12", + ] + "#]]; + expected.assert_debug_eq(&pythons); +diff --git a/src/python_interpreter/mod.rs b/src/python_interpreter/mod.rs +index dca016f..9dcdaf8 100644 +--- a/src/python_interpreter/mod.rs ++++ b/src/python_interpreter/mod.rs +@@ -23,11 +23,11 @@ pub const MINIMUM_PYTHON_MINOR: usize = 7; + /// Minimum supported PyPy minor version. + pub const MINIMUM_PYPY_MINOR: usize = 8; + /// Be liberal here to include preview versions +-pub const MAXIMUM_PYTHON_MINOR: usize = 14; ++pub const MAXIMUM_PYTHON_MINOR: usize = 15; + /// Minimum supported version for free-threaded CPython + pub const FREE_THREADED_MINIMUM_PYTHON_MINOR: usize = 14; + /// Maximum supported PyPy minor version. +-pub const MAXIMUM_PYPY_MINOR: usize = 11; ++pub const MAXIMUM_PYPY_MINOR: usize = 12; + + /// The kind of Python interpreter (CPython, PyPy, or GraalPy). + #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, serde::Deserialize, clap::ValueEnum)] diff --git a/meta/recipes-devtools/python/python3-maturin_1.15.0.bb b/meta/recipes-devtools/python/python3-maturin_1.15.0.bb index a29e29bda9e..e8c0b6a6ad1 100644 --- a/meta/recipes-devtools/python/python3-maturin_1.15.0.bb +++ b/meta/recipes-devtools/python/python3-maturin_1.15.0.bb @@ -5,7 +5,9 @@ LICENSE = "Apache-2.0 OR MIT" LIC_FILES_CHKSUM = "file://license-apache;md5=1836efb2eb779966696f473ee8540542 \ file://license-mit;md5=85fd3b67069cff784d98ebfc7d5c0797" -SRC_URI += "file://0001-Cargo.lock-Update-rustix-to-1.1.5.patch" +SRC_URI += "file://0001-Cargo.lock-Update-rustix-to-1.1.5.patch \ + file://0001-Update-maximum-Python-PyPy-version.patch \ + " SRC_URI[sha256sum] = "94b26cc8e8aba61a5f2099715fe640e18c5f678e9a500408b38761263954228a" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v5 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 2026-11-02 8:08 ` [PATCH v5 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 1/3] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam @ 2026-11-02 8:08 ` Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 3/3] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-02 8:08 UTC (permalink / raw) To: openembedded-core NEWS: https://gitlab.freedesktop.org/dbus/dbus-python/-/raw/dbus-python-1.5.1/NEWS few notable changes: - The sdist is now called dbus_python and ships as a .tar.gz (PEP-625), so SRC_URI and S need updating. - Autotools is gone, but we already build with meson. -Dtests=false is now deprecated, so switch to -Dtests=disabled. - The tree is REUSE-compliant now, so LICENSE grows to cover the bundled dbus-gmain bits (AFL-2.1 or GPL-2.0-or-later) next to dbus-python's own MIT, with LIC_FILES_CHKSUM pointing at the individual license files. Full NEWS: dbus Python Bindings 1.5.1 (2026-10-23) ======================================= Fixes: * Fix a memory leak when freeing UnixFd objects (dbus-python#62, Nieves Montero Fernandez) * Avoid libdbus assertion failures in some configurations if attempting to write an invalid item into a variant, for example a non-UTF-8 bytestring (dbus-python#60, Nieves Montero Fernandez) * Be more consistent about how containers are closed, to avoid mistakes similar to dbus-python#60 (Simon McVittie) dbus Python Bindings 1.5.0 (2026-09-27) ======================================= Dependencies: * The Meson build system is required. Installation via `pip` and similar PEP-0517 build system frontends requires meson-python (mesonpy) and its dependencies. * Python 3.7 or later is required. * Python 3.9 or later is strongly recommended. Older versions are no longer tested or supported. Build system changes: * The source release is now built as a sdist using mesonpy, with a name that includes dbus_python, not dbus-python, matching the project's name on PyPI and PEP-0625 * The Autotools build system is no longer available Enhancements: * Add a `test_socket_dir` build-time option for systems where /tmp is not available (dbus-python!38, Emily) * Documentation and "as-installed" tests (if enabled) are associated with `meson install --tags=doc` and `--tags=tests` respectively (Simon McVittie) Fixes: * Revert a broken implementation of weak references that caused crashes, especially in Python 3.15 (regression in 1.4.0; dbus-python#59, Simon McVittie) * Avoid repeated configuration reloads during unit testing when dbus was compiled with kqueue (dbus-python#56, Jakub Kulík) * Add some unit tests for weak references and object destruction (dbus-python#59, Maximiliano Curia) * Metadata updates (Simon McVittie) * CI updates (Simon McVittie) Licensing: * REUSE metadata is now in TOML format * After the removal of the Autotools build system, all remaining files outside subprojects/ are believed to be MIT-licensed. The GLib main loop integration in subprojects/dbus-gmain/ continues to be under the same "AFL-2.1 OR GPL-2.0-or-later" dual-license as libdbus. License-Update: Add AFL-2.1 OR GPL-2.0-or-later licenses Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...thon3-dbus_1.4.0.bb => python3-dbus_1.5.1.bb} | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) rename meta/recipes-devtools/python/{python3-dbus_1.4.0.bb => python3-dbus_1.5.1.bb} (50%) diff --git a/meta/recipes-devtools/python/python3-dbus_1.4.0.bb b/meta/recipes-devtools/python/python3-dbus_1.5.1.bb similarity index 50% rename from meta/recipes-devtools/python/python3-dbus_1.4.0.bb rename to meta/recipes-devtools/python/python3-dbus_1.5.1.bb index 2854eda30a0..4126c4639a0 100644 --- a/meta/recipes-devtools/python/python3-dbus_1.4.0.bb +++ b/meta/recipes-devtools/python/python3-dbus_1.5.1.bb @@ -1,20 +1,24 @@ SUMMARY = "Python bindings for the DBus inter-process communication system" SECTION = "devel/python" HOMEPAGE = "http://www.freedesktop.org/Software/dbus" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=97f58951300aa52a9f9e3a62bd5c846c" +LICENSE = "MIT AND (AFL-2.1 OR GPL-2.0-or-later)" +LIC_FILES_CHKSUM = "file://COPYING;md5=97f58951300aa52a9f9e3a62bd5c846c \ + file://LICENSES/MIT.txt;md5=7dda4e90ded66ab88b86f76169f28663 \ + file://subprojects/dbus-gmain/LICENSES/GPL-2.0-or-later.txt;md5=3d26203303a722dedc6bf909d95ba815 \ + file://subprojects/dbus-gmain/LICENSES/AFL-2.1.txt;md5=f3ad2f482ec639b440413665cfb9e714 \ + " DEPENDS = "expat dbus glib-2.0 virtual/libintl" -SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.xz" +SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus_python-${PV}.tar.gz" -SRC_URI[sha256sum] = "c36b28f10ffcc8f1f798aca973bcc132f91f33eb9b6b8904381b4077766043d5" +SRC_URI[sha256sum] = "57423cf87d09b7d084f420b55b737fe654c33339b06df77945620d97795c6ac4" -S = "${UNPACKDIR}/dbus-python-${PV}" +S = "${UNPACKDIR}/dbus_python-${PV}" inherit setuptools3-base meson pkgconfig # requires dbus-run-session -EXTRA_OEMESON += "-Dtests=false" +EXTRA_OEMESON += "-Dtests=disabled" RDEPENDS:${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v5 3/3] python3: Upgrade 3.14.10 -> 3.15.2 2026-11-02 8:08 ` [PATCH v5 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 1/3] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 Jaipaul Cheernam @ 2026-11-02 8:08 ` Jaipaul Cheernam 2026-11-03 14:03 ` [OE-core] " Mathieu Dubois-Briand 2 siblings, 1 reply; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-02 8:08 UTC (permalink / raw) To: openembedded-core ReleaseNotes: https://docs.python.org/3/whatsnew/changelog.html#python-3-15-2-final - Drop patches which are part of upstream release - 0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch - 0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch - 0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch - valid-dists.patch - Add --without-system-libmpdec as EXTRA_OECONF configure option (--with-system-libmpdec is needed new package mpdecimal [1]) - Bump PYTHON_BASEVERSION to 3.15 in python3-dir.bbclass - Update python3-manifest - Refresh existing patches - Add two fixes needed for the new release - 0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch - 0001-configure-clear-RUNSHARED-when-cross-compiling.patch Verification: - Built python3 for glibc and musl - verified ptest for all 34 python3 packages which supports ptest [1] https://github.com/python/cpython/issues/115119 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- Changes since v4: - Add license tag for python3-dbus upgrade Changes since v3: - Upgrade python3-dbus which is causing failure for glib-2.0 Changes since v2: - Drop mpdecimal new package and add --without-system-libmpdec - Add patch for maturin failure - verified ptest on all 34 python3 packages - Verified with glibc and musl as well Changes since v1: - Update python3-manifest meta/classes-recipe/python3-dir.bbclass | 2 +- ...shebang-overflow-on-python-config.py.patch | 6 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 6 +- ...-qemu-wrapper-when-gathering-profile.patch | 6 +- ...est_sysconfig-for-posix_user-purelib.patch | 6 +- ...clear-RUNSHARED-when-cross-compiling.patch | 46 ++++ ...146207-Add-support-for-OpenSSL-4.0.0.patch | 254 ------------------ ...st_is_python_process_non_python_subp.patch | 50 ++++ .../0001-prefer-valid-entrypoints.patch | 6 +- ...g.py-use-platlibdir-also-for-purelib.patch | 4 +- ...le.py-correct-the-test-output-format.patch | 6 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 6 +- .../python/python3/python3-manifest.json | 199 +++++--------- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.10.bb => python3_3.15.2.bb} | 12 +- 18 files changed, 199 insertions(+), 851 deletions(-) create mode 100644 meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch create mode 100644 meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.10.bb => python3_3.15.2.bb} (98%) diff --git a/meta/classes-recipe/python3-dir.bbclass b/meta/classes-recipe/python3-dir.bbclass index 3eb0dea9b2e..b26621f3652 100644 --- a/meta/classes-recipe/python3-dir.bbclass +++ b/meta/classes-recipe/python3-dir.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -PYTHON_BASEVERSION = "3.14" +PYTHON_BASEVERSION = "3.15" PYTHON_ABI = "" PYTHON_DIR = "python${PYTHON_BASEVERSION}" PYTHON_PN = "python3" diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 79fee9803fe..f5acfb789c0 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch @@ -1,4 +1,4 @@ -From 3f2df0e1fce8c7425998dade00d084f1b101a982 Mon Sep 17 00:00:00 2001 +From c7712b4345e16786ee237427537b83787022c733 Mon Sep 17 00:00:00 2001 From: Paulo Neves <ptsneves@gmail.com> Date: Tue, 7 Jun 2022 16:16:41 +0200 Subject: [PATCH] Avoid shebang overflow on python-config.py @@ -16,10 +16,10 @@ Upstream-Status: Denied [distribution] 1 file changed, 2 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in -index e946018..345ed29 100644 +index a1d59e4..26a90e6 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2844,6 +2844,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh +@@ -2938,6 +2938,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh @ # Substitution happens here, as the completely-expanded BINDIR @ # is not available in configure sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py diff --git a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch index 532adfe69a9..322de292ce4 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch @@ -1,4 +1,4 @@ -From 9cd44429215352eb2753e0fd8e25fef24f714006 Mon Sep 17 00:00:00 2001 +From 1e6d7f34c558ed05f7d35f4a2b86f079318fb6be Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Thu, 16 Sep 2021 16:35:37 +0200 Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch index 580d38a4031..ce2efd431c5 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch @@ -1,4 +1,4 @@ -From b5aad6a9b6c5add7a85861aed8aa030c1ad3d52f Mon Sep 17 00:00:00 2001 +From 7338a6821cdc4e7cab17ca255e484bf19b4b3670 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Fri, 17 Nov 2023 14:26:32 +0100 Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration @@ -18,10 +18,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 0a8bcc0..a2341f2 100644 +index 924401c..0ff84f7 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py -@@ -539,12 +539,12 @@ def _init_config_vars(): +@@ -537,12 +537,12 @@ def _init_config_vars(): _CONFIG_VARS['py_version'] = _PY_VERSION _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT _CONFIG_VARS['py_version_nodot'] = _PY_VERSION_SHORT_NO_DOT diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch index d3f46c372a6..dd5a87cd541 100644 --- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch +++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch @@ -1,4 +1,4 @@ -From d6f77e3a934616d1f6c083b7144c50a32e08b70a Mon Sep 17 00:00:00 2001 +From 61b446b8554b91b93f8ae40c654abf9d8a77145d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 30 Jan 2019 12:41:04 +0100 Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data @@ -15,10 +15,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 526d500..a7e536d 100644 +index 95fefcc..24ca285 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -864,8 +864,7 @@ profile-run-stamp: +@@ -879,8 +879,7 @@ profile-run-stamp: # enabled. $(MAKE) profile-gen-stamp # Next, run the profile task to generate the profile information. diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch index 0864f23926a..6cc7ae187e6 100644 --- a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch @@ -1,4 +1,4 @@ -From c608cb4b3c8c31f1aa25ad1264ff58733fb99769 Mon Sep 17 00:00:00 2001 +From f1e23d641d6edb5bb82cd24272b7b1f8c42c64dd Mon Sep 17 00:00:00 2001 From: Wentao Zhang <wentao.zhang@windriver.com> Date: Mon, 20 Mar 2023 13:39:52 +0800 Subject: [PATCH] Update test_sysconfig for posix_user purelib @@ -22,10 +22,10 @@ Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py -index 1fe4b68..383142a 100644 +index ce3a3c6..4eb65fb 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py -@@ -435,7 +435,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): +@@ -432,7 +432,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): expected = os.path.normpath(global_path.replace(base, user, 1)) # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, # whereas posix_prefix does. diff --git a/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch new file mode 100644 index 00000000000..f5f09e81ee9 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +Date: Tue, 27 Oct 2026 10:00:00 +0000 +Subject: [PATCH] configure: clear RUNSHARED when cross compiling + +Since 3.15 the checksharedmods target runs the host build python with the +target LD_LIBRARY_PATH, which breaks musl cross builds (host cannot load +libc.so). Clear RUNSHARED for cross builds as before. + +Upstream-Status: Submitted [https://github.com/python/cpython/issues/160924] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + configure | 4 ++++ + configure.ac | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/configure b/configure +index 6f7ff1b..9702135 100755 +--- a/configure ++++ b/configure +@@ -7867,6 +7867,10 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 + printf "%s\n" "$LDLIBRARY" >&6; } + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOSTRUNNER" >&5 + printf %s "checking HOSTRUNNER... " >&6; } +diff --git a/configure.ac b/configure.ac +index 9923805..9e86057 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1670,6 +1670,10 @@ else # shared is disabled + fi + AC_MSG_RESULT([$LDLIBRARY]) + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + AC_MSG_CHECKING([HOSTRUNNER]) + if test -z "$HOSTRUNNER" diff --git a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch b/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch deleted file mode 100644 index 37f55de65c2..00000000000 --- a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch +++ /dev/null @@ -1,254 +0,0 @@ -From 3364e7e62fa24d0e19133fb0f90b1c24ef1110c5 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Wed, 25 Mar 2026 07:44:47 +0100 -Subject: [PATCH] gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217) - -OpenSSL 4.0.0 alpha1 removed these functions: - -* SSLv3_method() -* TLSv1_method() -* TLSv1_1_method() -* TLSv1_2_method() - -Other changes: - -* Update test_openssl_version(). -* Update multissltests.py for OpenSSL 4. -* Add const qualifier to fix compiler warnings. - -Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> -Signed-off-by: Victor Stinner <vstinner@python.org> - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3364e7e62fa24d0e19133fb0f90b1c24ef1110c5] -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 52 ++++++++++++++++++++------------------ - Modules/_ssl.c | 27 ++++++++++++++++---- - Modules/_ssl/cert.c | 3 ++- - Tools/ssl/multissltests.py | 7 ++++- - 4 files changed, 58 insertions(+), 31 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index dc795c6bd8a..61355927296 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -439,7 +439,7 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_COMPRESSION - self.assertEqual(ssl.HAS_SNI, True) - self.assertEqual(ssl.HAS_ECDH, True) -- self.assertEqual(ssl.HAS_TLSv1_2, True) -+ self.assertIsInstance(ssl.HAS_TLSv1_2, bool) - self.assertEqual(ssl.HAS_TLSv1_3, True) - ssl.OP_NO_SSLv2 - ssl.OP_NO_SSLv3 -@@ -630,11 +630,11 @@ class BasicSocketTests(unittest.TestCase): - # Some sanity checks follow - # >= 1.1.1 - self.assertGreaterEqual(n, 0x10101000) -- # < 4.0 -- self.assertLess(n, 0x40000000) -+ # < 5.0 -+ self.assertLess(n, 0x50000000) - major, minor, fix, patch, status = t - self.assertGreaterEqual(major, 1) -- self.assertLess(major, 4) -+ self.assertLess(major, 5) - self.assertGreaterEqual(minor, 0) - self.assertLess(minor, 256) - self.assertGreaterEqual(fix, 0) -@@ -700,12 +700,14 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_TLSv1_2, - ssl.OP_NO_TLSv1_3 - ] -- protocols = [ -- ssl.PROTOCOL_TLSv1, -- ssl.PROTOCOL_TLSv1_1, -- ssl.PROTOCOL_TLSv1_2, -- ssl.PROTOCOL_TLS -- ] -+ protocols = [] -+ if hasattr(ssl, 'PROTOCOL_TLSv1'): -+ protocols.append(ssl.PROTOCOL_TLSv1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_1'): -+ protocols.append(ssl.PROTOCOL_TLSv1_1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_2'): -+ protocols.append(ssl.PROTOCOL_TLSv1_2) -+ protocols.append(ssl.PROTOCOL_TLS) - versions = [ - ssl.TLSVersion.SSLv3, - ssl.TLSVersion.TLSv1, -@@ -1199,6 +1201,7 @@ class ContextTests(unittest.TestCase): - ssl.TLSVersion.TLSv1, - ssl.TLSVersion.TLSv1_1, - ssl.TLSVersion.TLSv1_2, -+ ssl.TLSVersion.TLSv1_3, - ssl.TLSVersion.SSLv3, - } - ) -@@ -1212,7 +1215,7 @@ class ContextTests(unittest.TestCase): - with self.assertRaises(ValueError): - ctx.minimum_version = 42 - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_1) - - self.assertIn( -@@ -1764,23 +1767,24 @@ class ContextTests(unittest.TestCase): - self.assertFalse(ctx.check_hostname) - self._assert_context_options(ctx) - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - with warnings_helper.check_warnings(): - ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) - self._assert_context_options(ctx) - -- with warnings_helper.check_warnings(): -- ctx = ssl._create_stdlib_context( -- ssl.PROTOCOL_TLSv1_2, -- cert_reqs=ssl.CERT_REQUIRED, -- check_hostname=True -- ) -- self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -- self.assertTrue(ctx.check_hostname) -- self._assert_context_options(ctx) -+ if has_tls_protocol('PROTOCOL_TLSv1_2'): -+ with warnings_helper.check_warnings(): -+ ctx = ssl._create_stdlib_context( -+ ssl.PROTOCOL_TLSv1_2, -+ cert_reqs=ssl.CERT_REQUIRED, -+ check_hostname=True -+ ) -+ self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -+ self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -+ self.assertTrue(ctx.check_hostname) -+ self._assert_context_options(ctx) - - ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_SERVER) -@@ -3908,10 +3912,10 @@ class ThreadedTests(unittest.TestCase): - client_options=ssl.OP_NO_TLSv1_2) - - try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2') -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False) -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False) - -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index b45295b4c0c..6f75af86113 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -136,6 +136,17 @@ static void _PySSLFixErrno(void) { - #error Unsupported OpenSSL version - #endif - -+#if (OPENSSL_VERSION_NUMBER >= 0x40000000L) -+# define OPENSSL_NO_SSL3 -+# define OPENSSL_NO_TLS1 -+# define OPENSSL_NO_TLS1_1 -+# define OPENSSL_NO_TLS1_2 -+# define OPENSSL_NO_SSL3_METHOD -+# define OPENSSL_NO_TLS1_METHOD -+# define OPENSSL_NO_TLS1_1_METHOD -+# define OPENSSL_NO_TLS1_2_METHOD -+#endif -+ - /* OpenSSL API 1.1.0+ does not include version methods */ - #ifndef OPENSSL_NO_SSL3_METHOD - extern const SSL_METHOD *SSLv3_method(void); -@@ -1137,7 +1148,7 @@ _asn1obj2py(_sslmodulestate *state, const ASN1_OBJECT *name, int no_name) - - static PyObject * - _create_tuple_for_attribute(_sslmodulestate *state, -- ASN1_OBJECT *name, ASN1_STRING *value) -+ const ASN1_OBJECT *name, const ASN1_STRING *value) - { - Py_ssize_t buflen; - PyObject *pyattr; -@@ -1166,16 +1177,16 @@ _create_tuple_for_attribute(_sslmodulestate *state, - } - - static PyObject * --_create_tuple_for_X509_NAME (_sslmodulestate *state, X509_NAME *xname) -+_create_tuple_for_X509_NAME(_sslmodulestate *state, const X509_NAME *xname) - { - PyObject *dn = NULL; /* tuple which represents the "distinguished name" */ - PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */ - PyObject *rdnt; - PyObject *attr = NULL; /* tuple to hold an attribute */ - int entry_count = X509_NAME_entry_count(xname); -- X509_NAME_ENTRY *entry; -- ASN1_OBJECT *name; -- ASN1_STRING *value; -+ const X509_NAME_ENTRY *entry; -+ const ASN1_OBJECT *name; -+ const ASN1_STRING *value; - int index_counter; - int rdn_level = -1; - int retcode; -@@ -6599,9 +6610,15 @@ sslmodule_init_constants(PyObject *m) - ADD_INT_CONST("PROTOCOL_TLS", PY_SSL_VERSION_TLS); - ADD_INT_CONST("PROTOCOL_TLS_CLIENT", PY_SSL_VERSION_TLS_CLIENT); - ADD_INT_CONST("PROTOCOL_TLS_SERVER", PY_SSL_VERSION_TLS_SERVER); -+#ifndef OPENSSL_NO_TLS1 - ADD_INT_CONST("PROTOCOL_TLSv1", PY_SSL_VERSION_TLS1); -+#endif -+#ifndef OPENSSL_NO_TLS1_1 - ADD_INT_CONST("PROTOCOL_TLSv1_1", PY_SSL_VERSION_TLS1_1); -+#endif -+#ifndef OPENSSL_NO_TLS1_2 - ADD_INT_CONST("PROTOCOL_TLSv1_2", PY_SSL_VERSION_TLS1_2); -+#endif - - #define ADD_OPTION(NAME, VALUE) if (sslmodule_add_option(m, NAME, (VALUE)) < 0) return -1 - -diff --git a/Modules/_ssl/cert.c b/Modules/_ssl/cert.c -index f2e7be89668..061b0fb3171 100644 ---- a/Modules/_ssl/cert.c -+++ b/Modules/_ssl/cert.c -@@ -128,7 +128,8 @@ _ssl_Certificate_get_info_impl(PySSLCertificate *self) - } - - static PyObject* --_x509name_print(_sslmodulestate *state, X509_NAME *name, int indent, unsigned long flags) -+_x509name_print(_sslmodulestate *state, const X509_NAME *name, -+ int indent, unsigned long flags) - { - PyObject *res; - BIO *biobuf; -diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py -index 3b4507c6771..48207e5330f 100755 ---- a/Tools/ssl/multissltests.py -+++ b/Tools/ssl/multissltests.py -@@ -422,9 +422,11 @@ class BuildOpenSSL(AbstractBuilder): - def _post_install(self): - if self.version.startswith("3."): - self._post_install_3xx() -+ elif self.version.startswith("4."): -+ self._post_install_4xx() - - def _build_src(self, config_args=()): -- if self.version.startswith("3."): -+ if self.version.startswith(("3.", "4.")): - config_args += ("enable-fips",) - super()._build_src(config_args) - -@@ -440,6 +442,9 @@ class BuildOpenSSL(AbstractBuilder): - lib64 = self.lib_dir + "64" - os.symlink(lib64, self.lib_dir) - -+ def _post_install_4xx(self): -+ self._post_install_3xx() -+ - @property - def short_version(self): - """Short version for OpenSSL download URL""" diff --git a/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch new file mode 100644 index 00000000000..581dad9b2ee --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch @@ -0,0 +1,50 @@ +From 1db73a72041cdbbeb4ddef01595f25129a8138f7 Mon Sep 17 00:00:00 2001 +From: Tom Greenslade <thomgree@cisco.com> +Date: Thu, 29 Oct 2026 14:17:40 +0000 +Subject: [PATCH] gh-160881: Fix test_is_python_process_non_python_subprocess + with multicall sleep + +_wait_for_process_exec() waited for /proc/{pid}/exe to be named "sleep", +which never happens when sleep is a multicall binary (BusyBox on Alpine, +coreutils-single on RHEL UBI9). Wait instead until the child's executable +differs from the parent's, which means the child has called exec(). + +Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> + +Upstream-Status: Submitted [https://github.com/python/cpython/pull/160901] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + .../test_sampling_profiler/test_children.py | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_children.py b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +index 4b27c6dbb1896c1..9a8d529c4b82444 100644 +--- a/Lib/test/test_profiling/test_sampling_profiler/test_children.py ++++ b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +@@ -85,12 +85,14 @@ def reader(): + return result[0] + + +-def _wait_for_process_exec(proc, name, timeout): ++def _wait_for_process_exec(proc, timeout): + # Wait until a child process calls exec() to replace the forked process +- # executable. Raise AssertionError on timeout. ++ # executable. Don't check the executable name: it can be a multicall ++ # binary such as /bin/busybox. Raise AssertionError on timeout. ++ parent_exe = os.readlink("/proc/self/exe") + for _ in sleeping_retry(timeout, max_delay=0.1): + exe = os.readlink(f"/proc/{proc.pid}/exe") +- if os.path.basename(exe) == name: ++ if exe != parent_exe: + break + + +@@ -625,7 +627,7 @@ def test_is_python_process_non_python_subprocess(self): + ) + + try: +- _wait_for_process_exec(proc, "sleep", SHORT_TIMEOUT) ++ _wait_for_process_exec(proc, SHORT_TIMEOUT) + + self.assertFalse( + is_python_process(proc.pid), diff --git a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch index 525a2ca7000..e5043255928 100644 --- a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch +++ b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch @@ -1,4 +1,4 @@ -From 8d7fcf04c6513841c7985e64b746b1ef5de0c426 Mon Sep 17 00:00:00 2001 +From 57c51c6746c1efdae1654df443c5d23351b2d131 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@arm.com> Date: Fri, 17 Apr 2026 16:53:42 +0100 Subject: [PATCH] prefer valid entrypoints @@ -16,10 +16,10 @@ Signed-off-by: Ross Burton <ross.burton@arm.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 085378c..ff5cae4 100644 +index 32f4b7d..705f245 100644 --- a/Lib/importlib/metadata/__init__.py +++ b/Lib/importlib/metadata/__init__.py -@@ -1016,7 +1016,7 @@ def entry_points(**params) -> EntryPoints: +@@ -1120,7 +1120,7 @@ def entry_points(**params) -> EntryPoints: :return: EntryPoints for all installed packages. """ eps = itertools.chain.from_iterable( diff --git a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch index 7807827d9aa..e24d6b63b16 100644 --- a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch @@ -1,4 +1,4 @@ -From c10d1b295a9fb93836830cce441da3f22e5c7cd7 Mon Sep 17 00:00:00 2001 +From 07c5b43f29e93825e1c0b0fcebf40dc5971d438f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Sun, 12 Sep 2021 21:44:36 +0200 Subject: [PATCH] sysconfig.py: use platlibdir also for purelib @@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index faf8273..0a8bcc0 100644 +index b931551..924401c 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -29,7 +29,7 @@ _INSTALL_SCHEMES = { diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch index a60d082e2f4..12d87168ca5 100644 --- a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch +++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch @@ -1,4 +1,4 @@ -From f0ac5b479b99bfb7f5e937a941b31a596f4caafc Mon Sep 17 00:00:00 2001 +From c8d8b7aaf96faa50d8bf20c59ed31e7c6a8d698c Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Mon, 5 Aug 2019 15:57:39 +0800 Subject: [PATCH] test_locale.py: correct the test output format @@ -31,10 +31,10 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py -index f918435..1910a43 100644 +index a06c600..38b91d0 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py -@@ -499,7 +499,7 @@ class TestRealLocales(unittest.TestCase): +@@ -500,7 +500,7 @@ class TestRealLocales(unittest.TestCase): self.skipTest('test needs Turkish locale') loc = locale.getlocale(locale.LC_CTYPE) if verbose: diff --git a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch b/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch deleted file mode 100644 index 1b9a7fc9422..00000000000 --- a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch +++ /dev/null @@ -1,234 +0,0 @@ -From 3c2a3014af7d73cc34f2498f60fdf863d9bc7c6c Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 13:52:57 +0200 -Subject: [PATCH] gh-148292: Update _ssl._SSLSocket for OpenSSL 4 (#149102) - -The _SSLSocket object now remembers if it gets an EOF error. In this -case, read(), sendfile(), write() and do_handshake method calls fail -with SSLEOFError without calling the underlying OpenSSL function. - -Co-authored-by: Gregory P. Smith <greg@krypto.org> -(cherry picked from commit 7b7fa3f9bf3d7cdf3eb669d02b386e05b39c402a) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3c2a3014af7d] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 82 +++++++++++++++++++ - ...-04-28-17-47-55.gh-issue-148292.oIq3ml.rst | 7 ++ - Modules/_ssl.c | 42 ++++++++++ - 3 files changed, 131 insertions(+) - create mode 100644 Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 965dbc36f096499..03d9e3f9e5e96b5 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -3039,6 +3039,36 @@ class ThreadedEchoServer(threading.Thread): - def stop(self): - self.active = False - -+class TestEOFServer(threading.Thread): -+ def __init__(self): -+ super().__init__() -+ self.listening = threading.Event() -+ self.address = None -+ -+ def run(self): -+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) -+ context.load_cert_chain(CERTFILE) -+ server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ with server_sock: -+ server_sock.settimeout(support.SHORT_TIMEOUT) -+ server_sock.bind((HOST, 0)) -+ server_sock.listen(5) -+ -+ self.address = server_sock.getsockname() -+ self.listening.set() -+ -+ sock, addr = server_sock.accept() -+ sslconn = context.wrap_socket(sock, server_side=True) -+ with sslconn: -+ request = b'' -+ while chunk := sslconn.recv(1024): -+ request += chunk -+ if b'\n' in chunk: -+ break -+ -+ sslconn.sendall(b'server\n') -+ sslconn.shutdown(socket.SHUT_WR) -+ - class AsyncoreEchoServer(threading.Thread): - - # this one's based on asyncore.dispatcher -@@ -5079,6 +5109,58 @@ class ThreadedTests(unittest.TestCase): - if cm.exc_value is not None: - raise cm.exc_value - -+ def test_got_eof(self): -+ # gh-148292: Test that _ssl._SSLSocket behaves the same on all OpenSSL -+ # versions on calling methods after EOF (after the first SSLEOFError). -+ -+ server = TestEOFServer() -+ server.start() -+ if not server.listening.wait(support.SHORT_TIMEOUT): -+ raise RuntimeError("server took too long") -+ self.addCleanup(server.join) -+ -+ context = ssl.create_default_context(cafile=CERTFILE) -+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ sock.settimeout(support.SHORT_TIMEOUT) -+ sock.connect(server.address) -+ sslsock = context.wrap_socket(sock, server_hostname='localhost') -+ with sslsock: -+ sslsock.sendall(b'client\n') -+ # test the _ssl._SSLSocket object, not ssl.SSLSocket -+ sslobj = sslsock._sslobj -+ -+ data = sslobj.read(1024) -+ self.assertEqual(data, b'server\n') -+ -+ # The second read gets EOF error and sets got_eof_error to 1 -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.read(1024) -+ -+ # Following read(), sendfile(), write() and do_handshake() calls -+ # must raise SSLEOFError -+ with self.assertRaises(ssl.SSLEOFError): -+ # The _SSLSocket remembers the previous EOF error -+ # and raises again SSLEOFError -+ sslobj.read(1024) -+ if hasattr(sslobj, 'sendfile'): -+ with open(__file__, "rb") as fp: -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.sendfile(fp.fileno(), 0, 1) -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.write(b'client2\n') -+ with self.assertRaises(ssl.SSLEOFError): -+ sslsock.do_handshake() -+ -+ self.assertEqual(sslsock.pending(), 0) -+ try: -+ sslsock.shutdown(socket.SHUT_WR) -+ except OSError as exc: -+ self.assertEqual(exc.errno, errno.ENOTCONN) -+ else: -+ # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -+ # raise an error -+ pass -+ - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, - "Test needs TLS 1.3 PHA") -diff --git a/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -new file mode 100644 -index 000000000000000..e1f308df5a678e6 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -@@ -0,0 +1,7 @@ -+:mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` for -+OpenSSL 4. The classes now remember if they get a :exc:`ssl.SSLEOFError`. In this -+case, following :meth:`~ssl.SSLSocket.read`, :meth:`!sendfile`, -+:meth:`~ssl.SSLSocket.write`, and :meth:`~ssl.SSLSocket.do_handshake` calls -+raise :exc:`ssl.SSLEOFError` without calling the underlying OpenSSL function. -+Thanks to that, :class:`ssl.SSLSocket` behaves the same on all OpenSSL versions -+on EOF. Patch by Victor Stinner. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index 1603d0ffd559559..376df32b7cb4bd6 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -352,6 +352,16 @@ typedef struct { - * and shutdown methods check for chained exceptions. - */ - PyObject *exc; -+ // gh-148292: If non-zero, read(), sendfile(), write() and do_handshake() -+ // methods raise SSLEOFError without calling the underlying OpenSSL -+ // function. Set to 1 on PY_SSL_ERROR_EOF error. -+ // -+ // On OpenSSL 4, if SSL_read_ex() fails with -+ // SSL_R_UNEXPECTED_EOF_WHILE_READING, the following SSL_read_ex() call -+ // fails with a generic protocol error (ERR_peek_last_error() returns 0). -+ // Use got_eof_error to have the same behavior on OpenSSL 4 and newer and -+ // on OpenSSL 3 and older. -+ int got_eof_error; - } PySSLSocket; - - #define PySSLSocket_CAST(op) ((PySSLSocket *)(op)) -@@ -499,6 +509,10 @@ fill_and_set_sslerror(_sslmodulestate *state, - PyObject *init_value, *msg, *key; - PyUnicodeWriter *writer = NULL; - -+ if (ssl_errno == PY_SSL_ERROR_EOF && sslsock != NULL) { -+ sslsock->got_eof_error = 1; -+ } -+ - if (errcode != 0) { - int lib, reason; - -@@ -654,6 +668,18 @@ PySSL_ChainExceptions(PySSLSocket *sslsock) { - return -1; - } - -+ -+static void -+set_eof_error(PySSLSocket *sslsock) -+{ -+ _sslmodulestate *state = get_state_sock(sslsock); -+ fill_and_set_sslerror(state, sslsock, state->PySSLEOFErrorObject, -+ PY_SSL_ERROR_EOF, -+ "EOF occurred in violation of protocol", -+ __LINE__, 0); -+} -+ -+ - static PyObject * - PySSL_SetError(PySSLSocket *sslsock, const char *filename, int lineno) - { -@@ -901,6 +927,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, - self->server_hostname = NULL; - self->err = err; - self->exc = NULL; -+ self->got_eof_error = 0; - - /* Make sure the SSL error state is initialized */ - ERR_clear_error(); -@@ -1043,6 +1070,11 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2514,6 +2546,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2654,6 +2691,11 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len, - Py_INCREF(sock); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - if (!group_right_1) { - dest = PyBytes_FromStringAndSize(NULL, len); - if (dest == NULL) diff --git a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch b/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch deleted file mode 100644 index 59742290e8b..00000000000 --- a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 81911909bc439d6de8ce6a173b0691b3c58e9e1a Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 16:20:25 +0200 -Subject: [PATCH] gh-148292: Remove shutdown() test in test_ssl.test_got_eof() - (#149366) - -The shutdown() behavior depends too much on the operating system and -it's unrelated to the got_eof_error change. - -(cherry picked from commit 1e21cf6fee3830012e458c0fe5dbc6fcd45ace92) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/81911909bc43] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 03d9e3f9e5e96b5..6445f122b4272be 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -5152,14 +5152,6 @@ class ThreadedTests(unittest.TestCase): - sslsock.do_handshake() - - self.assertEqual(sslsock.pending(), 0) -- try: -- sslsock.shutdown(socket.SHUT_WR) -- except OSError as exc: -- self.assertEqual(exc.errno, errno.ENOTCONN) -- else: -- # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -- # raise an error -- pass - - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch index 7167d5b4e82..83ed34d9863 100644 --- a/meta/recipes-devtools/python/python3/makerace.patch +++ b/meta/recipes-devtools/python/python3/makerace.patch @@ -1,4 +1,4 @@ -From b41557f570ff4451c477669d6ca5bfacabe21c66 Mon Sep 17 00:00:00 2001 +From be6588c8090edae5379f14dd76f146d383b25e50 Mon Sep 17 00:00:00 2001 From: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue, 13 Jul 2021 23:19:29 +0100 Subject: [PATCH] python3: Fix make race @@ -17,10 +17,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index a7e536d..e946018 100644 +index 24ca285..a1d59e4 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2750,7 +2750,7 @@ COMPILEALL_OPTS=-j0 +@@ -2844,7 +2844,7 @@ COMPILEALL_OPTS=-j0 TEST_MODULES=@TEST_MODULES@ .PHONY: libinstall diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json index 008d41e5654..2605beb2ccc 100644 --- a/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/meta/recipes-devtools/python/python3/python3-manifest.json @@ -117,7 +117,7 @@ "${libdir}/python${PYTHON_MAJMIN}/asyncio", "${libdir}/python${PYTHON_MAJMIN}/concurrent", "${libdir}/python${PYTHON_MAJMIN}/concurrent/futures", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_asyncio.*.so" + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_remote_debugging.*.so" ], "cached": [] }, @@ -129,9 +129,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/wave.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc" - ] + "cached": [] }, "codecs": { "summary": "Python codec", @@ -153,11 +151,7 @@ "${libdir}/python${PYTHON_MAJMIN}/filecmp.py", "${libdir}/python${PYTHON_MAJMIN}/py_compile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/compileall.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/filecmp.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/py_compile.*.pyc" - ] + "cached": [] }, "compression": { "summary": "Python high-level compression support", @@ -165,20 +159,16 @@ "core" ], "files": [ + "${libdir}/python${PYTHON_MAJMIN}/compression/", "${libdir}/python${PYTHON_MAJMIN}/gzip.py", "${libdir}/python${PYTHON_MAJMIN}/tarfile.py", - "${libdir}/python${PYTHON_MAJMIN}/zipfile/", - "${libdir}/python${PYTHON_MAJMIN}/compression/", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so" + "${libdir}/python${PYTHON_MAJMIN}/zipfile/" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gzip.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc" - ] + "cached": [] }, "core": { "summary": "Python interpreter and core modules", - "rdepends": ["compression"], + "rdepends": [], "files": [ "${bindir}/python${PYTHON_MAJMIN}", "${bindir}/python${PYTHON_MAJMIN}.real", @@ -195,6 +185,7 @@ "${libdir}/python${PYTHON_MAJMIN}/_colorize.py", "${libdir}/python${PYTHON_MAJMIN}/_compression.py", "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py", + "${libdir}/python${PYTHON_MAJMIN}/_missing_stdlib_info.py", "${libdir}/python${PYTHON_MAJMIN}/_opcode_metadata.py", "${libdir}/python${PYTHON_MAJMIN}/_py_warnings.py", "${libdir}/python${PYTHON_MAJMIN}/_pyrepl", @@ -213,6 +204,11 @@ "${libdir}/python${PYTHON_MAJMIN}/codeop.py", "${libdir}/python${PYTHON_MAJMIN}/collections", "${libdir}/python${PYTHON_MAJMIN}/collections/abc.py", + "${libdir}/python${PYTHON_MAJMIN}/compression", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common/_streams.py", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd/_zstdfile.py", "${libdir}/python${PYTHON_MAJMIN}/configparser.py", "${libdir}/python${PYTHON_MAJMIN}/contextlib.py", "${libdir}/python${PYTHON_MAJMIN}/copy.py", @@ -252,11 +248,14 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_csv.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_heapq.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_interpreters.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_math_integer.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_opcode.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixsubprocess.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_struct.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_typing.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so", @@ -282,6 +281,8 @@ "${libdir}/python${PYTHON_MAJMIN}/pathlib.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_abc.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_local.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/_os.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/types.py", "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py", "${libdir}/python${PYTHON_MAJMIN}/platform.py", "${libdir}/python${PYTHON_MAJMIN}/posixpath.py", @@ -437,18 +438,18 @@ "${libdir}/python${PYTHON_MAJMIN}/hashlib.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hmac.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hashlib.*.pyc" - ] + "cached": [] }, "ctypes": { "summary": "Python C types support", "rdepends": [ + "compression", "core", "io", "math" @@ -480,14 +481,9 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/_strptime.py", "${libdir}/python${PYTHON_MAJMIN}/calendar.py", - "${libdir}/python${PYTHON_MAJMIN}/datetime.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_datetime.*.so" + "${libdir}/python${PYTHON_MAJMIN}/datetime.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_strptime.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/calendar.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/datetime.*.pyc" - ] + "cached": [] }, "db": { "summary": "Python file-based database support", @@ -503,7 +499,15 @@ "debugger": { "summary": "Python debugger", "rdepends": [ + "asyncio", + "compression", "core", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold" @@ -512,10 +516,7 @@ "${libdir}/python${PYTHON_MAJMIN}/bdb.py", "${libdir}/python${PYTHON_MAJMIN}/pdb.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bdb.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pdb.*.pyc" - ] + "cached": [] }, "dev": { "cached": [], @@ -545,16 +546,22 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/difflib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc" - ] + "cached": [] }, "doctest": { "summary": "Python framework for running examples in docstrings", "rdepends": [ + "asyncio", + "compression", "core", "debugger", "difflib", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold", @@ -563,9 +570,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/doctest.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/doctest.*.pyc" - ] + "cached": [] }, "email": { "summary": "Python email support", @@ -582,9 +587,7 @@ "${libdir}/python${PYTHON_MAJMIN}/email", "${libdir}/python${PYTHON_MAJMIN}/imaplib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imaplib.*.pyc" - ] + "cached": [] }, "ensurepip": { "summary": "Support for bootstrapping the pip installer", @@ -601,9 +604,7 @@ "rdepends": [ "core" ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so" - ], + "files": [], "cached": [] }, "gdbm": { @@ -645,13 +646,12 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/colorsys.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/colorsys.*.pyc" - ] + "cached": [] }, "io": { "summary": "Python low-level I/O", "rdepends": [ + "compression", "core", "math", "netclient" @@ -665,12 +665,7 @@ "${libdir}/python${PYTHON_MAJMIN}/ssl.py", "${libdir}/python${PYTHON_MAJMIN}/tempfile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pyio.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socket.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ssl.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tempfile.*.pyc" - ] + "cached": [] }, "json": { "summary": "Python JSON support", @@ -713,9 +708,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/mailbox.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mailbox.*.pyc" - ] + "cached": [] }, "math": { "summary": "Python math support", @@ -727,9 +720,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/cmath.*.so", "${libdir}/python${PYTHON_MAJMIN}/random.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/random.*.pyc" - ] + "cached": [] }, "mime": { "summary": "Python MIME handling APIs", @@ -739,9 +730,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/quopri.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/quopri.*.pyc" - ] + "cached": [] }, "mmap": { "summary": "Python memory-mapped file support", @@ -816,10 +805,12 @@ "multiprocessing": { "summary": "Python multiprocessing support", "rdepends": [ + "compression", "core", "crypt", "ctypes", "io", + "json", "math", "mmap", "netclient", @@ -859,16 +850,7 @@ "${libdir}/python${PYTHON_MAJMIN}/urllib", "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/base64.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ftplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hmac.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc" - ] + "cached": [] }, "netserver": { "summary": "Python Internet Protocol servers", @@ -879,9 +861,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/socketserver.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socketserver.*.pyc" - ] + "cached": [] }, "numbers": { "summary": "Python number APIs", @@ -893,17 +873,10 @@ "${libdir}/python${PYTHON_MAJMIN}/contextvars.py", "${libdir}/python${PYTHON_MAJMIN}/decimal.py", "${libdir}/python${PYTHON_MAJMIN}/fractions.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_contextvars.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_decimal.*.so", "${libdir}/python${PYTHON_MAJMIN}/numbers.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pydecimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/contextvars.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/decimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fractions.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/numbers.*.pyc" - ] + "cached": [] }, "pickle": { "summary": "Python serialisation/persistence support", @@ -917,12 +890,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pickletools.py", "${libdir}/python${PYTHON_MAJMIN}/shelve.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compat_pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickletools.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shelve.*.pyc" - ] + "cached": [] }, "pkgutil": { "summary": "Python package extension utility support", @@ -942,9 +910,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/plistlib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/plistlib.*.pyc" - ] + "cached": [] }, "pprint": { "summary": "Python pretty-print support", @@ -954,9 +920,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/pprint.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pprint.*.pyc" - ] + "cached": [] }, "profile": { "summary": "Python basic performance profiling support", @@ -967,13 +931,11 @@ "${libdir}/python${PYTHON_MAJMIN}/cProfile.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lsprof.*.so", "${libdir}/python${PYTHON_MAJMIN}/profile.py", + "${libdir}/python${PYTHON_MAJMIN}/profiling", + "${libdir}/python${PYTHON_MAJMIN}/profiling/tracing", "${libdir}/python${PYTHON_MAJMIN}/pstats.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cProfile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/profile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc" - ] + "cached": [] }, "pydoc": { "summary": "Python interactive help support", @@ -985,9 +947,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pydoc.py", "${libdir}/python${PYTHON_MAJMIN}/pydoc_data" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc" - ] + "cached": [] }, "resource": { "summary": "Python resource control interface", @@ -1002,17 +962,13 @@ "shell": { "summary": "Python shell-like functionality", "rdepends": [ - "core", - "stringold" + "core" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/cmd.py", "${libdir}/python${PYTHON_MAJMIN}/shlex.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc" - ] + "cached": [] }, "sqlite3": { "summary": "Python Sqlite3 database support", @@ -1037,9 +993,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_statistics.*.so", "${libdir}/python${PYTHON_MAJMIN}/statistics.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/statistics.*.pyc" - ] + "cached": [] }, "stringold": { "summary": "Common string operations", @@ -1072,10 +1026,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pty.py", "${libdir}/python${PYTHON_MAJMIN}/tty.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pty.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tty.*.pyc" - ] + "cached": [] }, "threading": { "summary": "Python threading & synchronization support", @@ -1087,10 +1038,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_queue.*.so", "${libdir}/python${PYTHON_MAJMIN}/queue.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_threading_local.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/queue.*.pyc" - ] + "cached": [] }, "tkinter": { "summary": "Python Tcl/Tk bindings", @@ -1141,15 +1089,15 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/getpass.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc" - ] + "cached": [] }, "venv": { "summary": "Provides support for creating lightweight virtual environments with their own site directories, optionally isolated from system site directories.", "rdepends": [ + "compression", "core", "logging", + "shell", "stringold" ], "files": [ @@ -1200,11 +1148,10 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/zipapp.py" + "${libdir}/python${PYTHON_MAJMIN}/zipapp.py", + "${libdir}/python${PYTHON_MAJMIN}/zipfile" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipapp.*.pyc" - ] + "cached": [] }, "zoneinfo": { "summary": "IANA time zone support", diff --git a/meta/recipes-devtools/python/python3/valid-dists.patch b/meta/recipes-devtools/python/python3/valid-dists.patch deleted file mode 100644 index 7fe18254e50..00000000000 --- a/meta/recipes-devtools/python/python3/valid-dists.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 66874ce1a9f21b4b00dc85919734d58e6243ca29 Mon Sep 17 00:00:00 2001 -From: "Jason R. Coombs" <jaraco@jaraco.com> -Date: Tue, 23 Jul 2024 08:36:16 -0400 -Subject: [PATCH] Prioritize valid dists to invalid dists when retrieving by - name. - -Closes python/importlib_metadata#489 - -Upstream-Status: Backport [https://github.com/python/importlib_metadata/commit/a65c29adc027b3615154cab73aaedd58a6aa23da] -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - Lib/importlib/metadata/__init__.py | 14 +++- - Lib/importlib/metadata/_itertools.py | 98 ++++++++++++++++++++++++++++ - 2 files changed, 110 insertions(+), 2 deletions(-) - -diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 8ce62dd..085378c 100644 ---- a/Lib/importlib/metadata/__init__.py -+++ b/Lib/importlib/metadata/__init__.py -@@ -21,7 +21,7 @@ import collections - from . import _meta - from ._collections import FreezableDefaultDict, Pair - from ._functools import method_cache, pass_none --from ._itertools import always_iterable, unique_everseen -+from ._itertools import always_iterable, bucket, unique_everseen - from ._meta import PackageMetadata, SimplePath - - from contextlib import suppress -@@ -404,7 +404,7 @@ class Distribution(DeprecatedNonAbstract): - if not name: - raise ValueError("A distribution name is required.") - try: -- return next(iter(cls.discover(name=name))) -+ return next(iter(cls._prefer_valid(cls.discover(name=name)))) - except StopIteration: - raise PackageNotFoundError(name) - -@@ -428,6 +428,16 @@ class Distribution(DeprecatedNonAbstract): - resolver(context) for resolver in cls._discover_resolvers() - ) - -+ @staticmethod -+ def _prefer_valid(dists: Iterable[Distribution]) -> Iterable[Distribution]: -+ """ -+ Prefer (move to the front) distributions that have metadata. -+ -+ Ref python/importlib_resources#489. -+ """ -+ buckets = bucket(dists, lambda dist: bool(dist.metadata)) -+ return itertools.chain(buckets[True], buckets[False]) -+ - @staticmethod - def at(path: str | os.PathLike[str]) -> Distribution: - """Return a Distribution for the indicated metadata path. -diff --git a/Lib/importlib/metadata/_itertools.py b/Lib/importlib/metadata/_itertools.py -index d4ca9b9..79d3719 100644 ---- a/Lib/importlib/metadata/_itertools.py -+++ b/Lib/importlib/metadata/_itertools.py -@@ -1,3 +1,4 @@ -+from collections import defaultdict, deque - from itertools import filterfalse - - -@@ -71,3 +72,100 @@ def always_iterable(obj, base_type=(str, bytes)): - return iter(obj) - except TypeError: - return iter((obj,)) -+ -+ -+# Copied from more_itertools 10.3 -+class bucket: -+ """Wrap *iterable* and return an object that buckets the iterable into -+ child iterables based on a *key* function. -+ -+ >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] -+ >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character -+ >>> sorted(list(s)) # Get the keys -+ ['a', 'b', 'c'] -+ >>> a_iterable = s['a'] -+ >>> next(a_iterable) -+ 'a1' -+ >>> next(a_iterable) -+ 'a2' -+ >>> list(s['b']) -+ ['b1', 'b2', 'b3'] -+ -+ The original iterable will be advanced and its items will be cached until -+ they are used by the child iterables. This may require significant storage. -+ -+ By default, attempting to select a bucket to which no items belong will -+ exhaust the iterable and cache all values. -+ If you specify a *validator* function, selected buckets will instead be -+ checked against it. -+ -+ >>> from itertools import count -+ >>> it = count(1, 2) # Infinite sequence of odd numbers -+ >>> key = lambda x: x % 10 # Bucket by last digit -+ >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only -+ >>> s = bucket(it, key=key, validator=validator) -+ >>> 2 in s -+ False -+ >>> list(s[2]) -+ [] -+ -+ """ -+ -+ def __init__(self, iterable, key, validator=None): -+ self._it = iter(iterable) -+ self._key = key -+ self._cache = defaultdict(deque) -+ self._validator = validator or (lambda x: True) -+ -+ def __contains__(self, value): -+ if not self._validator(value): -+ return False -+ -+ try: -+ item = next(self[value]) -+ except StopIteration: -+ return False -+ else: -+ self._cache[value].appendleft(item) -+ -+ return True -+ -+ def _get_values(self, value): -+ """ -+ Helper to yield items from the parent iterator that match *value*. -+ Items that don't match are stored in the local cache as they -+ are encountered. -+ """ -+ while True: -+ # If we've cached some items that match the target value, emit -+ # the first one and evict it from the cache. -+ if self._cache[value]: -+ yield self._cache[value].popleft() -+ # Otherwise we need to advance the parent iterator to search for -+ # a matching item, caching the rest. -+ else: -+ while True: -+ try: -+ item = next(self._it) -+ except StopIteration: -+ return -+ item_value = self._key(item) -+ if item_value == value: -+ yield item -+ break -+ elif self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ def __iter__(self): -+ for item in self._it: -+ item_value = self._key(item) -+ if self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ yield from self._cache.keys() -+ -+ def __getitem__(self, value): -+ if not self._validator(value): -+ return iter(()) -+ -+ return self._get_values(value) diff --git a/meta/recipes-devtools/python/python3_3.14.10.bb b/meta/recipes-devtools/python/python3_3.15.2.bb similarity index 98% rename from meta/recipes-devtools/python/python3_3.14.10.bb rename to meta/recipes-devtools/python/python3_3.15.2.bb index b062b4e7c50..0ead68b7497 100644 --- a/meta/recipes-devtools/python/python3_3.14.10.bb +++ b/meta/recipes-devtools/python/python3_3.15.2.bb @@ -18,19 +18,17 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://makerace.patch \ file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \ file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \ - file://valid-dists.patch \ file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \ file://0001-prefer-valid-entrypoints.patch \ - file://0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch \ - file://0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch \ - file://0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch \ + file://0001-configure-clear-RUNSHARED-when-cross-compiling.patch \ + file://0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch \ " SRC_URI:append:class-native = " \ file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ " -SRC_URI[sha256sum] = "de414a57119abef52784d8993e341d53aed635fc2b05c2607d9f98a2c5b72032" +SRC_URI[sha256sum] = "8b5536d280142ecf6cdfe15d12a21ba1c65e300bbf7b28a8d0cdb849575797de" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" @@ -41,7 +39,7 @@ inherit upstream-stable-release-point CVE_PRODUCT = "python:python python_software_foundation:python cpython" -PYTHON_MAJMIN = "3.14" +PYTHON_MAJMIN = "3.15" S = "${UNPACKDIR}/Python-${PV}" @@ -75,7 +73,7 @@ DEPENDS = "\ DEPENDS:append:class-target = " python3-native" DEPENDS:append:class-nativesdk = " python3-native" -EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat" +EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat --without-system-libmpdec" EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3 PLATFORM_TRIPLET=${HOST_ARCH}-${HOST_OS}" EXTRA_OECONF:append:class-nativesdk = " --with-build-python=nativepython3" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [OE-core] [PATCH v5 3/3] python3: Upgrade 3.14.10 -> 3.15.2 2026-11-02 8:08 ` [PATCH v5 3/3] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam @ 2026-11-03 14:03 ` Mathieu Dubois-Briand 2026-11-04 15:06 ` Jaipaul Cheernam 0 siblings, 1 reply; 28+ messages in thread From: Mathieu Dubois-Briand @ 2026-11-03 14:03 UTC (permalink / raw) To: Jaipaul Cheernam, openembedded-core On Mon Nov 2, 2026 at 9:08 AM CET, Jaipaul Cheernam wrote: > ReleaseNotes: https://docs.python.org/3/whatsnew/changelog.html#python-3-15-2-final > > - Drop patches which are part of upstream release > - 0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch > - 0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch > - 0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch > - valid-dists.patch > - Add --without-system-libmpdec as EXTRA_OECONF configure option > (--with-system-libmpdec is needed new package mpdecimal [1]) > - Bump PYTHON_BASEVERSION to 3.15 in python3-dir.bbclass > - Update python3-manifest > - Refresh existing patches > - Add two fixes needed for the new release > - 0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch > - 0001-configure-clear-RUNSHARED-when-cross-compiling.patch > > Verification: > - Built python3 for glibc and musl > - verified ptest for all 34 python3 packages which supports ptest > > [1] https://github.com/python/cpython/issues/115119 > > Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> > --- Hi Jaipaul, Another issue, sorry. With python3-wcwidth ptest: Failed ptests: {'python3-wcwidth': 'START: ptest-runner\n' '2026-11-03T11:04\n' 'SKIP: ' 'tests/test_fastcall_args.py:tests/test_fastcall_args.py # ' "SKIP could not import 'wcwidth._wcwidth_c': No module " "named 'wcwidth._wcwidth_c'\n" 'SKIP: tests/test_setup.py:tests/test_setup.py # SKIP ' "could not import 'setuptools': No module named " "'setuptools'\n" '\n' '@pytest.fixture(autouse=True)\n' ' def _verify_extension_mode():\n' ' """\n' ' Assert the loaded implementation matches the ' 'WCWIDTH_PYTHON env var.\n' ' \n' ' In extension mode the C extension must be active; ' 'in Python mode it must not be, so a silently-\n' ' failed C build is caught in CI.\n' ' """\n' ' # local\n' ' import wcwidth\n' ' \n' " if os.environ.get('WCWIDTH_PYTHON', ''):\n" ' assert not wcwidth.HAS_C_EXTENSION, "C ' 'extension loaded in Python mode"\n' ' else:\n' '> assert wcwidth.HAS_C_EXTENSION, "C extension ' 'not loaded in extension mode"\n' 'E AssertionError: C extension not loaded in ' 'extension mode\n' 'E assert False\n' "E + where False = <module 'wcwidth' from " "'/usr/lib/python3.15/site-packages/wcwidth/__init__.py'>.HAS_C_EXTENSION\n" '\n' 'tests/conftest.py:27: AssertionError\n' 'ERROR: ' 'tests/test_ambiguous.py:test_wcwidth_ambiguous_default[\\xa1-INVERTED_EXCLAMATION]\n' '\n' https://autobuilder.yoctoproject.org/valkyrie/#/builders/110/builds/1508 Can you have a look at the issue? Thanks, Mathieu -- Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [OE-core] [PATCH v5 3/3] python3: Upgrade 3.14.10 -> 3.15.2 2026-11-03 14:03 ` [OE-core] " Mathieu Dubois-Briand @ 2026-11-04 15:06 ` Jaipaul Cheernam 0 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-04 15:06 UTC (permalink / raw) To: Mathieu Dubois-Briand, openembedded-core On 2026-11-03 15:03, Mathieu Dubois-Briand wrote: > Another issue, sorry. With python3-wcwidth ptest: > > Failed ptests: > {'python3-wcwidth': 'START: ptest-runner\n' > '2026-11-03T11:04\n' Hello Mathieu, Found the reason and working on it and this time I will verify musl also unlike last time verified only on glibc. Regards, Jaipaul ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 2026-10-12 9:00 ` [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 Jaipaul Cheernam ` (3 preceding siblings ...) 2026-11-02 8:08 ` [PATCH v5 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam @ 2026-11-04 15:28 ` Jaipaul Cheernam 2026-11-04 15:28 ` [PATCH v6 2/2] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2026-11-05 6:08 ` [OE-core] [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Mathieu Dubois-Briand 2026-11-05 12:24 ` [PATCH v7 0/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 5 siblings, 2 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-04 15:28 UTC (permalink / raw) To: openembedded-core ChangeLog: https://setuptools.pypa.io/en/stable/history.html#v84-2-1 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...ils-sysconfig.py-make-it-possible-to-substite.patch | 10 +++++----- ...tuptools_84.0.0.bb => python3-setuptools_84.2.1.bb} | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) rename meta/recipes-devtools/python/{python3-setuptools_84.0.0.bb => python3-setuptools_84.2.1.bb} (94%) diff --git a/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch b/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch index f6313fb1a9..df9d5f77c3 100644 --- a/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch +++ b/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch @@ -1,4 +1,4 @@ -From fe651521b9d970a84432b37d2731932a4862deb2 Mon Sep 17 00:00:00 2001 +From dfebab446e3148e3ec170e06aa57b703a655f772 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Wed, 11 May 2022 21:41:14 +0200 Subject: [PATCH] _distutils/sysconfig.py: make it possible to substite the @@ -20,10 +20,10 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de> 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py -index 7ddc869..01a06af 100644 +index 4792b58..cf1fbc5 100644 --- a/setuptools/_distutils/sysconfig.py +++ b/setuptools/_distutils/sysconfig.py -@@ -134,6 +134,8 @@ def get_python_inc(plat_specific: bool = False, prefix: str | None = None) -> st +@@ -133,6 +133,8 @@ def get_python_inc(plat_specific: bool = False, prefix: str | None = None) -> st sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ default_prefix = BASE_EXEC_PREFIX if plat_specific else BASE_PREFIX @@ -32,7 +32,7 @@ index 7ddc869..01a06af 100644 resolved_prefix = prefix if prefix is not None else default_prefix # MinGW imitates posix like layout, but os.name != posix os_name = "posix" if is_mingw() else os.name -@@ -246,7 +248,13 @@ def get_python_lib( +@@ -245,7 +247,13 @@ def get_python_lib( early_prefix = prefix @@ -47,7 +47,7 @@ index 7ddc869..01a06af 100644 if standard_lib: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX else: -@@ -261,7 +269,7 @@ def get_python_lib( +@@ -260,7 +268,7 @@ def get_python_lib( # Pure Python libdir = "lib" implementation = 'pypy' if IS_PYPY else 'python' diff --git a/meta/recipes-devtools/python/python3-setuptools_84.0.0.bb b/meta/recipes-devtools/python/python3-setuptools_84.2.1.bb similarity index 94% rename from meta/recipes-devtools/python/python3-setuptools_84.0.0.bb rename to meta/recipes-devtools/python/python3-setuptools_84.2.1.bb index 648b084a27..f2dd481835 100644 --- a/meta/recipes-devtools/python/python3-setuptools_84.0.0.bb +++ b/meta/recipes-devtools/python/python3-setuptools_84.2.1.bb @@ -11,7 +11,7 @@ CVE_PRODUCT = "python3-setuptools python:setuptools" SRC_URI += " \ file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch" -SRC_URI[sha256sum] = "f4695c21257f0d9b537ec2692c941d02ee143b7cc1276941349a546573b2ef73" +SRC_URI[sha256sum] = "3ff8b3b5492a0aa66960f4419365a86b84e013070d4313e4d4a6894f5d64d6bc" do_install:append() { # setuptools ships Windows launcher executables (cli*.exe, gui*.exe). ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v6 2/2] python3: Upgrade 3.14.10 -> 3.15.2 2026-11-04 15:28 ` [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Jaipaul Cheernam @ 2026-11-04 15:28 ` Jaipaul Cheernam 2026-11-05 6:08 ` [OE-core] [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Mathieu Dubois-Briand 1 sibling, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-04 15:28 UTC (permalink / raw) To: openembedded-core ReleaseNotes: https://docs.python.org/3/whatsnew/changelog.html#python-3-15-2-final - Drop patches which are part of upstream release - 0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch - 0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch - 0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch - valid-dists.patch - Add --without-system-libmpdec as EXTRA_OECONF configure option (--with-system-libmpdec is needed new package mpdecimal [1]) - Bump PYTHON_BASEVERSION to 3.15 in python3-dir.bbclass - Update python3-manifest - Refresh existing patches - Add two fixes needed for the new release - 0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch - 0001-configure-clear-RUNSHARED-when-cross-compiling.patch Verification: - Built python3 for glibc and musl - verified ptest for all 34 python3 packages which supports ptest [1] https://github.com/python/cpython/issues/115119 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- Changes since v5: - Upgrade python3-setuptools Changes since v4: - Add license tag for python3-dbus upgrade Changes since v3: - Upgrade python3-dbus which is causing failure for glib-2.0 Changes since v2: - Drop mpdecimal new package and add --without-system-libmpdec - Add patch for maturin failure - verified ptest on all 34 python3 packages - Verified with glibc and musl as well Changes since v1: - Update python3-manifest meta/classes-recipe/python3-dir.bbclass | 2 +- ...shebang-overflow-on-python-config.py.patch | 6 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 6 +- ...-qemu-wrapper-when-gathering-profile.patch | 6 +- ...est_sysconfig-for-posix_user-purelib.patch | 6 +- ...clear-RUNSHARED-when-cross-compiling.patch | 46 ++++ ...146207-Add-support-for-OpenSSL-4.0.0.patch | 254 ------------------ ...st_is_python_process_non_python_subp.patch | 50 ++++ .../0001-prefer-valid-entrypoints.patch | 6 +- ...g.py-use-platlibdir-also-for-purelib.patch | 4 +- ...le.py-correct-the-test-output-format.patch | 6 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 6 +- .../python/python3/python3-manifest.json | 199 +++++--------- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.10.bb => python3_3.15.2.bb} | 12 +- 18 files changed, 199 insertions(+), 851 deletions(-) create mode 100644 meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch create mode 100644 meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.10.bb => python3_3.15.2.bb} (98%) diff --git a/meta/classes-recipe/python3-dir.bbclass b/meta/classes-recipe/python3-dir.bbclass index 3eb0dea9b2..b26621f365 100644 --- a/meta/classes-recipe/python3-dir.bbclass +++ b/meta/classes-recipe/python3-dir.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -PYTHON_BASEVERSION = "3.14" +PYTHON_BASEVERSION = "3.15" PYTHON_ABI = "" PYTHON_DIR = "python${PYTHON_BASEVERSION}" PYTHON_PN = "python3" diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 79fee9803f..f5acfb789c 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch @@ -1,4 +1,4 @@ -From 3f2df0e1fce8c7425998dade00d084f1b101a982 Mon Sep 17 00:00:00 2001 +From c7712b4345e16786ee237427537b83787022c733 Mon Sep 17 00:00:00 2001 From: Paulo Neves <ptsneves@gmail.com> Date: Tue, 7 Jun 2022 16:16:41 +0200 Subject: [PATCH] Avoid shebang overflow on python-config.py @@ -16,10 +16,10 @@ Upstream-Status: Denied [distribution] 1 file changed, 2 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in -index e946018..345ed29 100644 +index a1d59e4..26a90e6 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2844,6 +2844,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh +@@ -2938,6 +2938,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh @ # Substitution happens here, as the completely-expanded BINDIR @ # is not available in configure sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py diff --git a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch index 532adfe69a..322de292ce 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch @@ -1,4 +1,4 @@ -From 9cd44429215352eb2753e0fd8e25fef24f714006 Mon Sep 17 00:00:00 2001 +From 1e6d7f34c558ed05f7d35f4a2b86f079318fb6be Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Thu, 16 Sep 2021 16:35:37 +0200 Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch index 580d38a403..ce2efd431c 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch @@ -1,4 +1,4 @@ -From b5aad6a9b6c5add7a85861aed8aa030c1ad3d52f Mon Sep 17 00:00:00 2001 +From 7338a6821cdc4e7cab17ca255e484bf19b4b3670 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Fri, 17 Nov 2023 14:26:32 +0100 Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration @@ -18,10 +18,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 0a8bcc0..a2341f2 100644 +index 924401c..0ff84f7 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py -@@ -539,12 +539,12 @@ def _init_config_vars(): +@@ -537,12 +537,12 @@ def _init_config_vars(): _CONFIG_VARS['py_version'] = _PY_VERSION _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT _CONFIG_VARS['py_version_nodot'] = _PY_VERSION_SHORT_NO_DOT diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch index d3f46c372a..dd5a87cd54 100644 --- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch +++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch @@ -1,4 +1,4 @@ -From d6f77e3a934616d1f6c083b7144c50a32e08b70a Mon Sep 17 00:00:00 2001 +From 61b446b8554b91b93f8ae40c654abf9d8a77145d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 30 Jan 2019 12:41:04 +0100 Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data @@ -15,10 +15,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 526d500..a7e536d 100644 +index 95fefcc..24ca285 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -864,8 +864,7 @@ profile-run-stamp: +@@ -879,8 +879,7 @@ profile-run-stamp: # enabled. $(MAKE) profile-gen-stamp # Next, run the profile task to generate the profile information. diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch index 0864f23926..6cc7ae187e 100644 --- a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch @@ -1,4 +1,4 @@ -From c608cb4b3c8c31f1aa25ad1264ff58733fb99769 Mon Sep 17 00:00:00 2001 +From f1e23d641d6edb5bb82cd24272b7b1f8c42c64dd Mon Sep 17 00:00:00 2001 From: Wentao Zhang <wentao.zhang@windriver.com> Date: Mon, 20 Mar 2023 13:39:52 +0800 Subject: [PATCH] Update test_sysconfig for posix_user purelib @@ -22,10 +22,10 @@ Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py -index 1fe4b68..383142a 100644 +index ce3a3c6..4eb65fb 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py -@@ -435,7 +435,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): +@@ -432,7 +432,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): expected = os.path.normpath(global_path.replace(base, user, 1)) # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, # whereas posix_prefix does. diff --git a/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch new file mode 100644 index 0000000000..f5f09e81ee --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +Date: Tue, 27 Oct 2026 10:00:00 +0000 +Subject: [PATCH] configure: clear RUNSHARED when cross compiling + +Since 3.15 the checksharedmods target runs the host build python with the +target LD_LIBRARY_PATH, which breaks musl cross builds (host cannot load +libc.so). Clear RUNSHARED for cross builds as before. + +Upstream-Status: Submitted [https://github.com/python/cpython/issues/160924] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + configure | 4 ++++ + configure.ac | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/configure b/configure +index 6f7ff1b..9702135 100755 +--- a/configure ++++ b/configure +@@ -7867,6 +7867,10 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 + printf "%s\n" "$LDLIBRARY" >&6; } + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOSTRUNNER" >&5 + printf %s "checking HOSTRUNNER... " >&6; } +diff --git a/configure.ac b/configure.ac +index 9923805..9e86057 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1670,6 +1670,10 @@ else # shared is disabled + fi + AC_MSG_RESULT([$LDLIBRARY]) + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + AC_MSG_CHECKING([HOSTRUNNER]) + if test -z "$HOSTRUNNER" diff --git a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch b/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch deleted file mode 100644 index 37f55de65c..0000000000 --- a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch +++ /dev/null @@ -1,254 +0,0 @@ -From 3364e7e62fa24d0e19133fb0f90b1c24ef1110c5 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Wed, 25 Mar 2026 07:44:47 +0100 -Subject: [PATCH] gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217) - -OpenSSL 4.0.0 alpha1 removed these functions: - -* SSLv3_method() -* TLSv1_method() -* TLSv1_1_method() -* TLSv1_2_method() - -Other changes: - -* Update test_openssl_version(). -* Update multissltests.py for OpenSSL 4. -* Add const qualifier to fix compiler warnings. - -Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> -Signed-off-by: Victor Stinner <vstinner@python.org> - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3364e7e62fa24d0e19133fb0f90b1c24ef1110c5] -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 52 ++++++++++++++++++++------------------ - Modules/_ssl.c | 27 ++++++++++++++++---- - Modules/_ssl/cert.c | 3 ++- - Tools/ssl/multissltests.py | 7 ++++- - 4 files changed, 58 insertions(+), 31 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index dc795c6bd8a..61355927296 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -439,7 +439,7 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_COMPRESSION - self.assertEqual(ssl.HAS_SNI, True) - self.assertEqual(ssl.HAS_ECDH, True) -- self.assertEqual(ssl.HAS_TLSv1_2, True) -+ self.assertIsInstance(ssl.HAS_TLSv1_2, bool) - self.assertEqual(ssl.HAS_TLSv1_3, True) - ssl.OP_NO_SSLv2 - ssl.OP_NO_SSLv3 -@@ -630,11 +630,11 @@ class BasicSocketTests(unittest.TestCase): - # Some sanity checks follow - # >= 1.1.1 - self.assertGreaterEqual(n, 0x10101000) -- # < 4.0 -- self.assertLess(n, 0x40000000) -+ # < 5.0 -+ self.assertLess(n, 0x50000000) - major, minor, fix, patch, status = t - self.assertGreaterEqual(major, 1) -- self.assertLess(major, 4) -+ self.assertLess(major, 5) - self.assertGreaterEqual(minor, 0) - self.assertLess(minor, 256) - self.assertGreaterEqual(fix, 0) -@@ -700,12 +700,14 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_TLSv1_2, - ssl.OP_NO_TLSv1_3 - ] -- protocols = [ -- ssl.PROTOCOL_TLSv1, -- ssl.PROTOCOL_TLSv1_1, -- ssl.PROTOCOL_TLSv1_2, -- ssl.PROTOCOL_TLS -- ] -+ protocols = [] -+ if hasattr(ssl, 'PROTOCOL_TLSv1'): -+ protocols.append(ssl.PROTOCOL_TLSv1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_1'): -+ protocols.append(ssl.PROTOCOL_TLSv1_1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_2'): -+ protocols.append(ssl.PROTOCOL_TLSv1_2) -+ protocols.append(ssl.PROTOCOL_TLS) - versions = [ - ssl.TLSVersion.SSLv3, - ssl.TLSVersion.TLSv1, -@@ -1199,6 +1201,7 @@ class ContextTests(unittest.TestCase): - ssl.TLSVersion.TLSv1, - ssl.TLSVersion.TLSv1_1, - ssl.TLSVersion.TLSv1_2, -+ ssl.TLSVersion.TLSv1_3, - ssl.TLSVersion.SSLv3, - } - ) -@@ -1212,7 +1215,7 @@ class ContextTests(unittest.TestCase): - with self.assertRaises(ValueError): - ctx.minimum_version = 42 - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_1) - - self.assertIn( -@@ -1764,23 +1767,24 @@ class ContextTests(unittest.TestCase): - self.assertFalse(ctx.check_hostname) - self._assert_context_options(ctx) - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - with warnings_helper.check_warnings(): - ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) - self._assert_context_options(ctx) - -- with warnings_helper.check_warnings(): -- ctx = ssl._create_stdlib_context( -- ssl.PROTOCOL_TLSv1_2, -- cert_reqs=ssl.CERT_REQUIRED, -- check_hostname=True -- ) -- self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -- self.assertTrue(ctx.check_hostname) -- self._assert_context_options(ctx) -+ if has_tls_protocol('PROTOCOL_TLSv1_2'): -+ with warnings_helper.check_warnings(): -+ ctx = ssl._create_stdlib_context( -+ ssl.PROTOCOL_TLSv1_2, -+ cert_reqs=ssl.CERT_REQUIRED, -+ check_hostname=True -+ ) -+ self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -+ self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -+ self.assertTrue(ctx.check_hostname) -+ self._assert_context_options(ctx) - - ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_SERVER) -@@ -3908,10 +3912,10 @@ class ThreadedTests(unittest.TestCase): - client_options=ssl.OP_NO_TLSv1_2) - - try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2') -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False) -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False) - -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index b45295b4c0c..6f75af86113 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -136,6 +136,17 @@ static void _PySSLFixErrno(void) { - #error Unsupported OpenSSL version - #endif - -+#if (OPENSSL_VERSION_NUMBER >= 0x40000000L) -+# define OPENSSL_NO_SSL3 -+# define OPENSSL_NO_TLS1 -+# define OPENSSL_NO_TLS1_1 -+# define OPENSSL_NO_TLS1_2 -+# define OPENSSL_NO_SSL3_METHOD -+# define OPENSSL_NO_TLS1_METHOD -+# define OPENSSL_NO_TLS1_1_METHOD -+# define OPENSSL_NO_TLS1_2_METHOD -+#endif -+ - /* OpenSSL API 1.1.0+ does not include version methods */ - #ifndef OPENSSL_NO_SSL3_METHOD - extern const SSL_METHOD *SSLv3_method(void); -@@ -1137,7 +1148,7 @@ _asn1obj2py(_sslmodulestate *state, const ASN1_OBJECT *name, int no_name) - - static PyObject * - _create_tuple_for_attribute(_sslmodulestate *state, -- ASN1_OBJECT *name, ASN1_STRING *value) -+ const ASN1_OBJECT *name, const ASN1_STRING *value) - { - Py_ssize_t buflen; - PyObject *pyattr; -@@ -1166,16 +1177,16 @@ _create_tuple_for_attribute(_sslmodulestate *state, - } - - static PyObject * --_create_tuple_for_X509_NAME (_sslmodulestate *state, X509_NAME *xname) -+_create_tuple_for_X509_NAME(_sslmodulestate *state, const X509_NAME *xname) - { - PyObject *dn = NULL; /* tuple which represents the "distinguished name" */ - PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */ - PyObject *rdnt; - PyObject *attr = NULL; /* tuple to hold an attribute */ - int entry_count = X509_NAME_entry_count(xname); -- X509_NAME_ENTRY *entry; -- ASN1_OBJECT *name; -- ASN1_STRING *value; -+ const X509_NAME_ENTRY *entry; -+ const ASN1_OBJECT *name; -+ const ASN1_STRING *value; - int index_counter; - int rdn_level = -1; - int retcode; -@@ -6599,9 +6610,15 @@ sslmodule_init_constants(PyObject *m) - ADD_INT_CONST("PROTOCOL_TLS", PY_SSL_VERSION_TLS); - ADD_INT_CONST("PROTOCOL_TLS_CLIENT", PY_SSL_VERSION_TLS_CLIENT); - ADD_INT_CONST("PROTOCOL_TLS_SERVER", PY_SSL_VERSION_TLS_SERVER); -+#ifndef OPENSSL_NO_TLS1 - ADD_INT_CONST("PROTOCOL_TLSv1", PY_SSL_VERSION_TLS1); -+#endif -+#ifndef OPENSSL_NO_TLS1_1 - ADD_INT_CONST("PROTOCOL_TLSv1_1", PY_SSL_VERSION_TLS1_1); -+#endif -+#ifndef OPENSSL_NO_TLS1_2 - ADD_INT_CONST("PROTOCOL_TLSv1_2", PY_SSL_VERSION_TLS1_2); -+#endif - - #define ADD_OPTION(NAME, VALUE) if (sslmodule_add_option(m, NAME, (VALUE)) < 0) return -1 - -diff --git a/Modules/_ssl/cert.c b/Modules/_ssl/cert.c -index f2e7be89668..061b0fb3171 100644 ---- a/Modules/_ssl/cert.c -+++ b/Modules/_ssl/cert.c -@@ -128,7 +128,8 @@ _ssl_Certificate_get_info_impl(PySSLCertificate *self) - } - - static PyObject* --_x509name_print(_sslmodulestate *state, X509_NAME *name, int indent, unsigned long flags) -+_x509name_print(_sslmodulestate *state, const X509_NAME *name, -+ int indent, unsigned long flags) - { - PyObject *res; - BIO *biobuf; -diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py -index 3b4507c6771..48207e5330f 100755 ---- a/Tools/ssl/multissltests.py -+++ b/Tools/ssl/multissltests.py -@@ -422,9 +422,11 @@ class BuildOpenSSL(AbstractBuilder): - def _post_install(self): - if self.version.startswith("3."): - self._post_install_3xx() -+ elif self.version.startswith("4."): -+ self._post_install_4xx() - - def _build_src(self, config_args=()): -- if self.version.startswith("3."): -+ if self.version.startswith(("3.", "4.")): - config_args += ("enable-fips",) - super()._build_src(config_args) - -@@ -440,6 +442,9 @@ class BuildOpenSSL(AbstractBuilder): - lib64 = self.lib_dir + "64" - os.symlink(lib64, self.lib_dir) - -+ def _post_install_4xx(self): -+ self._post_install_3xx() -+ - @property - def short_version(self): - """Short version for OpenSSL download URL""" diff --git a/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch new file mode 100644 index 0000000000..581dad9b2e --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch @@ -0,0 +1,50 @@ +From 1db73a72041cdbbeb4ddef01595f25129a8138f7 Mon Sep 17 00:00:00 2001 +From: Tom Greenslade <thomgree@cisco.com> +Date: Thu, 29 Oct 2026 14:17:40 +0000 +Subject: [PATCH] gh-160881: Fix test_is_python_process_non_python_subprocess + with multicall sleep + +_wait_for_process_exec() waited for /proc/{pid}/exe to be named "sleep", +which never happens when sleep is a multicall binary (BusyBox on Alpine, +coreutils-single on RHEL UBI9). Wait instead until the child's executable +differs from the parent's, which means the child has called exec(). + +Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> + +Upstream-Status: Submitted [https://github.com/python/cpython/pull/160901] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + .../test_sampling_profiler/test_children.py | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_children.py b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +index 4b27c6dbb1896c1..9a8d529c4b82444 100644 +--- a/Lib/test/test_profiling/test_sampling_profiler/test_children.py ++++ b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +@@ -85,12 +85,14 @@ def reader(): + return result[0] + + +-def _wait_for_process_exec(proc, name, timeout): ++def _wait_for_process_exec(proc, timeout): + # Wait until a child process calls exec() to replace the forked process +- # executable. Raise AssertionError on timeout. ++ # executable. Don't check the executable name: it can be a multicall ++ # binary such as /bin/busybox. Raise AssertionError on timeout. ++ parent_exe = os.readlink("/proc/self/exe") + for _ in sleeping_retry(timeout, max_delay=0.1): + exe = os.readlink(f"/proc/{proc.pid}/exe") +- if os.path.basename(exe) == name: ++ if exe != parent_exe: + break + + +@@ -625,7 +627,7 @@ def test_is_python_process_non_python_subprocess(self): + ) + + try: +- _wait_for_process_exec(proc, "sleep", SHORT_TIMEOUT) ++ _wait_for_process_exec(proc, SHORT_TIMEOUT) + + self.assertFalse( + is_python_process(proc.pid), diff --git a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch index 525a2ca700..e504325592 100644 --- a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch +++ b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch @@ -1,4 +1,4 @@ -From 8d7fcf04c6513841c7985e64b746b1ef5de0c426 Mon Sep 17 00:00:00 2001 +From 57c51c6746c1efdae1654df443c5d23351b2d131 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@arm.com> Date: Fri, 17 Apr 2026 16:53:42 +0100 Subject: [PATCH] prefer valid entrypoints @@ -16,10 +16,10 @@ Signed-off-by: Ross Burton <ross.burton@arm.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 085378c..ff5cae4 100644 +index 32f4b7d..705f245 100644 --- a/Lib/importlib/metadata/__init__.py +++ b/Lib/importlib/metadata/__init__.py -@@ -1016,7 +1016,7 @@ def entry_points(**params) -> EntryPoints: +@@ -1120,7 +1120,7 @@ def entry_points(**params) -> EntryPoints: :return: EntryPoints for all installed packages. """ eps = itertools.chain.from_iterable( diff --git a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch index 7807827d9a..e24d6b63b1 100644 --- a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch @@ -1,4 +1,4 @@ -From c10d1b295a9fb93836830cce441da3f22e5c7cd7 Mon Sep 17 00:00:00 2001 +From 07c5b43f29e93825e1c0b0fcebf40dc5971d438f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Sun, 12 Sep 2021 21:44:36 +0200 Subject: [PATCH] sysconfig.py: use platlibdir also for purelib @@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index faf8273..0a8bcc0 100644 +index b931551..924401c 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -29,7 +29,7 @@ _INSTALL_SCHEMES = { diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch index a60d082e2f..12d87168ca 100644 --- a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch +++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch @@ -1,4 +1,4 @@ -From f0ac5b479b99bfb7f5e937a941b31a596f4caafc Mon Sep 17 00:00:00 2001 +From c8d8b7aaf96faa50d8bf20c59ed31e7c6a8d698c Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Mon, 5 Aug 2019 15:57:39 +0800 Subject: [PATCH] test_locale.py: correct the test output format @@ -31,10 +31,10 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py -index f918435..1910a43 100644 +index a06c600..38b91d0 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py -@@ -499,7 +499,7 @@ class TestRealLocales(unittest.TestCase): +@@ -500,7 +500,7 @@ class TestRealLocales(unittest.TestCase): self.skipTest('test needs Turkish locale') loc = locale.getlocale(locale.LC_CTYPE) if verbose: diff --git a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch b/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch deleted file mode 100644 index 1b9a7fc942..0000000000 --- a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch +++ /dev/null @@ -1,234 +0,0 @@ -From 3c2a3014af7d73cc34f2498f60fdf863d9bc7c6c Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 13:52:57 +0200 -Subject: [PATCH] gh-148292: Update _ssl._SSLSocket for OpenSSL 4 (#149102) - -The _SSLSocket object now remembers if it gets an EOF error. In this -case, read(), sendfile(), write() and do_handshake method calls fail -with SSLEOFError without calling the underlying OpenSSL function. - -Co-authored-by: Gregory P. Smith <greg@krypto.org> -(cherry picked from commit 7b7fa3f9bf3d7cdf3eb669d02b386e05b39c402a) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3c2a3014af7d] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 82 +++++++++++++++++++ - ...-04-28-17-47-55.gh-issue-148292.oIq3ml.rst | 7 ++ - Modules/_ssl.c | 42 ++++++++++ - 3 files changed, 131 insertions(+) - create mode 100644 Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 965dbc36f096499..03d9e3f9e5e96b5 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -3039,6 +3039,36 @@ class ThreadedEchoServer(threading.Thread): - def stop(self): - self.active = False - -+class TestEOFServer(threading.Thread): -+ def __init__(self): -+ super().__init__() -+ self.listening = threading.Event() -+ self.address = None -+ -+ def run(self): -+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) -+ context.load_cert_chain(CERTFILE) -+ server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ with server_sock: -+ server_sock.settimeout(support.SHORT_TIMEOUT) -+ server_sock.bind((HOST, 0)) -+ server_sock.listen(5) -+ -+ self.address = server_sock.getsockname() -+ self.listening.set() -+ -+ sock, addr = server_sock.accept() -+ sslconn = context.wrap_socket(sock, server_side=True) -+ with sslconn: -+ request = b'' -+ while chunk := sslconn.recv(1024): -+ request += chunk -+ if b'\n' in chunk: -+ break -+ -+ sslconn.sendall(b'server\n') -+ sslconn.shutdown(socket.SHUT_WR) -+ - class AsyncoreEchoServer(threading.Thread): - - # this one's based on asyncore.dispatcher -@@ -5079,6 +5109,58 @@ class ThreadedTests(unittest.TestCase): - if cm.exc_value is not None: - raise cm.exc_value - -+ def test_got_eof(self): -+ # gh-148292: Test that _ssl._SSLSocket behaves the same on all OpenSSL -+ # versions on calling methods after EOF (after the first SSLEOFError). -+ -+ server = TestEOFServer() -+ server.start() -+ if not server.listening.wait(support.SHORT_TIMEOUT): -+ raise RuntimeError("server took too long") -+ self.addCleanup(server.join) -+ -+ context = ssl.create_default_context(cafile=CERTFILE) -+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ sock.settimeout(support.SHORT_TIMEOUT) -+ sock.connect(server.address) -+ sslsock = context.wrap_socket(sock, server_hostname='localhost') -+ with sslsock: -+ sslsock.sendall(b'client\n') -+ # test the _ssl._SSLSocket object, not ssl.SSLSocket -+ sslobj = sslsock._sslobj -+ -+ data = sslobj.read(1024) -+ self.assertEqual(data, b'server\n') -+ -+ # The second read gets EOF error and sets got_eof_error to 1 -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.read(1024) -+ -+ # Following read(), sendfile(), write() and do_handshake() calls -+ # must raise SSLEOFError -+ with self.assertRaises(ssl.SSLEOFError): -+ # The _SSLSocket remembers the previous EOF error -+ # and raises again SSLEOFError -+ sslobj.read(1024) -+ if hasattr(sslobj, 'sendfile'): -+ with open(__file__, "rb") as fp: -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.sendfile(fp.fileno(), 0, 1) -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.write(b'client2\n') -+ with self.assertRaises(ssl.SSLEOFError): -+ sslsock.do_handshake() -+ -+ self.assertEqual(sslsock.pending(), 0) -+ try: -+ sslsock.shutdown(socket.SHUT_WR) -+ except OSError as exc: -+ self.assertEqual(exc.errno, errno.ENOTCONN) -+ else: -+ # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -+ # raise an error -+ pass -+ - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, - "Test needs TLS 1.3 PHA") -diff --git a/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -new file mode 100644 -index 000000000000000..e1f308df5a678e6 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -@@ -0,0 +1,7 @@ -+:mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` for -+OpenSSL 4. The classes now remember if they get a :exc:`ssl.SSLEOFError`. In this -+case, following :meth:`~ssl.SSLSocket.read`, :meth:`!sendfile`, -+:meth:`~ssl.SSLSocket.write`, and :meth:`~ssl.SSLSocket.do_handshake` calls -+raise :exc:`ssl.SSLEOFError` without calling the underlying OpenSSL function. -+Thanks to that, :class:`ssl.SSLSocket` behaves the same on all OpenSSL versions -+on EOF. Patch by Victor Stinner. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index 1603d0ffd559559..376df32b7cb4bd6 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -352,6 +352,16 @@ typedef struct { - * and shutdown methods check for chained exceptions. - */ - PyObject *exc; -+ // gh-148292: If non-zero, read(), sendfile(), write() and do_handshake() -+ // methods raise SSLEOFError without calling the underlying OpenSSL -+ // function. Set to 1 on PY_SSL_ERROR_EOF error. -+ // -+ // On OpenSSL 4, if SSL_read_ex() fails with -+ // SSL_R_UNEXPECTED_EOF_WHILE_READING, the following SSL_read_ex() call -+ // fails with a generic protocol error (ERR_peek_last_error() returns 0). -+ // Use got_eof_error to have the same behavior on OpenSSL 4 and newer and -+ // on OpenSSL 3 and older. -+ int got_eof_error; - } PySSLSocket; - - #define PySSLSocket_CAST(op) ((PySSLSocket *)(op)) -@@ -499,6 +509,10 @@ fill_and_set_sslerror(_sslmodulestate *state, - PyObject *init_value, *msg, *key; - PyUnicodeWriter *writer = NULL; - -+ if (ssl_errno == PY_SSL_ERROR_EOF && sslsock != NULL) { -+ sslsock->got_eof_error = 1; -+ } -+ - if (errcode != 0) { - int lib, reason; - -@@ -654,6 +668,18 @@ PySSL_ChainExceptions(PySSLSocket *sslsock) { - return -1; - } - -+ -+static void -+set_eof_error(PySSLSocket *sslsock) -+{ -+ _sslmodulestate *state = get_state_sock(sslsock); -+ fill_and_set_sslerror(state, sslsock, state->PySSLEOFErrorObject, -+ PY_SSL_ERROR_EOF, -+ "EOF occurred in violation of protocol", -+ __LINE__, 0); -+} -+ -+ - static PyObject * - PySSL_SetError(PySSLSocket *sslsock, const char *filename, int lineno) - { -@@ -901,6 +927,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, - self->server_hostname = NULL; - self->err = err; - self->exc = NULL; -+ self->got_eof_error = 0; - - /* Make sure the SSL error state is initialized */ - ERR_clear_error(); -@@ -1043,6 +1070,11 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2514,6 +2546,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2654,6 +2691,11 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len, - Py_INCREF(sock); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - if (!group_right_1) { - dest = PyBytes_FromStringAndSize(NULL, len); - if (dest == NULL) diff --git a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch b/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch deleted file mode 100644 index 59742290e8..0000000000 --- a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 81911909bc439d6de8ce6a173b0691b3c58e9e1a Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 16:20:25 +0200 -Subject: [PATCH] gh-148292: Remove shutdown() test in test_ssl.test_got_eof() - (#149366) - -The shutdown() behavior depends too much on the operating system and -it's unrelated to the got_eof_error change. - -(cherry picked from commit 1e21cf6fee3830012e458c0fe5dbc6fcd45ace92) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/81911909bc43] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 03d9e3f9e5e96b5..6445f122b4272be 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -5152,14 +5152,6 @@ class ThreadedTests(unittest.TestCase): - sslsock.do_handshake() - - self.assertEqual(sslsock.pending(), 0) -- try: -- sslsock.shutdown(socket.SHUT_WR) -- except OSError as exc: -- self.assertEqual(exc.errno, errno.ENOTCONN) -- else: -- # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -- # raise an error -- pass - - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch index 7167d5b4e8..83ed34d986 100644 --- a/meta/recipes-devtools/python/python3/makerace.patch +++ b/meta/recipes-devtools/python/python3/makerace.patch @@ -1,4 +1,4 @@ -From b41557f570ff4451c477669d6ca5bfacabe21c66 Mon Sep 17 00:00:00 2001 +From be6588c8090edae5379f14dd76f146d383b25e50 Mon Sep 17 00:00:00 2001 From: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue, 13 Jul 2021 23:19:29 +0100 Subject: [PATCH] python3: Fix make race @@ -17,10 +17,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index a7e536d..e946018 100644 +index 24ca285..a1d59e4 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2750,7 +2750,7 @@ COMPILEALL_OPTS=-j0 +@@ -2844,7 +2844,7 @@ COMPILEALL_OPTS=-j0 TEST_MODULES=@TEST_MODULES@ .PHONY: libinstall diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json index 50fdf5d0ea..1919e32957 100644 --- a/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/meta/recipes-devtools/python/python3/python3-manifest.json @@ -117,7 +117,7 @@ "${libdir}/python${PYTHON_MAJMIN}/asyncio", "${libdir}/python${PYTHON_MAJMIN}/concurrent", "${libdir}/python${PYTHON_MAJMIN}/concurrent/futures", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_asyncio.*.so" + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_remote_debugging.*.so" ], "cached": [] }, @@ -129,9 +129,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/wave.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc" - ] + "cached": [] }, "codecs": { "summary": "Python codec", @@ -153,11 +151,7 @@ "${libdir}/python${PYTHON_MAJMIN}/filecmp.py", "${libdir}/python${PYTHON_MAJMIN}/py_compile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/compileall.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/filecmp.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/py_compile.*.pyc" - ] + "cached": [] }, "compression": { "summary": "Python high-level compression support", @@ -165,20 +159,16 @@ "core" ], "files": [ + "${libdir}/python${PYTHON_MAJMIN}/compression/", "${libdir}/python${PYTHON_MAJMIN}/gzip.py", "${libdir}/python${PYTHON_MAJMIN}/tarfile.py", - "${libdir}/python${PYTHON_MAJMIN}/zipfile/", - "${libdir}/python${PYTHON_MAJMIN}/compression/", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so" + "${libdir}/python${PYTHON_MAJMIN}/zipfile/" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gzip.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc" - ] + "cached": [] }, "core": { "summary": "Python interpreter and core modules", - "rdepends": ["compression"], + "rdepends": [], "files": [ "${bindir}/python${PYTHON_MAJMIN}", "${bindir}/python${PYTHON_MAJMIN}.real", @@ -195,6 +185,7 @@ "${libdir}/python${PYTHON_MAJMIN}/_colorize.py", "${libdir}/python${PYTHON_MAJMIN}/_compression.py", "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py", + "${libdir}/python${PYTHON_MAJMIN}/_missing_stdlib_info.py", "${libdir}/python${PYTHON_MAJMIN}/_opcode_metadata.py", "${libdir}/python${PYTHON_MAJMIN}/_py_warnings.py", "${libdir}/python${PYTHON_MAJMIN}/_pyrepl", @@ -214,6 +205,11 @@ "${libdir}/python${PYTHON_MAJMIN}/codeop.py", "${libdir}/python${PYTHON_MAJMIN}/collections", "${libdir}/python${PYTHON_MAJMIN}/collections/abc.py", + "${libdir}/python${PYTHON_MAJMIN}/compression", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common/_streams.py", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd/_zstdfile.py", "${libdir}/python${PYTHON_MAJMIN}/configparser.py", "${libdir}/python${PYTHON_MAJMIN}/contextlib.py", "${libdir}/python${PYTHON_MAJMIN}/copy.py", @@ -253,11 +249,14 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_csv.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_heapq.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_interpreters.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_math_integer.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_opcode.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixsubprocess.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_struct.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_typing.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so", @@ -283,6 +282,8 @@ "${libdir}/python${PYTHON_MAJMIN}/pathlib.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_abc.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_local.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/_os.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/types.py", "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py", "${libdir}/python${PYTHON_MAJMIN}/platform.py", "${libdir}/python${PYTHON_MAJMIN}/posixpath.py", @@ -439,18 +440,18 @@ "${libdir}/python${PYTHON_MAJMIN}/hashlib.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hmac.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hashlib.*.pyc" - ] + "cached": [] }, "ctypes": { "summary": "Python C types support", "rdepends": [ + "compression", "core", "io", "math" @@ -482,14 +483,9 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/_strptime.py", "${libdir}/python${PYTHON_MAJMIN}/calendar.py", - "${libdir}/python${PYTHON_MAJMIN}/datetime.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_datetime.*.so" + "${libdir}/python${PYTHON_MAJMIN}/datetime.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_strptime.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/calendar.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/datetime.*.pyc" - ] + "cached": [] }, "db": { "summary": "Python file-based database support", @@ -505,7 +501,15 @@ "debugger": { "summary": "Python debugger", "rdepends": [ + "asyncio", + "compression", "core", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold" @@ -514,10 +518,7 @@ "${libdir}/python${PYTHON_MAJMIN}/bdb.py", "${libdir}/python${PYTHON_MAJMIN}/pdb.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bdb.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pdb.*.pyc" - ] + "cached": [] }, "dev": { "cached": [], @@ -547,16 +548,22 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/difflib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc" - ] + "cached": [] }, "doctest": { "summary": "Python framework for running examples in docstrings", "rdepends": [ + "asyncio", + "compression", "core", "debugger", "difflib", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold", @@ -565,9 +572,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/doctest.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/doctest.*.pyc" - ] + "cached": [] }, "email": { "summary": "Python email support", @@ -584,9 +589,7 @@ "${libdir}/python${PYTHON_MAJMIN}/email", "${libdir}/python${PYTHON_MAJMIN}/imaplib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imaplib.*.pyc" - ] + "cached": [] }, "ensurepip": { "summary": "Support for bootstrapping the pip installer", @@ -603,9 +606,7 @@ "rdepends": [ "core" ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so" - ], + "files": [], "cached": [] }, "gdbm": { @@ -647,13 +648,12 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/colorsys.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/colorsys.*.pyc" - ] + "cached": [] }, "io": { "summary": "Python low-level I/O", "rdepends": [ + "compression", "core", "math", "netclient" @@ -667,12 +667,7 @@ "${libdir}/python${PYTHON_MAJMIN}/ssl.py", "${libdir}/python${PYTHON_MAJMIN}/tempfile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pyio.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socket.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ssl.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tempfile.*.pyc" - ] + "cached": [] }, "json": { "summary": "Python JSON support", @@ -715,9 +710,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/mailbox.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mailbox.*.pyc" - ] + "cached": [] }, "math": { "summary": "Python math support", @@ -729,9 +722,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/cmath.*.so", "${libdir}/python${PYTHON_MAJMIN}/random.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/random.*.pyc" - ] + "cached": [] }, "mime": { "summary": "Python MIME handling APIs", @@ -741,9 +732,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/quopri.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/quopri.*.pyc" - ] + "cached": [] }, "mmap": { "summary": "Python memory-mapped file support", @@ -818,10 +807,12 @@ "multiprocessing": { "summary": "Python multiprocessing support", "rdepends": [ + "compression", "core", "crypt", "ctypes", "io", + "json", "math", "mmap", "netclient", @@ -861,16 +852,7 @@ "${libdir}/python${PYTHON_MAJMIN}/urllib", "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/base64.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ftplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hmac.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc" - ] + "cached": [] }, "netserver": { "summary": "Python Internet Protocol servers", @@ -881,9 +863,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/socketserver.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socketserver.*.pyc" - ] + "cached": [] }, "numbers": { "summary": "Python number APIs", @@ -895,17 +875,10 @@ "${libdir}/python${PYTHON_MAJMIN}/contextvars.py", "${libdir}/python${PYTHON_MAJMIN}/decimal.py", "${libdir}/python${PYTHON_MAJMIN}/fractions.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_contextvars.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_decimal.*.so", "${libdir}/python${PYTHON_MAJMIN}/numbers.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pydecimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/contextvars.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/decimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fractions.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/numbers.*.pyc" - ] + "cached": [] }, "pickle": { "summary": "Python serialisation/persistence support", @@ -919,12 +892,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pickletools.py", "${libdir}/python${PYTHON_MAJMIN}/shelve.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compat_pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickletools.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shelve.*.pyc" - ] + "cached": [] }, "pkgutil": { "summary": "Python package extension utility support", @@ -944,9 +912,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/plistlib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/plistlib.*.pyc" - ] + "cached": [] }, "pprint": { "summary": "Python pretty-print support", @@ -956,9 +922,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/pprint.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pprint.*.pyc" - ] + "cached": [] }, "profile": { "summary": "Python basic performance profiling support", @@ -969,13 +933,11 @@ "${libdir}/python${PYTHON_MAJMIN}/cProfile.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lsprof.*.so", "${libdir}/python${PYTHON_MAJMIN}/profile.py", + "${libdir}/python${PYTHON_MAJMIN}/profiling", + "${libdir}/python${PYTHON_MAJMIN}/profiling/tracing", "${libdir}/python${PYTHON_MAJMIN}/pstats.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cProfile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/profile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc" - ] + "cached": [] }, "pydoc": { "summary": "Python interactive help support", @@ -987,9 +949,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pydoc.py", "${libdir}/python${PYTHON_MAJMIN}/pydoc_data" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc" - ] + "cached": [] }, "resource": { "summary": "Python resource control interface", @@ -1004,17 +964,13 @@ "shell": { "summary": "Python shell-like functionality", "rdepends": [ - "core", - "stringold" + "core" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/cmd.py", "${libdir}/python${PYTHON_MAJMIN}/shlex.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc" - ] + "cached": [] }, "sqlite3": { "summary": "Python Sqlite3 database support", @@ -1039,9 +995,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_statistics.*.so", "${libdir}/python${PYTHON_MAJMIN}/statistics.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/statistics.*.pyc" - ] + "cached": [] }, "stringold": { "summary": "Common string operations", @@ -1074,10 +1028,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pty.py", "${libdir}/python${PYTHON_MAJMIN}/tty.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pty.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tty.*.pyc" - ] + "cached": [] }, "threading": { "summary": "Python threading & synchronization support", @@ -1089,10 +1040,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_queue.*.so", "${libdir}/python${PYTHON_MAJMIN}/queue.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_threading_local.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/queue.*.pyc" - ] + "cached": [] }, "tkinter": { "summary": "Python Tcl/Tk bindings", @@ -1143,15 +1091,15 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/getpass.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc" - ] + "cached": [] }, "venv": { "summary": "Provides support for creating lightweight virtual environments with their own site directories, optionally isolated from system site directories.", "rdepends": [ + "compression", "core", "logging", + "shell", "stringold" ], "files": [ @@ -1202,11 +1150,10 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/zipapp.py" + "${libdir}/python${PYTHON_MAJMIN}/zipapp.py", + "${libdir}/python${PYTHON_MAJMIN}/zipfile" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipapp.*.pyc" - ] + "cached": [] }, "zoneinfo": { "summary": "IANA time zone support", diff --git a/meta/recipes-devtools/python/python3/valid-dists.patch b/meta/recipes-devtools/python/python3/valid-dists.patch deleted file mode 100644 index 7fe18254e5..0000000000 --- a/meta/recipes-devtools/python/python3/valid-dists.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 66874ce1a9f21b4b00dc85919734d58e6243ca29 Mon Sep 17 00:00:00 2001 -From: "Jason R. Coombs" <jaraco@jaraco.com> -Date: Tue, 23 Jul 2024 08:36:16 -0400 -Subject: [PATCH] Prioritize valid dists to invalid dists when retrieving by - name. - -Closes python/importlib_metadata#489 - -Upstream-Status: Backport [https://github.com/python/importlib_metadata/commit/a65c29adc027b3615154cab73aaedd58a6aa23da] -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - Lib/importlib/metadata/__init__.py | 14 +++- - Lib/importlib/metadata/_itertools.py | 98 ++++++++++++++++++++++++++++ - 2 files changed, 110 insertions(+), 2 deletions(-) - -diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 8ce62dd..085378c 100644 ---- a/Lib/importlib/metadata/__init__.py -+++ b/Lib/importlib/metadata/__init__.py -@@ -21,7 +21,7 @@ import collections - from . import _meta - from ._collections import FreezableDefaultDict, Pair - from ._functools import method_cache, pass_none --from ._itertools import always_iterable, unique_everseen -+from ._itertools import always_iterable, bucket, unique_everseen - from ._meta import PackageMetadata, SimplePath - - from contextlib import suppress -@@ -404,7 +404,7 @@ class Distribution(DeprecatedNonAbstract): - if not name: - raise ValueError("A distribution name is required.") - try: -- return next(iter(cls.discover(name=name))) -+ return next(iter(cls._prefer_valid(cls.discover(name=name)))) - except StopIteration: - raise PackageNotFoundError(name) - -@@ -428,6 +428,16 @@ class Distribution(DeprecatedNonAbstract): - resolver(context) for resolver in cls._discover_resolvers() - ) - -+ @staticmethod -+ def _prefer_valid(dists: Iterable[Distribution]) -> Iterable[Distribution]: -+ """ -+ Prefer (move to the front) distributions that have metadata. -+ -+ Ref python/importlib_resources#489. -+ """ -+ buckets = bucket(dists, lambda dist: bool(dist.metadata)) -+ return itertools.chain(buckets[True], buckets[False]) -+ - @staticmethod - def at(path: str | os.PathLike[str]) -> Distribution: - """Return a Distribution for the indicated metadata path. -diff --git a/Lib/importlib/metadata/_itertools.py b/Lib/importlib/metadata/_itertools.py -index d4ca9b9..79d3719 100644 ---- a/Lib/importlib/metadata/_itertools.py -+++ b/Lib/importlib/metadata/_itertools.py -@@ -1,3 +1,4 @@ -+from collections import defaultdict, deque - from itertools import filterfalse - - -@@ -71,3 +72,100 @@ def always_iterable(obj, base_type=(str, bytes)): - return iter(obj) - except TypeError: - return iter((obj,)) -+ -+ -+# Copied from more_itertools 10.3 -+class bucket: -+ """Wrap *iterable* and return an object that buckets the iterable into -+ child iterables based on a *key* function. -+ -+ >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] -+ >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character -+ >>> sorted(list(s)) # Get the keys -+ ['a', 'b', 'c'] -+ >>> a_iterable = s['a'] -+ >>> next(a_iterable) -+ 'a1' -+ >>> next(a_iterable) -+ 'a2' -+ >>> list(s['b']) -+ ['b1', 'b2', 'b3'] -+ -+ The original iterable will be advanced and its items will be cached until -+ they are used by the child iterables. This may require significant storage. -+ -+ By default, attempting to select a bucket to which no items belong will -+ exhaust the iterable and cache all values. -+ If you specify a *validator* function, selected buckets will instead be -+ checked against it. -+ -+ >>> from itertools import count -+ >>> it = count(1, 2) # Infinite sequence of odd numbers -+ >>> key = lambda x: x % 10 # Bucket by last digit -+ >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only -+ >>> s = bucket(it, key=key, validator=validator) -+ >>> 2 in s -+ False -+ >>> list(s[2]) -+ [] -+ -+ """ -+ -+ def __init__(self, iterable, key, validator=None): -+ self._it = iter(iterable) -+ self._key = key -+ self._cache = defaultdict(deque) -+ self._validator = validator or (lambda x: True) -+ -+ def __contains__(self, value): -+ if not self._validator(value): -+ return False -+ -+ try: -+ item = next(self[value]) -+ except StopIteration: -+ return False -+ else: -+ self._cache[value].appendleft(item) -+ -+ return True -+ -+ def _get_values(self, value): -+ """ -+ Helper to yield items from the parent iterator that match *value*. -+ Items that don't match are stored in the local cache as they -+ are encountered. -+ """ -+ while True: -+ # If we've cached some items that match the target value, emit -+ # the first one and evict it from the cache. -+ if self._cache[value]: -+ yield self._cache[value].popleft() -+ # Otherwise we need to advance the parent iterator to search for -+ # a matching item, caching the rest. -+ else: -+ while True: -+ try: -+ item = next(self._it) -+ except StopIteration: -+ return -+ item_value = self._key(item) -+ if item_value == value: -+ yield item -+ break -+ elif self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ def __iter__(self): -+ for item in self._it: -+ item_value = self._key(item) -+ if self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ yield from self._cache.keys() -+ -+ def __getitem__(self, value): -+ if not self._validator(value): -+ return iter(()) -+ -+ return self._get_values(value) diff --git a/meta/recipes-devtools/python/python3_3.14.10.bb b/meta/recipes-devtools/python/python3_3.15.2.bb similarity index 98% rename from meta/recipes-devtools/python/python3_3.14.10.bb rename to meta/recipes-devtools/python/python3_3.15.2.bb index c50c4d4bab..43630bb48e 100644 --- a/meta/recipes-devtools/python/python3_3.14.10.bb +++ b/meta/recipes-devtools/python/python3_3.15.2.bb @@ -18,19 +18,17 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://makerace.patch \ file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \ file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \ - file://valid-dists.patch \ file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \ file://0001-prefer-valid-entrypoints.patch \ - file://0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch \ - file://0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch \ - file://0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch \ + file://0001-configure-clear-RUNSHARED-when-cross-compiling.patch \ + file://0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch \ " SRC_URI:append:class-native = " \ file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ " -SRC_URI[sha256sum] = "de414a57119abef52784d8993e341d53aed635fc2b05c2607d9f98a2c5b72032" +SRC_URI[sha256sum] = "8b5536d280142ecf6cdfe15d12a21ba1c65e300bbf7b28a8d0cdb849575797de" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" @@ -41,7 +39,7 @@ inherit upstream-stable-release-point CVE_PRODUCT = "python:python python_software_foundation:python cpython" -PYTHON_MAJMIN = "3.14" +PYTHON_MAJMIN = "3.15" S = "${UNPACKDIR}/Python-${PV}" @@ -75,7 +73,7 @@ DEPENDS = "\ DEPENDS:append:class-target = " python3-native" DEPENDS:append:class-nativesdk = " python3-native" -EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat" +EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat --without-system-libmpdec" EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3 PLATFORM_TRIPLET=${HOST_ARCH}-${HOST_OS}" EXTRA_OECONF:append:class-nativesdk = " --with-build-python=nativepython3" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [OE-core] [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 2026-11-04 15:28 ` [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Jaipaul Cheernam 2026-11-04 15:28 ` [PATCH v6 2/2] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam @ 2026-11-05 6:08 ` Mathieu Dubois-Briand 2026-11-05 12:30 ` Jaipaul Cheernam 1 sibling, 1 reply; 28+ messages in thread From: Mathieu Dubois-Briand @ 2026-11-05 6:08 UTC (permalink / raw) To: Jaipaul Cheernam, openembedded-core On Wed Nov 4, 2026 at 4:28 PM CET, Jaipaul Cheernam wrote: > ChangeLog: https://setuptools.pypa.io/en/stable/history.html#v84-2-1 > > Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> > --- Hi Jaipaul, Thanks for this upgrade. I suspect this one in now breaking some other package: ERROR: lib32-systemtap-5.6-r0 do_install: Execution of '/srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183' failed with exit code 1 ... ERROR: helpersdt-0.1.0-cp315-cp315-linux_i686.whl is not a supported wheel on this platform. | make[3]: *** [Makefile:631: install-exec-local] Error 1 | make[3]: Leaving directory '/srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/build/python' | make[2]: Leaving directory '/srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/build/python' | make[2]: *** [Makefile:499: install-am] Error 2 | make[1]: *** [Makefile:2290: install-recursive] Error 1 | make[1]: Leaving directory '/srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/build' | make: *** [Makefile:2689: install] Error 2 | ERROR: oe_runmake failed | WARNING: /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183:227 exit 1 from 'exit 1' | WARNING: Backtrace (BB generated script): | #1: bbfatal_log, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 227 | #2: die, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 211 | #3: oe_runmake, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 206 | #4: autotools_do_install, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 189 | #5: do_install, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 166 | #6: main, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 240 NOTE: recipe lib32-systemtap-5.6-r0: task do_install: Failed https://autobuilder.yoctoproject.org/valkyrie/#/builders/17/builds/4802 https://autobuilder.yoctoproject.org/valkyrie/#/builders/19/builds/4945 Can you have a loot at the issue? Thanks, Mathieu -- Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [OE-core] [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 2026-11-05 6:08 ` [OE-core] [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Mathieu Dubois-Briand @ 2026-11-05 12:30 ` Jaipaul Cheernam 0 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-05 12:30 UTC (permalink / raw) To: Mathieu Dubois-Briand, openembedded-core On 2026-11-05 07:08, Mathieu Dubois-Briand wrote: > I suspect this one in now breaking some other package: > > ERROR: lib32-systemtap-5.6-r0 do_install: Execution of '/srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183' failed with exit code 1 > ... > ERROR: helpersdt-0.1.0-cp315-cp315-linux_i686.whl is not a supported wheel on this platform. > | make[3]: *** [Makefile:631: install-exec-local] Error 1 > | make[3]: Leaving directory '/srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/build/python' > | make[2]: Leaving directory '/srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/build/python' > | make[2]: *** [Makefile:499: install-am] Error 2 > | make[1]: *** [Makefile:2290: install-recursive] Error 1 > | make[1]: Leaving directory '/srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/build' > | make: *** [Makefile:2689: install] Error 2 > | ERROR: oe_runmake failed > | WARNING: /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183:227 exit 1 from 'exit 1' > | WARNING: Backtrace (BB generated script): > | #1: bbfatal_log, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 227 > | #2: die, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 211 > | #3: oe_runmake, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 206 > | #4: autotools_do_install, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 189 > | #5: do_install, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 166 > | #6: main, /srv/pokybuild/yocto-worker/qemux86-world-alt/build/build/tmp/work/x86-pokymllib32-linux/lib32-systemtap/5.6/temp/run.do_install.1847183, line 240 > NOTE: recipe lib32-systemtap-5.6-r0: task do_install: Failed > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/17/builds/4802 > https://autobuilder.yoctoproject.org/valkyrie/#/builders/19/builds/4945 Hi Mathieu, Thanks for testing this upgarde and now I have sent v7 which includes fix for abouve systemtap failure. Regards, Jaipaul ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v7 0/4] python3: Upgrade 3.14.10 -> 3.15.2 2026-10-12 9:00 ` [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 Jaipaul Cheernam ` (4 preceding siblings ...) 2026-11-04 15:28 ` [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Jaipaul Cheernam @ 2026-11-05 12:24 ` Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 1/4] systemtap: mark python3.stpm libpython patch as backport Jaipaul Cheernam ` (3 more replies) 5 siblings, 4 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-05 12:24 UTC (permalink / raw) To: openembedded-core Python3 upgrade need python3-dbus and python3-maturin upgrades also which are already under review so, please apply this series on that Jaipaul Cheernam (4): systemtap: mark python3.stpm libpython patch as backport systemtap: use installer instead of pip for HelperSDT wheel python3-setuptools: Upgrade 84.0.0 -> 84.2.1 python3: Upgrade 3.14.10 -> 3.15.2 meta/classes-recipe/python3-dir.bbclass | 2 +- ...nfig.py-make-it-possible-to-substite.patch | 10 +- ...84.0.0.bb => python3-setuptools_84.2.1.bb} | 2 +- ...shebang-overflow-on-python-config.py.patch | 6 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 6 +- ...-qemu-wrapper-when-gathering-profile.patch | 6 +- ...est_sysconfig-for-posix_user-purelib.patch | 6 +- ...clear-RUNSHARED-when-cross-compiling.patch | 46 ++++ ...146207-Add-support-for-OpenSSL-4.0.0.patch | 254 ------------------ ...st_is_python_process_non_python_subp.patch | 50 ++++ .../0001-prefer-valid-entrypoints.patch | 6 +- ...g.py-use-platlibdir-also-for-purelib.patch | 4 +- ...le.py-correct-the-test-output-format.patch | 6 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 6 +- .../python/python3/python3-manifest.json | 199 +++++--------- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.10.bb => python3_3.15.2.bb} | 12 +- ...-record-the-installed-libpython-path.patch | 41 ++- ...staller-instead-of-pip-for-helpersdt.patch | 48 ++++ ...t-install-build-paths-with-the-wheel.patch | 61 ----- .../recipes-kernel/systemtap/systemtap_5.6.bb | 4 +- 24 files changed, 272 insertions(+), 944 deletions(-) rename meta/recipes-devtools/python/{python3-setuptools_84.0.0.bb => python3-setuptools_84.2.1.bb} (94%) create mode 100644 meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch create mode 100644 meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.10.bb => python3_3.15.2.bb} (98%) create mode 100644 meta/recipes-kernel/systemtap/systemtap/0001-systemtap-use-installer-instead-of-pip-for-helpersdt.patch delete mode 100644 meta/recipes-kernel/systemtap/systemtap/0002-python-don-t-install-build-paths-with-the-wheel.patch ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v7 1/4] systemtap: mark python3.stpm libpython patch as backport 2026-11-05 12:24 ` [PATCH v7 0/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam @ 2026-11-05 12:24 ` Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 2/4] systemtap: use installer instead of pip for HelperSDT wheel Jaipaul Cheernam ` (2 subsequent siblings) 3 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-05 12:24 UTC (permalink / raw) To: openembedded-core The python3.stpm libpython-path patch was merged upstream after the 5.6 release (commit b9bd609254f5), so it is a backport now Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...-record-the-installed-libpython-path.patch | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-python3.stpm-record-the-installed-libpython-path.patch b/meta/recipes-kernel/systemtap/systemtap/0001-python3.stpm-record-the-installed-libpython-path.patch index 93efec941b..9759434521 100644 --- a/meta/recipes-kernel/systemtap/systemtap/0001-python3.stpm-record-the-installed-libpython-path.patch +++ b/meta/recipes-kernel/systemtap/systemtap/0001-python3.stpm-record-the-installed-libpython-path.patch @@ -1,33 +1,26 @@ -From 0387b9416ad7c25d71685441e1046f1c72cb1d42 Mon Sep 17 00:00:00 2001 +From b9bd609254f54fedba0b7155c63a3b3f6d84993c Mon Sep 17 00:00:00 2001 From: Jaipaul Cheernam <jaipaul.cheernam@est.tech> -Date: Sat, 19 Sep 2026 13:12:44 +0000 -Subject: [PATCH 1/2] python3.stpm: record the installed libpython path +Date: Wed, 23 Sep 2026 18:52:56 -0400 +Subject: [PATCH] PR34652: python3.stpm: record the installed libpython path tapset/python3.stpm is generated at build time and installed, and its -stap_python3_libpython macro is the module argument of the @cast()s in -tapset/python3.stp: +stap_python3_libpython macro is the module argument of the @cast()s +in tapset/python3.stp. @cast module names are taken literally, so +the macro has to name libpython as it exists on the machine stap is +tracing. - @cast(@object, "PyFrameObject", @stap_python3_libpython) +configure instead derives it from sysconfig's LIBDIR for the +interpreter that built HelperSDT. When cross compiling that is a +directory in the build host's staging area, which exists on no +machine but the builder, so every python3 probe on the installed +system fails to resolve PyFrameObject. -@cast module names are taken literally -- dwarf_cast_expanding_visitor -resolves them with find_executable(module, "", sess.sysenv), i.e. with no -sysroot translation -- so the macro has to name libpython as it exists on -the machine stap is tracing. +Keep only the library soname from sysconfig and anchor it at the +$(libdir) being installed into, so the macro names the installed +library. For a native build where the interpreter's LIBDIR is +$(libdir) the generated value is unchanged. -configure instead derives it from sysconfig's LIBDIR for the interpreter -that built HelperSDT. When cross compiling that is a directory in the -build host's staging area, which exists on no machine but the builder, so -every python3 probe on the installed system fails to resolve -PyFrameObject. The installed file also ends up carrying a build -directory, which distro QA checks reject (OpenEmbedded's buildpaths test -flags it as a packaging error). - -Keep only the library soname from sysconfig and anchor it at the $(libdir) -being installed into, so the macro names the installed library. For a -native build where the interpreter's LIBDIR is $(libdir) -- the usual case --- the generated value is unchanged. - -Upstream-Status: Submitted [https://inbox.sourceware.org/systemtap/20260919135744.78642-2-jaipaul.cheernam@est.tech/] +Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=b9bd609254f54fedba0b7155c63a3b3f6d84993c] Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- Makefile.am | 10 +++++++++- ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v7 2/4] systemtap: use installer instead of pip for HelperSDT wheel 2026-11-05 12:24 ` [PATCH v7 0/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 1/4] systemtap: mark python3.stpm libpython patch as backport Jaipaul Cheernam @ 2026-11-05 12:24 ` Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 3/4] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 4/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 3 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-05 12:24 UTC (permalink / raw) To: openembedded-core Use pypa installer to install the cross-compiled HelperSDT wheel, avoiding pip's host platform tag check that breaks 32-bit builds on 64-bit hosts. This also removes the need for the previous RECORD and direct_url.json cleanup. Tested on qemux86 (core2-32). Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...staller-instead-of-pip-for-helpersdt.patch | 48 +++++++++++++++ ...t-install-build-paths-with-the-wheel.patch | 61 ------------------- .../recipes-kernel/systemtap/systemtap_5.6.bb | 4 +- 3 files changed, 50 insertions(+), 63 deletions(-) create mode 100644 meta/recipes-kernel/systemtap/systemtap/0001-systemtap-use-installer-instead-of-pip-for-helpersdt.patch delete mode 100644 meta/recipes-kernel/systemtap/systemtap/0002-python-don-t-install-build-paths-with-the-wheel.patch diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-systemtap-use-installer-instead-of-pip-for-helpersdt.patch b/meta/recipes-kernel/systemtap/systemtap/0001-systemtap-use-installer-instead-of-pip-for-helpersdt.patch new file mode 100644 index 0000000000..05323edaa5 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/0001-systemtap-use-installer-instead-of-pip-for-helpersdt.patch @@ -0,0 +1,48 @@ +From 070fe259ffe163b12aea7fae15dc9f8c6ae6d4c0 Mon Sep 17 00:00:00 2001 +From: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +Date: Thu, 5 Nov 2026 09:00:00 +0000 +Subject: [PATCH] systemtap: use installer instead of pip for HelperSDT + +Pip rejects cross-compiled wheels due to platform tag mismatch, +breaking 32-bit builds on 64-bit hosts. + +Use pypa installer to install the wheel without platform checks, +eliminating the need for RECORD and direct_url.json cleanup. + +Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=34959] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + python/Makefile.am | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/python/Makefile.am b/python/Makefile.am +index 0cb608d5a..226800ad6 100644 +--- a/python/Makefile.am ++++ b/python/Makefile.am +@@ -35,13 +35,21 @@ if HAVE_PYTHON3_PROBES + endif + + +-# Note that we're installing from the wheel we just built. ++# Install the wheel we just built with pypa "installer" rather than pip. ++# ++# The wheel is cross-built and tagged for the target, but it is installed ++# with the native interpreter; pip rejects a wheel whose platform tag does ++# not match the running interpreter, so it cannot install a cross-built ++# wheel. installer simply unpacks the wheel and ignores the tag. ++# ++# --compile-bytecode=0 avoids writing .pyc files that record build paths ++# (they are regenerated on first import), and installer does not write a ++# PEP 610 direct_url.json, so neither needs cleaning up afterwards. + install-exec-local: + if HAVE_PYTHON3_PROBES +- $(PYTHON3) -m pip install $(shell readlink -f $(builddir))/py3build/*.whl \ +- $(if $(DESTDIR),--root $(DESTDIR)) --prefix $(prefix) \ +- --no-deps --no-index --no-build-isolation \ +- --ignore-installed --verbose ++ $(PYTHON3) -m installer --compile-bytecode=0 \ ++ $(if $(DESTDIR),--destdir $(DESTDIR)) --prefix $(prefix) \ ++ $(shell readlink -f $(builddir))/py3build/*.whl + endif + + clean-local: diff --git a/meta/recipes-kernel/systemtap/systemtap/0002-python-don-t-install-build-paths-with-the-wheel.patch b/meta/recipes-kernel/systemtap/systemtap/0002-python-don-t-install-build-paths-with-the-wheel.patch deleted file mode 100644 index 146f0a456f..0000000000 --- a/meta/recipes-kernel/systemtap/systemtap/0002-python-don-t-install-build-paths-with-the-wheel.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 3f34320eb37bb583b7bbcec01347a52527991391 Mon Sep 17 00:00:00 2001 -From: Jaipaul Cheernam <jaipaul.cheernam@est.tech> -Date: Sun, 20 Sep 2026 08:12:00 +0000 -Subject: [PATCH 2/2] python: don't install build paths with the wheel - -pip byte-compiles the module it installs using the paths it writes to, so -with DESTDIR set every .pyc in HelperSDT/__pycache__ records a -$(DESTDIR)-prefixed source file name, and PEP 610 direct_url.json records -the file:// URL of the wheel in the build tree. Neither names anything -that exists on the installed system, and both make the install -unreproducible; distro QA checks reject them (OpenEmbedded's buildpaths -test fails the build on all four files). - -Pass --no-compile, so the bytecode is generated on first import in the -right place, and delete direct_url.json after installing. Its line in -RECORD has to go as well: the line holds a sha256 of the file, and thus of -the build directory the wheel sat in, so leaving it in place keeps RECORD -differing between two builds of the same source in different directories --- and describes a file that is no longer installed. - -Upstream-Status: Submitted [https://inbox.sourceware.org/systemtap/20260919135744.78642-3-jaipaul.cheernam@est.tech/] -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - python/Makefile.am | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/python/Makefile.am b/python/Makefile.am -index 0cb608d..ebd1465 100644 ---- a/python/Makefile.am -+++ b/python/Makefile.am -@@ -36,12 +36,29 @@ endif - - - # Note that we're installing from the wheel we just built. -+# -+# --no-compile: pip byte-compiles with the paths it writes to, so with -+# DESTDIR set the .pyc files record $(DESTDIR)-prefixed source names, which -+# are wrong on the installed system (and defeat reproducible builds). The -+# bytecode is regenerated on first import instead. -+# -+# PEP 610 direct_url.json records the file:// URL of the wheel in the build -+# tree, which is likewise meaningless once installed. Delete it, and drop -+# its line from RECORD too: that line holds a hash of the file, and so of -+# the build directory, which would keep RECORD varying between builds and -+# would describe a file that is not installed. - install-exec-local: - if HAVE_PYTHON3_PROBES - $(PYTHON3) -m pip install $(shell readlink -f $(builddir))/py3build/*.whl \ - $(if $(DESTDIR),--root $(DESTDIR)) --prefix $(prefix) \ -- --no-deps --no-index --no-build-isolation \ -+ --no-deps --no-index --no-build-isolation --no-compile \ - --ignore-installed --verbose -+ rm -f $(DESTDIR)$(python3dir)/*.dist-info/direct_url.json -+ for r in $(DESTDIR)$(python3dir)/*.dist-info/RECORD; do \ -+ if test -f "$$r"; then \ -+ sed -i '\|/direct_url\.json,|d' "$$r"; \ -+ fi; \ -+ done - endif - - clean-local: diff --git a/meta/recipes-kernel/systemtap/systemtap_5.6.bb b/meta/recipes-kernel/systemtap/systemtap_5.6.bb index b58bb1543b..4a9a16cac8 100644 --- a/meta/recipes-kernel/systemtap/systemtap_5.6.bb +++ b/meta/recipes-kernel/systemtap/systemtap_5.6.bb @@ -12,7 +12,7 @@ SRC_URI += " \ file://0001-improve-reproducibility-for-c-compiling.patch \ file://0001-staprun-address-ncurses-6.3-failures.patch \ file://0001-python3.stpm-record-the-installed-libpython-path.patch \ - file://0002-python-don-t-install-build-paths-with-the-wheel.patch \ + file://0001-systemtap-use-installer-instead-of-pip-for-helpersdt.patch \ " DEPENDS = "elfutils" @@ -34,7 +34,7 @@ PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3" PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" -PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native python3-pip-native python3-wheel-native" +PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native python3-pip-native python3-wheel-native python3-installer-native" PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod" PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v7 3/4] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 2026-11-05 12:24 ` [PATCH v7 0/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 1/4] systemtap: mark python3.stpm libpython patch as backport Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 2/4] systemtap: use installer instead of pip for HelperSDT wheel Jaipaul Cheernam @ 2026-11-05 12:24 ` Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 4/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 3 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-05 12:24 UTC (permalink / raw) To: openembedded-core ChangeLog: https://setuptools.pypa.io/en/stable/history.html#v84-2-1 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- ...ils-sysconfig.py-make-it-possible-to-substite.patch | 10 +++++----- ...tuptools_84.0.0.bb => python3-setuptools_84.2.1.bb} | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) rename meta/recipes-devtools/python/{python3-setuptools_84.0.0.bb => python3-setuptools_84.2.1.bb} (94%) diff --git a/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch b/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch index f6313fb1a9..df9d5f77c3 100644 --- a/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch +++ b/meta/recipes-devtools/python/python3-setuptools/0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch @@ -1,4 +1,4 @@ -From fe651521b9d970a84432b37d2731932a4862deb2 Mon Sep 17 00:00:00 2001 +From dfebab446e3148e3ec170e06aa57b703a655f772 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Wed, 11 May 2022 21:41:14 +0200 Subject: [PATCH] _distutils/sysconfig.py: make it possible to substite the @@ -20,10 +20,10 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de> 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py -index 7ddc869..01a06af 100644 +index 4792b58..cf1fbc5 100644 --- a/setuptools/_distutils/sysconfig.py +++ b/setuptools/_distutils/sysconfig.py -@@ -134,6 +134,8 @@ def get_python_inc(plat_specific: bool = False, prefix: str | None = None) -> st +@@ -133,6 +133,8 @@ def get_python_inc(plat_specific: bool = False, prefix: str | None = None) -> st sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ default_prefix = BASE_EXEC_PREFIX if plat_specific else BASE_PREFIX @@ -32,7 +32,7 @@ index 7ddc869..01a06af 100644 resolved_prefix = prefix if prefix is not None else default_prefix # MinGW imitates posix like layout, but os.name != posix os_name = "posix" if is_mingw() else os.name -@@ -246,7 +248,13 @@ def get_python_lib( +@@ -245,7 +247,13 @@ def get_python_lib( early_prefix = prefix @@ -47,7 +47,7 @@ index 7ddc869..01a06af 100644 if standard_lib: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX else: -@@ -261,7 +269,7 @@ def get_python_lib( +@@ -260,7 +268,7 @@ def get_python_lib( # Pure Python libdir = "lib" implementation = 'pypy' if IS_PYPY else 'python' diff --git a/meta/recipes-devtools/python/python3-setuptools_84.0.0.bb b/meta/recipes-devtools/python/python3-setuptools_84.2.1.bb similarity index 94% rename from meta/recipes-devtools/python/python3-setuptools_84.0.0.bb rename to meta/recipes-devtools/python/python3-setuptools_84.2.1.bb index 648b084a27..f2dd481835 100644 --- a/meta/recipes-devtools/python/python3-setuptools_84.0.0.bb +++ b/meta/recipes-devtools/python/python3-setuptools_84.2.1.bb @@ -11,7 +11,7 @@ CVE_PRODUCT = "python3-setuptools python:setuptools" SRC_URI += " \ file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch" -SRC_URI[sha256sum] = "f4695c21257f0d9b537ec2692c941d02ee143b7cc1276941349a546573b2ef73" +SRC_URI[sha256sum] = "3ff8b3b5492a0aa66960f4419365a86b84e013070d4313e4d4a6894f5d64d6bc" do_install:append() { # setuptools ships Windows launcher executables (cli*.exe, gui*.exe). ^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH v7 4/4] python3: Upgrade 3.14.10 -> 3.15.2 2026-11-05 12:24 ` [PATCH v7 0/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam ` (2 preceding siblings ...) 2026-11-05 12:24 ` [PATCH v7 3/4] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Jaipaul Cheernam @ 2026-11-05 12:24 ` Jaipaul Cheernam 3 siblings, 0 replies; 28+ messages in thread From: Jaipaul Cheernam @ 2026-11-05 12:24 UTC (permalink / raw) To: openembedded-core ReleaseNotes: https://docs.python.org/3/whatsnew/changelog.html#python-3-15-2-final - Drop patches which are part of upstream release - 0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch - 0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch - 0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch - valid-dists.patch - Add --without-system-libmpdec as EXTRA_OECONF configure option (--with-system-libmpdec is needed new package mpdecimal [1]) - Bump PYTHON_BASEVERSION to 3.15 in python3-dir.bbclass - Update python3-manifest - Refresh existing patches - Add two fixes needed for the new release - 0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch - 0001-configure-clear-RUNSHARED-when-cross-compiling.patch Verification: - Built python3 for glibc and musl - verified ptest for all 34 python3 packages which supports ptest [1] https://github.com/python/cpython/issues/115119 Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> --- meta/classes-recipe/python3-dir.bbclass | 2 +- ...shebang-overflow-on-python-config.py.patch | 6 +- ...e-stdin-I-O-errors-same-way-as-maste.patch | 2 +- ...-use-prefix-value-from-build-configu.patch | 6 +- ...-qemu-wrapper-when-gathering-profile.patch | 6 +- ...est_sysconfig-for-posix_user-purelib.patch | 6 +- ...clear-RUNSHARED-when-cross-compiling.patch | 46 ++++ ...146207-Add-support-for-OpenSSL-4.0.0.patch | 254 ------------------ ...st_is_python_process_non_python_subp.patch | 50 ++++ .../0001-prefer-valid-entrypoints.patch | 6 +- ...g.py-use-platlibdir-also-for-purelib.patch | 4 +- ...le.py-correct-the-test-output-format.patch | 6 +- ...Update-_ssl._SSLSocket-for-OpenSSL-4.patch | 234 ---------------- ...utdown-test-in-test_ssl.test_got_eof.patch | 41 --- .../python/python3/makerace.patch | 6 +- .../python/python3/python3-manifest.json | 199 +++++--------- .../python/python3/valid-dists.patch | 164 ----------- .../{python3_3.14.10.bb => python3_3.15.2.bb} | 12 +- 18 files changed, 199 insertions(+), 851 deletions(-) create mode 100644 meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch create mode 100644 meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch delete mode 100644 meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch delete mode 100644 meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch delete mode 100644 meta/recipes-devtools/python/python3/valid-dists.patch rename meta/recipes-devtools/python/{python3_3.14.10.bb => python3_3.15.2.bb} (98%) diff --git a/meta/classes-recipe/python3-dir.bbclass b/meta/classes-recipe/python3-dir.bbclass index 3eb0dea9b2..b26621f365 100644 --- a/meta/classes-recipe/python3-dir.bbclass +++ b/meta/classes-recipe/python3-dir.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -PYTHON_BASEVERSION = "3.14" +PYTHON_BASEVERSION = "3.15" PYTHON_ABI = "" PYTHON_DIR = "python${PYTHON_BASEVERSION}" PYTHON_PN = "python3" diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 79fee9803f..f5acfb789c 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch @@ -1,4 +1,4 @@ -From 3f2df0e1fce8c7425998dade00d084f1b101a982 Mon Sep 17 00:00:00 2001 +From c7712b4345e16786ee237427537b83787022c733 Mon Sep 17 00:00:00 2001 From: Paulo Neves <ptsneves@gmail.com> Date: Tue, 7 Jun 2022 16:16:41 +0200 Subject: [PATCH] Avoid shebang overflow on python-config.py @@ -16,10 +16,10 @@ Upstream-Status: Denied [distribution] 1 file changed, 2 insertions(+) diff --git a/Makefile.pre.in b/Makefile.pre.in -index e946018..345ed29 100644 +index a1d59e4..26a90e6 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2844,6 +2844,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh +@@ -2938,6 +2938,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh @ # Substitution happens here, as the completely-expanded BINDIR @ # is not available in configure sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py diff --git a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch index 532adfe69a..322de292ce 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch @@ -1,4 +1,4 @@ -From 9cd44429215352eb2753e0fd8e25fef24f714006 Mon Sep 17 00:00:00 2001 +From 1e6d7f34c558ed05f7d35f4a2b86f079318fb6be Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Thu, 16 Sep 2021 16:35:37 +0200 Subject: [PATCH] Lib/pty.py: handle stdin I/O errors same way as master I/O diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch index 580d38a403..ce2efd431c 100644 --- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch +++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch @@ -1,4 +1,4 @@ -From b5aad6a9b6c5add7a85861aed8aa030c1ad3d52f Mon Sep 17 00:00:00 2001 +From 7338a6821cdc4e7cab17ca255e484bf19b4b3670 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Fri, 17 Nov 2023 14:26:32 +0100 Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration @@ -18,10 +18,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index 0a8bcc0..a2341f2 100644 +index 924401c..0ff84f7 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py -@@ -539,12 +539,12 @@ def _init_config_vars(): +@@ -537,12 +537,12 @@ def _init_config_vars(): _CONFIG_VARS['py_version'] = _PY_VERSION _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT _CONFIG_VARS['py_version_nodot'] = _PY_VERSION_SHORT_NO_DOT diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch index d3f46c372a..dd5a87cd54 100644 --- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch +++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch @@ -1,4 +1,4 @@ -From d6f77e3a934616d1f6c083b7144c50a32e08b70a Mon Sep 17 00:00:00 2001 +From 61b446b8554b91b93f8ae40c654abf9d8a77145d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 30 Jan 2019 12:41:04 +0100 Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data @@ -15,10 +15,10 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 526d500..a7e536d 100644 +index 95fefcc..24ca285 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -864,8 +864,7 @@ profile-run-stamp: +@@ -879,8 +879,7 @@ profile-run-stamp: # enabled. $(MAKE) profile-gen-stamp # Next, run the profile task to generate the profile information. diff --git a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch index 0864f23926..6cc7ae187e 100644 --- a/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-Update-test_sysconfig-for-posix_user-purelib.patch @@ -1,4 +1,4 @@ -From c608cb4b3c8c31f1aa25ad1264ff58733fb99769 Mon Sep 17 00:00:00 2001 +From f1e23d641d6edb5bb82cd24272b7b1f8c42c64dd Mon Sep 17 00:00:00 2001 From: Wentao Zhang <wentao.zhang@windriver.com> Date: Mon, 20 Mar 2023 13:39:52 +0800 Subject: [PATCH] Update test_sysconfig for posix_user purelib @@ -22,10 +22,10 @@ Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py -index 1fe4b68..383142a 100644 +index ce3a3c6..4eb65fb 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py -@@ -435,7 +435,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): +@@ -432,7 +432,7 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): expected = os.path.normpath(global_path.replace(base, user, 1)) # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, # whereas posix_prefix does. diff --git a/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch new file mode 100644 index 0000000000..f5f09e81ee --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-configure-clear-RUNSHARED-when-cross-compiling.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +Date: Tue, 27 Oct 2026 10:00:00 +0000 +Subject: [PATCH] configure: clear RUNSHARED when cross compiling + +Since 3.15 the checksharedmods target runs the host build python with the +target LD_LIBRARY_PATH, which breaks musl cross builds (host cannot load +libc.so). Clear RUNSHARED for cross builds as before. + +Upstream-Status: Submitted [https://github.com/python/cpython/issues/160924] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + configure | 4 ++++ + configure.ac | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/configure b/configure +index 6f7ff1b..9702135 100755 +--- a/configure ++++ b/configure +@@ -7867,6 +7867,10 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 + printf "%s\n" "$LDLIBRARY" >&6; } + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOSTRUNNER" >&5 + printf %s "checking HOSTRUNNER... " >&6; } +diff --git a/configure.ac b/configure.ac +index 9923805..9e86057 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1670,6 +1670,10 @@ else # shared is disabled + fi + AC_MSG_RESULT([$LDLIBRARY]) + ++if test "$cross_compiling" = yes; then ++ RUNSHARED= ++fi ++ + # HOSTRUNNER - Program to run CPython for the host platform + AC_MSG_CHECKING([HOSTRUNNER]) + if test -z "$HOSTRUNNER" diff --git a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch b/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch deleted file mode 100644 index 37f55de65c..0000000000 --- a/meta/recipes-devtools/python/python3/0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch +++ /dev/null @@ -1,254 +0,0 @@ -From 3364e7e62fa24d0e19133fb0f90b1c24ef1110c5 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Wed, 25 Mar 2026 07:44:47 +0100 -Subject: [PATCH] gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217) - -OpenSSL 4.0.0 alpha1 removed these functions: - -* SSLv3_method() -* TLSv1_method() -* TLSv1_1_method() -* TLSv1_2_method() - -Other changes: - -* Update test_openssl_version(). -* Update multissltests.py for OpenSSL 4. -* Add const qualifier to fix compiler warnings. - -Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> -Signed-off-by: Victor Stinner <vstinner@python.org> - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3364e7e62fa24d0e19133fb0f90b1c24ef1110c5] -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 52 ++++++++++++++++++++------------------ - Modules/_ssl.c | 27 ++++++++++++++++---- - Modules/_ssl/cert.c | 3 ++- - Tools/ssl/multissltests.py | 7 ++++- - 4 files changed, 58 insertions(+), 31 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index dc795c6bd8a..61355927296 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -439,7 +439,7 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_COMPRESSION - self.assertEqual(ssl.HAS_SNI, True) - self.assertEqual(ssl.HAS_ECDH, True) -- self.assertEqual(ssl.HAS_TLSv1_2, True) -+ self.assertIsInstance(ssl.HAS_TLSv1_2, bool) - self.assertEqual(ssl.HAS_TLSv1_3, True) - ssl.OP_NO_SSLv2 - ssl.OP_NO_SSLv3 -@@ -630,11 +630,11 @@ class BasicSocketTests(unittest.TestCase): - # Some sanity checks follow - # >= 1.1.1 - self.assertGreaterEqual(n, 0x10101000) -- # < 4.0 -- self.assertLess(n, 0x40000000) -+ # < 5.0 -+ self.assertLess(n, 0x50000000) - major, minor, fix, patch, status = t - self.assertGreaterEqual(major, 1) -- self.assertLess(major, 4) -+ self.assertLess(major, 5) - self.assertGreaterEqual(minor, 0) - self.assertLess(minor, 256) - self.assertGreaterEqual(fix, 0) -@@ -700,12 +700,14 @@ class BasicSocketTests(unittest.TestCase): - ssl.OP_NO_TLSv1_2, - ssl.OP_NO_TLSv1_3 - ] -- protocols = [ -- ssl.PROTOCOL_TLSv1, -- ssl.PROTOCOL_TLSv1_1, -- ssl.PROTOCOL_TLSv1_2, -- ssl.PROTOCOL_TLS -- ] -+ protocols = [] -+ if hasattr(ssl, 'PROTOCOL_TLSv1'): -+ protocols.append(ssl.PROTOCOL_TLSv1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_1'): -+ protocols.append(ssl.PROTOCOL_TLSv1_1) -+ if hasattr(ssl, 'PROTOCOL_TLSv1_2'): -+ protocols.append(ssl.PROTOCOL_TLSv1_2) -+ protocols.append(ssl.PROTOCOL_TLS) - versions = [ - ssl.TLSVersion.SSLv3, - ssl.TLSVersion.TLSv1, -@@ -1199,6 +1201,7 @@ class ContextTests(unittest.TestCase): - ssl.TLSVersion.TLSv1, - ssl.TLSVersion.TLSv1_1, - ssl.TLSVersion.TLSv1_2, -+ ssl.TLSVersion.TLSv1_3, - ssl.TLSVersion.SSLv3, - } - ) -@@ -1212,7 +1215,7 @@ class ContextTests(unittest.TestCase): - with self.assertRaises(ValueError): - ctx.minimum_version = 42 - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1_1) - - self.assertIn( -@@ -1764,23 +1767,24 @@ class ContextTests(unittest.TestCase): - self.assertFalse(ctx.check_hostname) - self._assert_context_options(ctx) - -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - with warnings_helper.check_warnings(): - ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1) - self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) - self._assert_context_options(ctx) - -- with warnings_helper.check_warnings(): -- ctx = ssl._create_stdlib_context( -- ssl.PROTOCOL_TLSv1_2, -- cert_reqs=ssl.CERT_REQUIRED, -- check_hostname=True -- ) -- self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -- self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -- self.assertTrue(ctx.check_hostname) -- self._assert_context_options(ctx) -+ if has_tls_protocol('PROTOCOL_TLSv1_2'): -+ with warnings_helper.check_warnings(): -+ ctx = ssl._create_stdlib_context( -+ ssl.PROTOCOL_TLSv1_2, -+ cert_reqs=ssl.CERT_REQUIRED, -+ check_hostname=True -+ ) -+ self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) -+ self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) -+ self.assertTrue(ctx.check_hostname) -+ self._assert_context_options(ctx) - - ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_SERVER) -@@ -3908,10 +3912,10 @@ class ThreadedTests(unittest.TestCase): - client_options=ssl.OP_NO_TLSv1_2) - - try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2') -- if has_tls_protocol(ssl.PROTOCOL_TLSv1): -+ if has_tls_protocol('PROTOCOL_TLSv1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False) -- if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): -+ if has_tls_protocol('PROTOCOL_TLSv1_1'): - try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False) - try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False) - -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index b45295b4c0c..6f75af86113 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -136,6 +136,17 @@ static void _PySSLFixErrno(void) { - #error Unsupported OpenSSL version - #endif - -+#if (OPENSSL_VERSION_NUMBER >= 0x40000000L) -+# define OPENSSL_NO_SSL3 -+# define OPENSSL_NO_TLS1 -+# define OPENSSL_NO_TLS1_1 -+# define OPENSSL_NO_TLS1_2 -+# define OPENSSL_NO_SSL3_METHOD -+# define OPENSSL_NO_TLS1_METHOD -+# define OPENSSL_NO_TLS1_1_METHOD -+# define OPENSSL_NO_TLS1_2_METHOD -+#endif -+ - /* OpenSSL API 1.1.0+ does not include version methods */ - #ifndef OPENSSL_NO_SSL3_METHOD - extern const SSL_METHOD *SSLv3_method(void); -@@ -1137,7 +1148,7 @@ _asn1obj2py(_sslmodulestate *state, const ASN1_OBJECT *name, int no_name) - - static PyObject * - _create_tuple_for_attribute(_sslmodulestate *state, -- ASN1_OBJECT *name, ASN1_STRING *value) -+ const ASN1_OBJECT *name, const ASN1_STRING *value) - { - Py_ssize_t buflen; - PyObject *pyattr; -@@ -1166,16 +1177,16 @@ _create_tuple_for_attribute(_sslmodulestate *state, - } - - static PyObject * --_create_tuple_for_X509_NAME (_sslmodulestate *state, X509_NAME *xname) -+_create_tuple_for_X509_NAME(_sslmodulestate *state, const X509_NAME *xname) - { - PyObject *dn = NULL; /* tuple which represents the "distinguished name" */ - PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */ - PyObject *rdnt; - PyObject *attr = NULL; /* tuple to hold an attribute */ - int entry_count = X509_NAME_entry_count(xname); -- X509_NAME_ENTRY *entry; -- ASN1_OBJECT *name; -- ASN1_STRING *value; -+ const X509_NAME_ENTRY *entry; -+ const ASN1_OBJECT *name; -+ const ASN1_STRING *value; - int index_counter; - int rdn_level = -1; - int retcode; -@@ -6599,9 +6610,15 @@ sslmodule_init_constants(PyObject *m) - ADD_INT_CONST("PROTOCOL_TLS", PY_SSL_VERSION_TLS); - ADD_INT_CONST("PROTOCOL_TLS_CLIENT", PY_SSL_VERSION_TLS_CLIENT); - ADD_INT_CONST("PROTOCOL_TLS_SERVER", PY_SSL_VERSION_TLS_SERVER); -+#ifndef OPENSSL_NO_TLS1 - ADD_INT_CONST("PROTOCOL_TLSv1", PY_SSL_VERSION_TLS1); -+#endif -+#ifndef OPENSSL_NO_TLS1_1 - ADD_INT_CONST("PROTOCOL_TLSv1_1", PY_SSL_VERSION_TLS1_1); -+#endif -+#ifndef OPENSSL_NO_TLS1_2 - ADD_INT_CONST("PROTOCOL_TLSv1_2", PY_SSL_VERSION_TLS1_2); -+#endif - - #define ADD_OPTION(NAME, VALUE) if (sslmodule_add_option(m, NAME, (VALUE)) < 0) return -1 - -diff --git a/Modules/_ssl/cert.c b/Modules/_ssl/cert.c -index f2e7be89668..061b0fb3171 100644 ---- a/Modules/_ssl/cert.c -+++ b/Modules/_ssl/cert.c -@@ -128,7 +128,8 @@ _ssl_Certificate_get_info_impl(PySSLCertificate *self) - } - - static PyObject* --_x509name_print(_sslmodulestate *state, X509_NAME *name, int indent, unsigned long flags) -+_x509name_print(_sslmodulestate *state, const X509_NAME *name, -+ int indent, unsigned long flags) - { - PyObject *res; - BIO *biobuf; -diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py -index 3b4507c6771..48207e5330f 100755 ---- a/Tools/ssl/multissltests.py -+++ b/Tools/ssl/multissltests.py -@@ -422,9 +422,11 @@ class BuildOpenSSL(AbstractBuilder): - def _post_install(self): - if self.version.startswith("3."): - self._post_install_3xx() -+ elif self.version.startswith("4."): -+ self._post_install_4xx() - - def _build_src(self, config_args=()): -- if self.version.startswith("3."): -+ if self.version.startswith(("3.", "4.")): - config_args += ("enable-fips",) - super()._build_src(config_args) - -@@ -440,6 +442,9 @@ class BuildOpenSSL(AbstractBuilder): - lib64 = self.lib_dir + "64" - os.symlink(lib64, self.lib_dir) - -+ def _post_install_4xx(self): -+ self._post_install_3xx() -+ - @property - def short_version(self): - """Short version for OpenSSL download URL""" diff --git a/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch new file mode 100644 index 0000000000..581dad9b2e --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch @@ -0,0 +1,50 @@ +From 1db73a72041cdbbeb4ddef01595f25129a8138f7 Mon Sep 17 00:00:00 2001 +From: Tom Greenslade <thomgree@cisco.com> +Date: Thu, 29 Oct 2026 14:17:40 +0000 +Subject: [PATCH] gh-160881: Fix test_is_python_process_non_python_subprocess + with multicall sleep + +_wait_for_process_exec() waited for /proc/{pid}/exe to be named "sleep", +which never happens when sleep is a multicall binary (BusyBox on Alpine, +coreutils-single on RHEL UBI9). Wait instead until the child's executable +differs from the parent's, which means the child has called exec(). + +Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> + +Upstream-Status: Submitted [https://github.com/python/cpython/pull/160901] +Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> +--- + .../test_sampling_profiler/test_children.py | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_children.py b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +index 4b27c6dbb1896c1..9a8d529c4b82444 100644 +--- a/Lib/test/test_profiling/test_sampling_profiler/test_children.py ++++ b/Lib/test/test_profiling/test_sampling_profiler/test_children.py +@@ -85,12 +85,14 @@ def reader(): + return result[0] + + +-def _wait_for_process_exec(proc, name, timeout): ++def _wait_for_process_exec(proc, timeout): + # Wait until a child process calls exec() to replace the forked process +- # executable. Raise AssertionError on timeout. ++ # executable. Don't check the executable name: it can be a multicall ++ # binary such as /bin/busybox. Raise AssertionError on timeout. ++ parent_exe = os.readlink("/proc/self/exe") + for _ in sleeping_retry(timeout, max_delay=0.1): + exe = os.readlink(f"/proc/{proc.pid}/exe") +- if os.path.basename(exe) == name: ++ if exe != parent_exe: + break + + +@@ -625,7 +627,7 @@ def test_is_python_process_non_python_subprocess(self): + ) + + try: +- _wait_for_process_exec(proc, "sleep", SHORT_TIMEOUT) ++ _wait_for_process_exec(proc, SHORT_TIMEOUT) + + self.assertFalse( + is_python_process(proc.pid), diff --git a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch index 525a2ca700..e504325592 100644 --- a/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch +++ b/meta/recipes-devtools/python/python3/0001-prefer-valid-entrypoints.patch @@ -1,4 +1,4 @@ -From 8d7fcf04c6513841c7985e64b746b1ef5de0c426 Mon Sep 17 00:00:00 2001 +From 57c51c6746c1efdae1654df443c5d23351b2d131 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@arm.com> Date: Fri, 17 Apr 2026 16:53:42 +0100 Subject: [PATCH] prefer valid entrypoints @@ -16,10 +16,10 @@ Signed-off-by: Ross Burton <ross.burton@arm.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 085378c..ff5cae4 100644 +index 32f4b7d..705f245 100644 --- a/Lib/importlib/metadata/__init__.py +++ b/Lib/importlib/metadata/__init__.py -@@ -1016,7 +1016,7 @@ def entry_points(**params) -> EntryPoints: +@@ -1120,7 +1120,7 @@ def entry_points(**params) -> EntryPoints: :return: EntryPoints for all installed packages. """ eps = itertools.chain.from_iterable( diff --git a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch index 7807827d9a..e24d6b63b1 100644 --- a/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch +++ b/meta/recipes-devtools/python/python3/0001-sysconfig.py-use-platlibdir-also-for-purelib.patch @@ -1,4 +1,4 @@ -From c10d1b295a9fb93836830cce441da3f22e5c7cd7 Mon Sep 17 00:00:00 2001 +From 07c5b43f29e93825e1c0b0fcebf40dc5971d438f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Sun, 12 Sep 2021 21:44:36 +0200 Subject: [PATCH] sysconfig.py: use platlibdir also for purelib @@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py -index faf8273..0a8bcc0 100644 +index b931551..924401c 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -29,7 +29,7 @@ _INSTALL_SCHEMES = { diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch index a60d082e2f..12d87168ca 100644 --- a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch +++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch @@ -1,4 +1,4 @@ -From f0ac5b479b99bfb7f5e937a941b31a596f4caafc Mon Sep 17 00:00:00 2001 +From c8d8b7aaf96faa50d8bf20c59ed31e7c6a8d698c Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Mon, 5 Aug 2019 15:57:39 +0800 Subject: [PATCH] test_locale.py: correct the test output format @@ -31,10 +31,10 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py -index f918435..1910a43 100644 +index a06c600..38b91d0 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py -@@ -499,7 +499,7 @@ class TestRealLocales(unittest.TestCase): +@@ -500,7 +500,7 @@ class TestRealLocales(unittest.TestCase): self.skipTest('test needs Turkish locale') loc = locale.getlocale(locale.LC_CTYPE) if verbose: diff --git a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch b/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch deleted file mode 100644 index 1b9a7fc942..0000000000 --- a/meta/recipes-devtools/python/python3/0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch +++ /dev/null @@ -1,234 +0,0 @@ -From 3c2a3014af7d73cc34f2498f60fdf863d9bc7c6c Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 13:52:57 +0200 -Subject: [PATCH] gh-148292: Update _ssl._SSLSocket for OpenSSL 4 (#149102) - -The _SSLSocket object now remembers if it gets an EOF error. In this -case, read(), sendfile(), write() and do_handshake method calls fail -with SSLEOFError without calling the underlying OpenSSL function. - -Co-authored-by: Gregory P. Smith <greg@krypto.org> -(cherry picked from commit 7b7fa3f9bf3d7cdf3eb669d02b386e05b39c402a) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/3c2a3014af7d] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 82 +++++++++++++++++++ - ...-04-28-17-47-55.gh-issue-148292.oIq3ml.rst | 7 ++ - Modules/_ssl.c | 42 ++++++++++ - 3 files changed, 131 insertions(+) - create mode 100644 Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 965dbc36f096499..03d9e3f9e5e96b5 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -3039,6 +3039,36 @@ class ThreadedEchoServer(threading.Thread): - def stop(self): - self.active = False - -+class TestEOFServer(threading.Thread): -+ def __init__(self): -+ super().__init__() -+ self.listening = threading.Event() -+ self.address = None -+ -+ def run(self): -+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) -+ context.load_cert_chain(CERTFILE) -+ server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ with server_sock: -+ server_sock.settimeout(support.SHORT_TIMEOUT) -+ server_sock.bind((HOST, 0)) -+ server_sock.listen(5) -+ -+ self.address = server_sock.getsockname() -+ self.listening.set() -+ -+ sock, addr = server_sock.accept() -+ sslconn = context.wrap_socket(sock, server_side=True) -+ with sslconn: -+ request = b'' -+ while chunk := sslconn.recv(1024): -+ request += chunk -+ if b'\n' in chunk: -+ break -+ -+ sslconn.sendall(b'server\n') -+ sslconn.shutdown(socket.SHUT_WR) -+ - class AsyncoreEchoServer(threading.Thread): - - # this one's based on asyncore.dispatcher -@@ -5079,6 +5109,58 @@ class ThreadedTests(unittest.TestCase): - if cm.exc_value is not None: - raise cm.exc_value - -+ def test_got_eof(self): -+ # gh-148292: Test that _ssl._SSLSocket behaves the same on all OpenSSL -+ # versions on calling methods after EOF (after the first SSLEOFError). -+ -+ server = TestEOFServer() -+ server.start() -+ if not server.listening.wait(support.SHORT_TIMEOUT): -+ raise RuntimeError("server took too long") -+ self.addCleanup(server.join) -+ -+ context = ssl.create_default_context(cafile=CERTFILE) -+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -+ sock.settimeout(support.SHORT_TIMEOUT) -+ sock.connect(server.address) -+ sslsock = context.wrap_socket(sock, server_hostname='localhost') -+ with sslsock: -+ sslsock.sendall(b'client\n') -+ # test the _ssl._SSLSocket object, not ssl.SSLSocket -+ sslobj = sslsock._sslobj -+ -+ data = sslobj.read(1024) -+ self.assertEqual(data, b'server\n') -+ -+ # The second read gets EOF error and sets got_eof_error to 1 -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.read(1024) -+ -+ # Following read(), sendfile(), write() and do_handshake() calls -+ # must raise SSLEOFError -+ with self.assertRaises(ssl.SSLEOFError): -+ # The _SSLSocket remembers the previous EOF error -+ # and raises again SSLEOFError -+ sslobj.read(1024) -+ if hasattr(sslobj, 'sendfile'): -+ with open(__file__, "rb") as fp: -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.sendfile(fp.fileno(), 0, 1) -+ with self.assertRaises(ssl.SSLEOFError): -+ sslobj.write(b'client2\n') -+ with self.assertRaises(ssl.SSLEOFError): -+ sslsock.do_handshake() -+ -+ self.assertEqual(sslsock.pending(), 0) -+ try: -+ sslsock.shutdown(socket.SHUT_WR) -+ except OSError as exc: -+ self.assertEqual(exc.errno, errno.ENOTCONN) -+ else: -+ # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -+ # raise an error -+ pass -+ - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, - "Test needs TLS 1.3 PHA") -diff --git a/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -new file mode 100644 -index 000000000000000..e1f308df5a678e6 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst -@@ -0,0 +1,7 @@ -+:mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` for -+OpenSSL 4. The classes now remember if they get a :exc:`ssl.SSLEOFError`. In this -+case, following :meth:`~ssl.SSLSocket.read`, :meth:`!sendfile`, -+:meth:`~ssl.SSLSocket.write`, and :meth:`~ssl.SSLSocket.do_handshake` calls -+raise :exc:`ssl.SSLEOFError` without calling the underlying OpenSSL function. -+Thanks to that, :class:`ssl.SSLSocket` behaves the same on all OpenSSL versions -+on EOF. Patch by Victor Stinner. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index 1603d0ffd559559..376df32b7cb4bd6 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -352,6 +352,16 @@ typedef struct { - * and shutdown methods check for chained exceptions. - */ - PyObject *exc; -+ // gh-148292: If non-zero, read(), sendfile(), write() and do_handshake() -+ // methods raise SSLEOFError without calling the underlying OpenSSL -+ // function. Set to 1 on PY_SSL_ERROR_EOF error. -+ // -+ // On OpenSSL 4, if SSL_read_ex() fails with -+ // SSL_R_UNEXPECTED_EOF_WHILE_READING, the following SSL_read_ex() call -+ // fails with a generic protocol error (ERR_peek_last_error() returns 0). -+ // Use got_eof_error to have the same behavior on OpenSSL 4 and newer and -+ // on OpenSSL 3 and older. -+ int got_eof_error; - } PySSLSocket; - - #define PySSLSocket_CAST(op) ((PySSLSocket *)(op)) -@@ -499,6 +509,10 @@ fill_and_set_sslerror(_sslmodulestate *state, - PyObject *init_value, *msg, *key; - PyUnicodeWriter *writer = NULL; - -+ if (ssl_errno == PY_SSL_ERROR_EOF && sslsock != NULL) { -+ sslsock->got_eof_error = 1; -+ } -+ - if (errcode != 0) { - int lib, reason; - -@@ -654,6 +668,18 @@ PySSL_ChainExceptions(PySSLSocket *sslsock) { - return -1; - } - -+ -+static void -+set_eof_error(PySSLSocket *sslsock) -+{ -+ _sslmodulestate *state = get_state_sock(sslsock); -+ fill_and_set_sslerror(state, sslsock, state->PySSLEOFErrorObject, -+ PY_SSL_ERROR_EOF, -+ "EOF occurred in violation of protocol", -+ __LINE__, 0); -+} -+ -+ - static PyObject * - PySSL_SetError(PySSLSocket *sslsock, const char *filename, int lineno) - { -@@ -901,6 +927,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, - self->server_hostname = NULL; - self->err = err; - self->exc = NULL; -+ self->got_eof_error = 0; - - /* Make sure the SSL error state is initialized */ - ERR_clear_error(); -@@ -1043,6 +1070,11 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2514,6 +2546,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) - BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - timeout = GET_SOCKET_TIMEOUT(sock); - has_timeout = (timeout > 0); - if (has_timeout) { -@@ -2654,6 +2691,11 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len, - Py_INCREF(sock); - } - -+ if (self->got_eof_error) { -+ set_eof_error(self); -+ goto error; -+ } -+ - if (!group_right_1) { - dest = PyBytes_FromStringAndSize(NULL, len); - if (dest == NULL) diff --git a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch b/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch deleted file mode 100644 index 59742290e8..0000000000 --- a/meta/recipes-devtools/python/python3/0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 81911909bc439d6de8ce6a173b0691b3c58e9e1a Mon Sep 17 00:00:00 2001 -From: Victor Stinner <vstinner@python.org> -Date: Mon, 4 May 2026 16:20:25 +0200 -Subject: [PATCH] gh-148292: Remove shutdown() test in test_ssl.test_got_eof() - (#149366) - -The shutdown() behavior depends too much on the operating system and -it's unrelated to the got_eof_error change. - -(cherry picked from commit 1e21cf6fee3830012e458c0fe5dbc6fcd45ace92) - -Upstream-Status: Backport [https://github.com/python/cpython/commit/81911909bc43] - -Note: This is from the unmerged CPython PR #149783 which backports -OpenSSL 4.0 support to the 3.14 branch. Upstream deferred merging -until after Python 3.15.1 is released. - -Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> ---- - Lib/test/test_ssl.py | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 03d9e3f9e5e96b5..6445f122b4272be 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -5152,14 +5152,6 @@ class ThreadedTests(unittest.TestCase): - sslsock.do_handshake() - - self.assertEqual(sslsock.pending(), 0) -- try: -- sslsock.shutdown(socket.SHUT_WR) -- except OSError as exc: -- self.assertEqual(exc.errno, errno.ENOTCONN) -- else: -- # On Windows and on OpenSSL 1.1.1, shutdown() doesn't -- # raise an error -- pass - - - @unittest.skipUnless(has_tls_version('TLSv1_3') and ssl.HAS_PHA, diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch index 7167d5b4e8..83ed34d986 100644 --- a/meta/recipes-devtools/python/python3/makerace.patch +++ b/meta/recipes-devtools/python/python3/makerace.patch @@ -1,4 +1,4 @@ -From b41557f570ff4451c477669d6ca5bfacabe21c66 Mon Sep 17 00:00:00 2001 +From be6588c8090edae5379f14dd76f146d383b25e50 Mon Sep 17 00:00:00 2001 From: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue, 13 Jul 2021 23:19:29 +0100 Subject: [PATCH] python3: Fix make race @@ -17,10 +17,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index a7e536d..e946018 100644 +index 24ca285..a1d59e4 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -2750,7 +2750,7 @@ COMPILEALL_OPTS=-j0 +@@ -2844,7 +2844,7 @@ COMPILEALL_OPTS=-j0 TEST_MODULES=@TEST_MODULES@ .PHONY: libinstall diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json index 50fdf5d0ea..1919e32957 100644 --- a/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/meta/recipes-devtools/python/python3/python3-manifest.json @@ -117,7 +117,7 @@ "${libdir}/python${PYTHON_MAJMIN}/asyncio", "${libdir}/python${PYTHON_MAJMIN}/concurrent", "${libdir}/python${PYTHON_MAJMIN}/concurrent/futures", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_asyncio.*.so" + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_remote_debugging.*.so" ], "cached": [] }, @@ -129,9 +129,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/wave.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/wave.*.pyc" - ] + "cached": [] }, "codecs": { "summary": "Python codec", @@ -153,11 +151,7 @@ "${libdir}/python${PYTHON_MAJMIN}/filecmp.py", "${libdir}/python${PYTHON_MAJMIN}/py_compile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/compileall.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/filecmp.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/py_compile.*.pyc" - ] + "cached": [] }, "compression": { "summary": "Python high-level compression support", @@ -165,20 +159,16 @@ "core" ], "files": [ + "${libdir}/python${PYTHON_MAJMIN}/compression/", "${libdir}/python${PYTHON_MAJMIN}/gzip.py", "${libdir}/python${PYTHON_MAJMIN}/tarfile.py", - "${libdir}/python${PYTHON_MAJMIN}/zipfile/", - "${libdir}/python${PYTHON_MAJMIN}/compression/", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so" + "${libdir}/python${PYTHON_MAJMIN}/zipfile/" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/gzip.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tarfile.*.pyc" - ] + "cached": [] }, "core": { "summary": "Python interpreter and core modules", - "rdepends": ["compression"], + "rdepends": [], "files": [ "${bindir}/python${PYTHON_MAJMIN}", "${bindir}/python${PYTHON_MAJMIN}.real", @@ -195,6 +185,7 @@ "${libdir}/python${PYTHON_MAJMIN}/_colorize.py", "${libdir}/python${PYTHON_MAJMIN}/_compression.py", "${libdir}/python${PYTHON_MAJMIN}/_markupbase.py", + "${libdir}/python${PYTHON_MAJMIN}/_missing_stdlib_info.py", "${libdir}/python${PYTHON_MAJMIN}/_opcode_metadata.py", "${libdir}/python${PYTHON_MAJMIN}/_py_warnings.py", "${libdir}/python${PYTHON_MAJMIN}/_pyrepl", @@ -214,6 +205,11 @@ "${libdir}/python${PYTHON_MAJMIN}/codeop.py", "${libdir}/python${PYTHON_MAJMIN}/collections", "${libdir}/python${PYTHON_MAJMIN}/collections/abc.py", + "${libdir}/python${PYTHON_MAJMIN}/compression", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common", + "${libdir}/python${PYTHON_MAJMIN}/compression/_common/_streams.py", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd", + "${libdir}/python${PYTHON_MAJMIN}/compression/zstd/_zstdfile.py", "${libdir}/python${PYTHON_MAJMIN}/configparser.py", "${libdir}/python${PYTHON_MAJMIN}/contextlib.py", "${libdir}/python${PYTHON_MAJMIN}/copy.py", @@ -253,11 +249,14 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_bz2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_csv.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_heapq.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_interpreters.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lzma.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_math_integer.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_opcode.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_posixsubprocess.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_struct.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_typing.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_zstd.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/array.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/binascii.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so", @@ -283,6 +282,8 @@ "${libdir}/python${PYTHON_MAJMIN}/pathlib.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_abc.py", "${libdir}/python${PYTHON_MAJMIN}/pathlib/_local.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/_os.py", + "${libdir}/python${PYTHON_MAJMIN}/pathlib/types.py", "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py", "${libdir}/python${PYTHON_MAJMIN}/platform.py", "${libdir}/python${PYTHON_MAJMIN}/posixpath.py", @@ -439,18 +440,18 @@ "${libdir}/python${PYTHON_MAJMIN}/hashlib.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_blake2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hashlib.*.so", + "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_hmac.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_md5.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha1.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha2.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sha3.*.so" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hashlib.*.pyc" - ] + "cached": [] }, "ctypes": { "summary": "Python C types support", "rdepends": [ + "compression", "core", "io", "math" @@ -482,14 +483,9 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/_strptime.py", "${libdir}/python${PYTHON_MAJMIN}/calendar.py", - "${libdir}/python${PYTHON_MAJMIN}/datetime.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_datetime.*.so" + "${libdir}/python${PYTHON_MAJMIN}/datetime.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_strptime.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/calendar.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/datetime.*.pyc" - ] + "cached": [] }, "db": { "summary": "Python file-based database support", @@ -505,7 +501,15 @@ "debugger": { "summary": "Python debugger", "rdepends": [ + "asyncio", + "compression", "core", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold" @@ -514,10 +518,7 @@ "${libdir}/python${PYTHON_MAJMIN}/bdb.py", "${libdir}/python${PYTHON_MAJMIN}/pdb.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bdb.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pdb.*.pyc" - ] + "cached": [] }, "dev": { "cached": [], @@ -547,16 +548,22 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/difflib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc" - ] + "cached": [] }, "doctest": { "summary": "Python framework for running examples in docstrings", "rdepends": [ + "asyncio", + "compression", "core", "debugger", "difflib", + "io", + "json", + "logging", + "math", + "netclient", + "numbers", "pprint", "shell", "stringold", @@ -565,9 +572,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/doctest.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/doctest.*.pyc" - ] + "cached": [] }, "email": { "summary": "Python email support", @@ -584,9 +589,7 @@ "${libdir}/python${PYTHON_MAJMIN}/email", "${libdir}/python${PYTHON_MAJMIN}/imaplib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/imaplib.*.pyc" - ] + "cached": [] }, "ensurepip": { "summary": "Support for bootstrapping the pip installer", @@ -603,9 +606,7 @@ "rdepends": [ "core" ], - "files": [ - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/fcntl.*.so" - ], + "files": [], "cached": [] }, "gdbm": { @@ -647,13 +648,12 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/colorsys.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/colorsys.*.pyc" - ] + "cached": [] }, "io": { "summary": "Python low-level I/O", "rdepends": [ + "compression", "core", "math", "netclient" @@ -667,12 +667,7 @@ "${libdir}/python${PYTHON_MAJMIN}/ssl.py", "${libdir}/python${PYTHON_MAJMIN}/tempfile.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pyio.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socket.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ssl.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tempfile.*.pyc" - ] + "cached": [] }, "json": { "summary": "Python JSON support", @@ -715,9 +710,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/mailbox.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mailbox.*.pyc" - ] + "cached": [] }, "math": { "summary": "Python math support", @@ -729,9 +722,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/cmath.*.so", "${libdir}/python${PYTHON_MAJMIN}/random.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/random.*.pyc" - ] + "cached": [] }, "mime": { "summary": "Python MIME handling APIs", @@ -741,9 +732,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/quopri.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/quopri.*.pyc" - ] + "cached": [] }, "mmap": { "summary": "Python memory-mapped file support", @@ -818,10 +807,12 @@ "multiprocessing": { "summary": "Python multiprocessing support", "rdepends": [ + "compression", "core", "crypt", "ctypes", "io", + "json", "math", "mmap", "netclient", @@ -861,16 +852,7 @@ "${libdir}/python${PYTHON_MAJMIN}/urllib", "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/base64.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ftplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/hmac.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/mimetypes.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/poplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/secrets.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/smtplib.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/uuid.*.pyc" - ] + "cached": [] }, "netserver": { "summary": "Python Internet Protocol servers", @@ -881,9 +863,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/socketserver.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/socketserver.*.pyc" - ] + "cached": [] }, "numbers": { "summary": "Python number APIs", @@ -895,17 +875,10 @@ "${libdir}/python${PYTHON_MAJMIN}/contextvars.py", "${libdir}/python${PYTHON_MAJMIN}/decimal.py", "${libdir}/python${PYTHON_MAJMIN}/fractions.py", - "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_contextvars.*.so", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_decimal.*.so", "${libdir}/python${PYTHON_MAJMIN}/numbers.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_pydecimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/contextvars.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/decimal.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/fractions.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/numbers.*.pyc" - ] + "cached": [] }, "pickle": { "summary": "Python serialisation/persistence support", @@ -919,12 +892,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pickletools.py", "${libdir}/python${PYTHON_MAJMIN}/shelve.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compat_pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickle.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pickletools.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shelve.*.pyc" - ] + "cached": [] }, "pkgutil": { "summary": "Python package extension utility support", @@ -944,9 +912,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/plistlib.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/plistlib.*.pyc" - ] + "cached": [] }, "pprint": { "summary": "Python pretty-print support", @@ -956,9 +922,7 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/pprint.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pprint.*.pyc" - ] + "cached": [] }, "profile": { "summary": "Python basic performance profiling support", @@ -969,13 +933,11 @@ "${libdir}/python${PYTHON_MAJMIN}/cProfile.py", "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_lsprof.*.so", "${libdir}/python${PYTHON_MAJMIN}/profile.py", + "${libdir}/python${PYTHON_MAJMIN}/profiling", + "${libdir}/python${PYTHON_MAJMIN}/profiling/tracing", "${libdir}/python${PYTHON_MAJMIN}/pstats.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cProfile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/profile.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc" - ] + "cached": [] }, "pydoc": { "summary": "Python interactive help support", @@ -987,9 +949,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pydoc.py", "${libdir}/python${PYTHON_MAJMIN}/pydoc_data" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc" - ] + "cached": [] }, "resource": { "summary": "Python resource control interface", @@ -1004,17 +964,13 @@ "shell": { "summary": "Python shell-like functionality", "rdepends": [ - "core", - "stringold" + "core" ], "files": [ "${libdir}/python${PYTHON_MAJMIN}/cmd.py", "${libdir}/python${PYTHON_MAJMIN}/shlex.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/cmd.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/shlex.*.pyc" - ] + "cached": [] }, "sqlite3": { "summary": "Python Sqlite3 database support", @@ -1039,9 +995,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_statistics.*.so", "${libdir}/python${PYTHON_MAJMIN}/statistics.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/statistics.*.pyc" - ] + "cached": [] }, "stringold": { "summary": "Common string operations", @@ -1074,10 +1028,7 @@ "${libdir}/python${PYTHON_MAJMIN}/pty.py", "${libdir}/python${PYTHON_MAJMIN}/tty.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pty.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/tty.*.pyc" - ] + "cached": [] }, "threading": { "summary": "Python threading & synchronization support", @@ -1089,10 +1040,7 @@ "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_queue.*.so", "${libdir}/python${PYTHON_MAJMIN}/queue.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_threading_local.*.pyc", - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/queue.*.pyc" - ] + "cached": [] }, "tkinter": { "summary": "Python Tcl/Tk bindings", @@ -1143,15 +1091,15 @@ "files": [ "${libdir}/python${PYTHON_MAJMIN}/getpass.py" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/getpass.*.pyc" - ] + "cached": [] }, "venv": { "summary": "Provides support for creating lightweight virtual environments with their own site directories, optionally isolated from system site directories.", "rdepends": [ + "compression", "core", "logging", + "shell", "stringold" ], "files": [ @@ -1202,11 +1150,10 @@ "core" ], "files": [ - "${libdir}/python${PYTHON_MAJMIN}/zipapp.py" + "${libdir}/python${PYTHON_MAJMIN}/zipapp.py", + "${libdir}/python${PYTHON_MAJMIN}/zipfile" ], - "cached": [ - "${libdir}/python${PYTHON_MAJMIN}/__pycache__/zipapp.*.pyc" - ] + "cached": [] }, "zoneinfo": { "summary": "IANA time zone support", diff --git a/meta/recipes-devtools/python/python3/valid-dists.patch b/meta/recipes-devtools/python/python3/valid-dists.patch deleted file mode 100644 index 7fe18254e5..0000000000 --- a/meta/recipes-devtools/python/python3/valid-dists.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 66874ce1a9f21b4b00dc85919734d58e6243ca29 Mon Sep 17 00:00:00 2001 -From: "Jason R. Coombs" <jaraco@jaraco.com> -Date: Tue, 23 Jul 2024 08:36:16 -0400 -Subject: [PATCH] Prioritize valid dists to invalid dists when retrieving by - name. - -Closes python/importlib_metadata#489 - -Upstream-Status: Backport [https://github.com/python/importlib_metadata/commit/a65c29adc027b3615154cab73aaedd58a6aa23da] -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - Lib/importlib/metadata/__init__.py | 14 +++- - Lib/importlib/metadata/_itertools.py | 98 ++++++++++++++++++++++++++++ - 2 files changed, 110 insertions(+), 2 deletions(-) - -diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py -index 8ce62dd..085378c 100644 ---- a/Lib/importlib/metadata/__init__.py -+++ b/Lib/importlib/metadata/__init__.py -@@ -21,7 +21,7 @@ import collections - from . import _meta - from ._collections import FreezableDefaultDict, Pair - from ._functools import method_cache, pass_none --from ._itertools import always_iterable, unique_everseen -+from ._itertools import always_iterable, bucket, unique_everseen - from ._meta import PackageMetadata, SimplePath - - from contextlib import suppress -@@ -404,7 +404,7 @@ class Distribution(DeprecatedNonAbstract): - if not name: - raise ValueError("A distribution name is required.") - try: -- return next(iter(cls.discover(name=name))) -+ return next(iter(cls._prefer_valid(cls.discover(name=name)))) - except StopIteration: - raise PackageNotFoundError(name) - -@@ -428,6 +428,16 @@ class Distribution(DeprecatedNonAbstract): - resolver(context) for resolver in cls._discover_resolvers() - ) - -+ @staticmethod -+ def _prefer_valid(dists: Iterable[Distribution]) -> Iterable[Distribution]: -+ """ -+ Prefer (move to the front) distributions that have metadata. -+ -+ Ref python/importlib_resources#489. -+ """ -+ buckets = bucket(dists, lambda dist: bool(dist.metadata)) -+ return itertools.chain(buckets[True], buckets[False]) -+ - @staticmethod - def at(path: str | os.PathLike[str]) -> Distribution: - """Return a Distribution for the indicated metadata path. -diff --git a/Lib/importlib/metadata/_itertools.py b/Lib/importlib/metadata/_itertools.py -index d4ca9b9..79d3719 100644 ---- a/Lib/importlib/metadata/_itertools.py -+++ b/Lib/importlib/metadata/_itertools.py -@@ -1,3 +1,4 @@ -+from collections import defaultdict, deque - from itertools import filterfalse - - -@@ -71,3 +72,100 @@ def always_iterable(obj, base_type=(str, bytes)): - return iter(obj) - except TypeError: - return iter((obj,)) -+ -+ -+# Copied from more_itertools 10.3 -+class bucket: -+ """Wrap *iterable* and return an object that buckets the iterable into -+ child iterables based on a *key* function. -+ -+ >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3'] -+ >>> s = bucket(iterable, key=lambda x: x[0]) # Bucket by 1st character -+ >>> sorted(list(s)) # Get the keys -+ ['a', 'b', 'c'] -+ >>> a_iterable = s['a'] -+ >>> next(a_iterable) -+ 'a1' -+ >>> next(a_iterable) -+ 'a2' -+ >>> list(s['b']) -+ ['b1', 'b2', 'b3'] -+ -+ The original iterable will be advanced and its items will be cached until -+ they are used by the child iterables. This may require significant storage. -+ -+ By default, attempting to select a bucket to which no items belong will -+ exhaust the iterable and cache all values. -+ If you specify a *validator* function, selected buckets will instead be -+ checked against it. -+ -+ >>> from itertools import count -+ >>> it = count(1, 2) # Infinite sequence of odd numbers -+ >>> key = lambda x: x % 10 # Bucket by last digit -+ >>> validator = lambda x: x in {1, 3, 5, 7, 9} # Odd digits only -+ >>> s = bucket(it, key=key, validator=validator) -+ >>> 2 in s -+ False -+ >>> list(s[2]) -+ [] -+ -+ """ -+ -+ def __init__(self, iterable, key, validator=None): -+ self._it = iter(iterable) -+ self._key = key -+ self._cache = defaultdict(deque) -+ self._validator = validator or (lambda x: True) -+ -+ def __contains__(self, value): -+ if not self._validator(value): -+ return False -+ -+ try: -+ item = next(self[value]) -+ except StopIteration: -+ return False -+ else: -+ self._cache[value].appendleft(item) -+ -+ return True -+ -+ def _get_values(self, value): -+ """ -+ Helper to yield items from the parent iterator that match *value*. -+ Items that don't match are stored in the local cache as they -+ are encountered. -+ """ -+ while True: -+ # If we've cached some items that match the target value, emit -+ # the first one and evict it from the cache. -+ if self._cache[value]: -+ yield self._cache[value].popleft() -+ # Otherwise we need to advance the parent iterator to search for -+ # a matching item, caching the rest. -+ else: -+ while True: -+ try: -+ item = next(self._it) -+ except StopIteration: -+ return -+ item_value = self._key(item) -+ if item_value == value: -+ yield item -+ break -+ elif self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ def __iter__(self): -+ for item in self._it: -+ item_value = self._key(item) -+ if self._validator(item_value): -+ self._cache[item_value].append(item) -+ -+ yield from self._cache.keys() -+ -+ def __getitem__(self, value): -+ if not self._validator(value): -+ return iter(()) -+ -+ return self._get_values(value) diff --git a/meta/recipes-devtools/python/python3_3.14.10.bb b/meta/recipes-devtools/python/python3_3.15.2.bb similarity index 98% rename from meta/recipes-devtools/python/python3_3.14.10.bb rename to meta/recipes-devtools/python/python3_3.15.2.bb index c50c4d4bab..43630bb48e 100644 --- a/meta/recipes-devtools/python/python3_3.14.10.bb +++ b/meta/recipes-devtools/python/python3_3.15.2.bb @@ -18,19 +18,17 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://makerace.patch \ file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \ file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \ - file://valid-dists.patch \ file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \ file://0001-prefer-valid-entrypoints.patch \ - file://0001-gh-146207-Add-support-for-OpenSSL-4.0.0.patch \ - file://0002-gh-148292-Update-_ssl._SSLSocket-for-OpenSSL-4.patch \ - file://0003-gh-148292-Remove-shutdown-test-in-test_ssl.test_got_eof.patch \ + file://0001-configure-clear-RUNSHARED-when-cross-compiling.patch \ + file://0001-gh-160881-Fix-test_is_python_process_non_python_subp.patch \ " SRC_URI:append:class-native = " \ file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ " -SRC_URI[sha256sum] = "de414a57119abef52784d8993e341d53aed635fc2b05c2607d9f98a2c5b72032" +SRC_URI[sha256sum] = "8b5536d280142ecf6cdfe15d12a21ba1c65e300bbf7b28a8d0cdb849575797de" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" @@ -41,7 +39,7 @@ inherit upstream-stable-release-point CVE_PRODUCT = "python:python python_software_foundation:python cpython" -PYTHON_MAJMIN = "3.14" +PYTHON_MAJMIN = "3.15" S = "${UNPACKDIR}/Python-${PV}" @@ -75,7 +73,7 @@ DEPENDS = "\ DEPENDS:append:class-target = " python3-native" DEPENDS:append:class-nativesdk = " python3-native" -EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat" +EXTRA_OECONF = " --without-ensurepip --enable-shared --with-platlibdir=${baselib} --with-system-expat --without-system-libmpdec" EXTRA_OECONF:append:class-native = " --bindir=${bindir}/${PN}" EXTRA_OECONF:append:class-target = " --with-build-python=nativepython3 PLATFORM_TRIPLET=${HOST_ARCH}-${HOST_OS}" EXTRA_OECONF:append:class-nativesdk = " --with-build-python=nativepython3" ^ permalink raw reply related [flat|nested] 28+ messages in thread
end of thread, other threads:[~2026-11-05 12:30 UTC | newest] Thread overview: 28+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-10-12 9:00 [PATCH 1/2] mpdecimal: Add mpdecimal 4.0.1 as a new recipe in oe-core Jaipaul Cheernam 2026-10-12 9:00 ` [PATCH 2/2] python3: upgrade 3.14.7 -> 3.15.0 Jaipaul Cheernam 2026-10-12 9:40 ` [OE-core] " Marko, Peter 2026-10-12 10:14 ` Jaipaul Cheernam 2026-10-29 21:06 ` [PATCH v3 0/2] python3 upgrade to 3.15.2 Jaipaul Cheernam 2026-10-29 21:06 ` [PATCH v3 1/2] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam 2026-10-29 21:06 ` [PATCH v3 2/2] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2026-10-31 8:40 ` [OE-core] " Mathieu Dubois-Briand 2026-11-02 7:01 ` [PATCH v4 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam 2026-11-02 7:01 ` [PATCH v4 1/3] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam 2026-11-02 7:01 ` [PATCH v4 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 Jaipaul Cheernam 2026-11-02 7:17 ` Patchtest results for " patchtest 2026-11-02 7:01 ` [PATCH v4 3/3] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 0/3] python3: Upgrade to 3.15.2 Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 1/3] python3-maturin: Add support for python 3.15.2 Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 2/3] python3-dbus: Upgrade 1.4.0 -> 1.5.1 Jaipaul Cheernam 2026-11-02 8:08 ` [PATCH v5 3/3] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2026-11-03 14:03 ` [OE-core] " Mathieu Dubois-Briand 2026-11-04 15:06 ` Jaipaul Cheernam 2026-11-04 15:28 ` [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Jaipaul Cheernam 2026-11-04 15:28 ` [PATCH v6 2/2] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2026-11-05 6:08 ` [OE-core] [PATCH v6 1/2] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Mathieu Dubois-Briand 2026-11-05 12:30 ` Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 0/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 1/4] systemtap: mark python3.stpm libpython patch as backport Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 2/4] systemtap: use installer instead of pip for HelperSDT wheel Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 3/4] python3-setuptools: Upgrade 84.0.0 -> 84.2.1 Jaipaul Cheernam 2026-11-05 12:24 ` [PATCH v7 4/4] python3: Upgrade 3.14.10 -> 3.15.2 Jaipaul Cheernam
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.