From 5428cad7d8c69c0e80e67bd4bb91fa34048da8cd Mon Sep 17 00:00:00 2001 From: Peter Marko Date: Thu, 16 Oct 2025 22:40:58 +0200 Subject: python3: upgrade 3.13.7 -> 3.13.9 Drop upstreamed patch and refresh remaining patches. Release information: * https://www.python.org/downloads/release/python-3138/ * 3.13.8 is the eighth maintenance release of 3.13, containing around 200 bugfixes, build improvements and documentation changes since 3.13.7. * https://www.python.org/downloads/release/python-3139/ * This Python 3.13.9, a maintenance release for Python 3.13. * 3.13.9 is an expedited release containing a fix for one specific regression in Python 3.13.8 (From OE-Core rev: 78d83ced968a46579cff8bfa0b4f462689c46c00) Signed-off-by: Peter Marko Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- ...ta-for-OpenSSL-3.4-and-add-it-to-multissl.patch | 4 +- ...ate-test_sysconfig-for-posix_user-purelib.patch | 2 +- ...ip-NODEV-portion-of-test_makedev-when-lin.patch | 24 - ..._locale.py-correct-the-test-output-format.patch | 2 +- meta/recipes-devtools/python/python3_3.13.7.bb | 488 --------------------- meta/recipes-devtools/python/python3_3.13.9.bb | 487 ++++++++++++++++++++ 6 files changed, 491 insertions(+), 516 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/0001-gh-90548-Skip-NODEV-portion-of-test_makedev-when-lin.patch delete mode 100644 meta/recipes-devtools/python/python3_3.13.7.bb create mode 100644 meta/recipes-devtools/python/python3_3.13.9.bb (limited to 'meta/recipes-devtools/python') diff --git a/meta/recipes-devtools/python/python3/0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch b/meta/recipes-devtools/python/python3/0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch index 075737e7d1..327124e4e3 100644 --- a/meta/recipes-devtools/python/python3/0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch +++ b/meta/recipes-devtools/python/python3/0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch @@ -1441,8 +1441,8 @@ index eae0e0c..fb06f63 100755 +++ b/Tools/ssl/multissltests.py @@ -51,6 +51,7 @@ OPENSSL_RECENT_VERSIONS = [ "3.1.7", - "3.2.3", - "3.3.2", + "3.2.6", + "3.3.5", + "3.4.0", ] 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 ab433d1836..adaca4ff77 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 @@ -25,7 +25,7 @@ diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index 1ade492..4e94889 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py -@@ -423,7 +423,7 @@ class TestSysConfig(unittest.TestCase): +@@ -430,7 +430,7 @@ class TestSysConfig(unittest.TestCase): 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-gh-90548-Skip-NODEV-portion-of-test_makedev-when-lin.patch b/meta/recipes-devtools/python/python3/0001-gh-90548-Skip-NODEV-portion-of-test_makedev-when-lin.patch deleted file mode 100644 index 4390e086d0..0000000000 --- a/meta/recipes-devtools/python/python3/0001-gh-90548-Skip-NODEV-portion-of-test_makedev-when-lin.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2dc5e9f4c82888dbe21bd1eadb4b59b0efa9608c Mon Sep 17 00:00:00 2001 -From: Zachary Ware -Date: Sat, 6 Sep 2025 13:20:12 -0500 -Subject: [PATCH] gh-90548: Skip NODEV portion of test_makedev when linked to musl - -Upstream-Status: Backport [https://github.com/python/cpython/pull/138593] -Signed-off-by: Khem Raj ---- - Lib/test/test_posix.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py -index c9cbe15..bfc1e2b 100644 ---- a/Lib/test/test_posix.py -+++ b/Lib/test/test_posix.py -@@ -757,7 +757,7 @@ class PosixTester(unittest.TestCase): - self.assertRaises((ValueError, OverflowError), posix.makedev, x, minor) - self.assertRaises((ValueError, OverflowError), posix.makedev, major, x) - -- if sys.platform == 'linux': -+ if sys.platform == 'linux' and not support.linked_to_musl(): - NODEV = -1 - self.assertEqual(posix.major(NODEV), NODEV) - self.assertEqual(posix.minor(NODEV), NODEV) 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 3fc3a7e8ce..189246911b 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 @@ -34,7 +34,7 @@ diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py index da4bd79..fd9e67d 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py -@@ -502,7 +502,7 @@ class TestRealLocales(unittest.TestCase): +@@ -501,7 +501,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_3.13.7.bb b/meta/recipes-devtools/python/python3_3.13.7.bb deleted file mode 100644 index c682f1288e..0000000000 --- a/meta/recipes-devtools/python/python3_3.13.7.bb +++ /dev/null @@ -1,488 +0,0 @@ -SUMMARY = "The Python Programming Language" -HOMEPAGE = "http://www.python.org" -DESCRIPTION = "Python is a programming language that lets you work more quickly and integrate your systems more effectively." -LICENSE = "PSF-2.0" -SECTION = "devel/python" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=3f64a4ff490f884d562feb77bf2435f1" - -SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ - file://run-ptest \ - file://create_manifest3.py \ - file://get_module_deps3.py \ - file://python3-manifest.json \ - file://check_build_completeness.py \ - file://reformat_sysconfig.py \ - file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \ - file://0001-test_locale.py-correct-the-test-output-format.patch \ - file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \ - file://0001-test_ctypes.test_find-skip-without-tools-sdk.patch \ - 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-skip-no_stdout_fileno-test-due-to-load-variability.patch \ - file://0001-test_storlines-skip-due-to-load-variability.patch \ - file://0001-test_shutdown-skip-problematic-test.patch \ - file://0001-test_deadlock-skip-problematic-test.patch \ - file://0001-test_active_children-skip-problematic-test.patch \ - file://0001-test_readline-skip-limited-history-test.patch \ - file://0001-Generate-data-for-OpenSSL-3.4-and-add-it-to-multissl.patch \ - file://0001-gh-90548-Skip-NODEV-portion-of-test_makedev-when-lin.patch \ - " -SRC_URI:append:class-native = " \ - file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ - " - -SRC_URI[sha256sum] = "5462f9099dfd30e238def83c71d91897d8caa5ff6ebc7a50f14d4802cdaaa79a" - -# exclude pre-releases for both python 2.x and 3.x -UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P\d+(\.\d+)+).tar" - -CVE_PRODUCT = "python:python python_software_foundation:python cpython" - -PYTHON_MAJMIN = "3.13" - -S = "${UNPACKDIR}/Python-${PV}" - -BBCLASSEXTEND = "native nativesdk" - -inherit autotools pkgconfig qemu ptest multilib_header update-alternatives - -MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}" - -ALTERNATIVE:${PN}-dev = "python3-config" -ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config" -ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}" - -DEPENDS = "\ - autoconf-archive-native \ - bzip2 \ - bzip2-replacement-native \ - expat \ - libffi \ - ncurses \ - openssl \ - sqlite3 \ - util-linux-libuuid \ - virtual/crypt \ - virtual/libintl \ - xz \ - zlib \ -" - -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: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" - -export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/" - -EXTRANATIVEPATH += "python3-native" - -# LTO will be enabled via packageconfig depending upong distro features -LTO:class-target = "" - -CACHED_CONFIGUREVARS = " \ - ac_cv_file__dev_ptmx=yes \ - ac_cv_file__dev_ptc=no \ - ac_cv_working_tzset=yes \ -" -CACHED_CONFIGUREVARS:append:class-target = " \ - ac_cv_libatomic_needed=yes \ -" - -# set thread stack size to 2MB on musl for interpreter and stdlib C extensions -# so it does not run into stack limits due to musl's small thread stack -# This is only needed to build interpreter and not the subsequent modules -# Thats why CFLAGS_NODIST is modified instead of CFLAGS -CACHED_CONFIGUREVARS:append:libc-musl = "\ - CFLAGS_NODIST='${CFLAGS} -DTHREAD_STACK_SIZE=0x200000' \ -" - -# PGO currently causes builds to not be reproducible so disable by default, see YOCTO #13407 -PACKAGECONFIG ??= "editline gdbm ${@bb.utils.filter('DISTRO_FEATURES', 'lto', d)}" -PACKAGECONFIG[readline] = "--with-readline=readline,,readline,,,editline" -PACKAGECONFIG[editline] = "--with-readline=editline,,libedit,,,readline" -# Use profile guided optimisation by running PyBench inside qemu-user -PACKAGECONFIG[pgo] = "--enable-optimizations,,qemu-native" -PACKAGECONFIG[tk] = ",,tk" -PACKAGECONFIG[tcl] = ",,tcl" -PACKAGECONFIG[gdbm] = ",,gdbm" -PACKAGECONFIG[lto] = "--with-lto,--without-lto" -PACKAGECONFIG[staticlibpython] = "--with-static-libpython,--without-static-libpython" - -do_configure:prepend () { - mkdir -p ${B}/Modules - cat > ${B}/Modules/Setup.local << EOF -*disabled* -${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)} -${@bb.utils.contains_any('PACKAGECONFIG', 'readline editline', '', 'readline', d)} -${@bb.utils.contains('PACKAGECONFIG', 'tk', '', '_tkinter', d)} -EOF -} - -CPPFLAGS += "-I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" - -# COMPILEALL_OPTS= ensures that .pyc are not compiled in parallel -# This was found to lock up builds, break reproducibility, and produce strange file ownership -# races. -# -# The upstream commit introducing the change was: -# https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504 -# -# The build lock up issue is reported here: -# https://bugs.python.org/issue45945 -# -# The repro failures are documented here: -# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20211130-yr_o1a8d/packages/diff-html/ - -EXTRA_OEMAKE = '\ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - STAGING_INCDIR=${STAGING_INCDIR} \ - LIB=${baselib} \ - COMPILEALL_OPTS= \ -' - -# Generate a Profile Guided Optimisation wrapper script that uses qemu-user for -# all cross builds. -write_pgo_wrapper:class-native = ":" -write_pgo_wrapper() { - if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then - cat >pgo-wrapper < ${B}/Modules/Setup.local << EOF +*disabled* +${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '', '_gdbm _dbm', d)} +${@bb.utils.contains_any('PACKAGECONFIG', 'readline editline', '', 'readline', d)} +${@bb.utils.contains('PACKAGECONFIG', 'tk', '', '_tkinter', d)} +EOF +} + +CPPFLAGS += "-I${STAGING_INCDIR}/ncursesw -I${STAGING_INCDIR}/uuid" + +# COMPILEALL_OPTS= ensures that .pyc are not compiled in parallel +# This was found to lock up builds, break reproducibility, and produce strange file ownership +# races. +# +# The upstream commit introducing the change was: +# https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504 +# +# The build lock up issue is reported here: +# https://bugs.python.org/issue45945 +# +# The repro failures are documented here: +# https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20211130-yr_o1a8d/packages/diff-html/ + +EXTRA_OEMAKE = '\ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + STAGING_INCDIR=${STAGING_INCDIR} \ + LIB=${baselib} \ + COMPILEALL_OPTS= \ +' + +# Generate a Profile Guided Optimisation wrapper script that uses qemu-user for +# all cross builds. +write_pgo_wrapper:class-native = ":" +write_pgo_wrapper() { + if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then + cat >pgo-wrapper <