Skip to contentSkip to conversation

python3-ipy: upgrade 1.01 -> 1.2

PATCH New Khem Raj 1 participant 8 messages Oct 26

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/8 python3-ipy: upgrade 1.01 -> 1.2

Changelog:
* Drop Python 2 support; require Python 3.5+
* Remove the module-level names INT_TYPES, STR_TYPES and xrange
* Add inline type annotations; IPy is now a package that ships py.typed
* Fix IP.broadcast() returning an IPv4 address for IPv6 networks
* Fix IP.reverseName() for 0.0.0.0/0
* Fix the flaky IPSet fuzz test

The fuzz test fix stops the intermittent ptest failure in TestIPSet.testRandomContains, whose oracle ignored that IPSet merges adjacent prefixes into a larger one.

The sdist is now named ipy-1.2.tar.gz, so drop PYPI_PACKAGE_SDIST.

AI-Generated: Uses Claude Code

---
 .../python/{python3-ipy_1.01.bb => python3-ipy_1.2.bb}        | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
 rename meta-python/recipes-devtools/python/{python3-ipy_1.01.bb => python3-ipy_1.2.bb} (84%)
meta-python/recipes-devtools/python/python3-ipy_1.2.bb renamed from meta-python/recipes-devtools/python/python3-ipy_1.01.bb +1 -3
similarity index 84%
rename from meta-python/recipes-devtools/python/python3-ipy_1.01.bb
rename to meta-python/recipes-devtools/python/python3-ipy_1.2.bb
index 437f23975d..1e128e8370 100644
@@ -9,12 +9,10 @@ HOMEPAGE = "https://github.com/autocracy/python-ipy"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=848d24919845901b4f48bae5f13252e6"
 
-SRC_URI[sha256sum] = "edeca741dea2d54aca568fa23740288c3fe86c0f3ea700344571e9ef14a7cc1a"
+SRC_URI[sha256sum] = "c145e664e84642fac875a043fab1a0b50bd65297385dc438dbfe25f24e65ac61"
 
 inherit pypi setuptools3_legacy ptest-python-pytest
 
 PTEST_PYTEST_DIR = "test"
 
-PYPI_PACKAGE_SDIST = "IPy"
-
 BBCLASSEXTEND = "native"
author
#1 lore raw

PATCH 2/8 python3-scapy: Skip live whois tests in ptest

"Whois request" and "AS resolver - IPv6" only query public whois servers and upstream notes they often fail. "AS resolver - IPv6" failed intermittently in testimage on qemuarm64 and passed on a rerun. Tag both with skipped_ptest so run-ptest leaves them out.

AI-Generated: Uses Claude Code

---
 ...-test-skip-live-whois-tests-in-ptest.patch | 43 +++++++++++++++++++
 .../python/python3-scapy_2.7.0.bb             |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta-networking/recipes-devtools/python/python3-scapy/0005-test-skip-live-whois-tests-in-ptest.patch
meta-networking/recipes-devtools/python/python3-scapy/0005-test-skip-live-whois-tests-in-ptest.patch new file +43 -0
new file mode 100644
index 0000000000..479500abe9
@@ -0,0 +1,43 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 25 Oct 2026 15:56:41 -0700
+Subject: [PATCH] test: skip live whois tests in ptest
+
+"Whois request" and "AS resolver - IPv6" only query public whois
+servers, and upstream already notes that they often fail. In OE
+testimage runs "AS resolver - IPv6" fails intermittently and turns the
+whole ptest result into a failure, while it passes on a rerun.
+
+Tag them with "skipped_ptest" so run-ptest filters them out with
+-K skipped_ptest. "AS resolvers" is kept since it also carries the
+offline riswhois and cymru parser checks.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ test/regression.uts | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/regression.uts b/test/regression.uts
+index b6bb9d6..c818e4c 100644
+--- a/test/regression.uts
++++ b/test/regression.uts
+@@ -1781,7 +1781,7 @@ def _test():
+ retry_test(_test)
+
+ = Whois request
+-~ netaccess IP as_resolvers
++~ netaccess IP as_resolvers skipped_ptest
+ * This test retries on failure because it often fails
+ def _test():
+     IP(src="8.8.8.8").whois()
+@@ -1825,7 +1825,7 @@ assert len(tmp) == 3
+ assert [l[1] for l in tmp] == ['AS24776', 'AS36459', 'AS26496']
+
+ = AS resolver - IPv6
+-~ netaccess IP as_resolvers
++~ netaccess IP as_resolvers skipped_ptest
+ * This test retries on failure because it often fails
+
+ def _test():
meta-networking/recipes-devtools/python/python3-scapy_2.7.0.bb +1 -0
index aa570308a9..4995f8e2cd 100644
@@ -22,6 +22,7 @@ SRC_URI = "git://github.com/secdev/scapy.git;branch=master;protocol=https;tag=v$
            file://0002-main-initialize-banner-for-the-default-Python-shell.patch \
            file://0003-libpcap-load-libpcap-even-when-find_library-cannot-l.patch \
            file://0004-test-don-t-depend-on-libc-formatting-of-IPv4-compati.patch \
+           file://0005-test-skip-live-whois-tests-in-ptest.patch \
            file://run-ptest"
 
 UPSTREAM_CHECK_COMMITS = "1"
author
#2 lore raw

PATCH 3/8 re2: Skip upstream's big tests in ptest under QEMU

In reply to Khem Raj

The CMake build registers every test with ctest, including the ones upstream's Makefile keeps in BIGTESTS (and Bazel marks size = "large"), which "make test" does not run. Each of these runs silently until it finishes, and under qemu emulation several of them take longer than the ptest-runner timeout. On qemuriscv64, dfa_test stalled in Multithreaded.SearchDFA until ptest-runner killed the whole suite after 450s. Under qemu-user, exhaustive3_test takes ~460s, random_test ~760s, and dfa_test more than 15 minutes.

Exclude dfa_test, exhaustive*_test and random_test from run-ptest when running under QEMU, detected at runtime via DMI sys_vendor, a fw-cfg device tree node or a qemu device tree compatible. Doing this at build time with a qemuall override would make re2's task signatures differ between machines sharing a tune. Real hardware still runs all tests.

AI-Generated: Uses Claude Code

---
 meta-oe/recipes-support/re2/re2/run-ptest | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
meta-oe/recipes-support/re2/re2/run-ptest +18 -1
index 8bd5fd1efb..8026ebc2b5 100644
@@ -1,3 +1,20 @@
 #!/bin/sh
 
-ctest --force-new-ctest-process | sed -u 's/\*\*\*/   /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}'
+# Running under QEMU (x86 and UEFI arm64 report it via DMI, arm/arm64/riscv
+# virt machines have a fw-cfg node, ppc64 pseries a qemu compatible)
+is_qemu() {
+    [ "$(cat /sys/class/dmi/id/sys_vendor 2>/dev/null)" = "QEMU" ] && return 0
+    for f in /proc/device-tree/fw-cfg@*; do
+        [ -e "$f" ] && return 0
+    done
+    grep -qs qemu /proc/device-tree/compatible
+}
+
+# Under QEMU, skip the tests upstream's Makefile lists as BIGTESTS (not run by
+# "make test", "size = large" in Bazel); emulated, each of them can run for
+# longer than the ptest-runner timeout without printing anything.
+if is_qemu; then
+    set -- -E '^(dfa|exhaustive[0-9]*|random)_test$'
+fi
+
+ctest --force-new-ctest-process "$@" | sed -u 's/\*\*\*/   /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}'
author
#3 lore raw

PATCH 4/8 HDF5: Remove license file

In reply to Khem Raj

Its added to OE-core via below commit

commit f9903f74ee36de4dd592f3bc8b1ce7b08f32608c

Author: Ross Burton <[email protected]>
Date:   Fri Oct 17 14:16:25 2025 +0100
---
 meta-oe/licenses/HDF5 | 92 -------------------------------------------
 1 file changed, 92 deletions(-)
 delete mode 100644 meta-oe/licenses/HDF5
meta-oe/licenses/HDF5 deleted +0 -92
deleted file mode 100644
index 10481dd107..0000000000
@@ -1,92 +0,0 @@
-Copyright Notice and License Terms for 
-HDF5 (Hierarchical Data Format 5) Software Library and Utilities
------------------------------------------------------------------------------
-
-HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-Copyright (c) 2006-2018, The HDF Group. 
-
-NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-Copyright (c) 1998-2006, The Board of Trustees of the University of Illinois. 
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without 
-modification, are permitted for any purpose (including commercial purposes) 
-provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, 
-   this list of conditions, and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice, 
-   this list of conditions, and the following disclaimer in the documentation 
-   and/or materials provided with the distribution.
-
-3. Neither the name of The HDF Group, the name of the University, nor the 
-   name of any Contributor may be used to endorse or promote products derived 
-   from this software without specific prior written permission from 
-   The HDF Group, the University, or the Contributor, respectively.
-
-DISCLAIMER: 
-THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS 
-"AS IS" WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT SHALL THE HDF GROUP OR THE CONTRIBUTORS BE LIABLE FOR ANY DAMAGES SUFFERED BY THE USERS ARISING OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- 
-You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to The HDF Group, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form.
-
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-
-Limited portions of HDF5 were developed by Lawrence Berkeley National 
-Laboratory (LBNL). LBNL's Copyright Notice and Licensing Terms can be
-found here: COPYING_LBNL_HDF5 file in this directory or at 
-http://support.hdfgroup.org/ftp/HDF5/releases/COPYING_LBNL_HDF5. 
-
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-
-Contributors:   National Center for Supercomputing Applications (NCSA) at 
-the University of Illinois, Fortner Software, Unidata Program Center (netCDF), The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip), and Digital Equipment Corporation (DEC).
-
------------------------------------------------------------------------------
- 
-Portions of HDF5 were developed with support from the Lawrence Berkeley 
-National Laboratory (LBNL) and the United States Department of Energy 
-under Prime Contract No. DE-AC02-05CH11231.
-
------------------------------------------------------------------------------
-
-Portions of HDF5 were developed with support from the University of 
-California, Lawrence Livermore National Laboratory (UC LLNL).  
-The following statement applies to those portions of the product and must 
-be retained in any redistribution of source code, binaries, documentation, 
-and/or accompanying materials:
-
-   This work was partially produced at the University of California, 
-   Lawrence Livermore National Laboratory (UC LLNL) under contract 
-   no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy 
-   (DOE) and The Regents of the University of California (University) 
-   for the operation of UC LLNL.
-
-   DISCLAIMER: 
-   This work was prepared as an account of work sponsored by an agency of 
-   the United States Government. Neither the United States Government nor 
-   the University of California nor any of their employees, makes any 
-   warranty, express or implied, or assumes any liability or responsibility 
-   for the accuracy, completeness, or usefulness of any information, 
-   apparatus, product, or process disclosed, or represents that its use 
-   would not infringe privately- owned rights. Reference herein to any 
-   specific commercial products, process, or service by trade name, 
-   trademark, manufacturer, or otherwise, does not necessarily constitute 
-   or imply its endorsement, recommendation, or favoring by the United 
-   States Government or the University of California. The views and 
-   opinions of authors expressed herein do not necessarily state or reflect 
-   those of the United States Government or the University of California, 
-   and shall not be used for advertising or product endorsement purposes.
-
------------------------------------------------------------------------------
-
-HDF5 is available with the SZIP compression library but SZIP is not part 
-of HDF5 and has separate copyright and license terms. See SZIP Compression 
-in HDF Products (www.hdfgroup.org/doc_resource/SZIP/) for further details.
-
------------------------------------------------------------------------------
-
author
#4 lore raw

PATCH 5/8 hdf5: Add PACKAGECONFIG for the C++ library

In reply to Khem Raj

Since 1.14.0 upstream no longer builds the C++ library (libhdf5_cpp, libhdf5_hl_cpp) by default, so recipes that need it fail to find it. Add a "cpp" PACKAGECONFIG to turn on HDF5_BUILD_CPP_LIB, keeping it disabled by default.

The C++ build also installs the h5c++ compiler wrapper, which needs the same RECIPE_SYSROOT_NATIVE cleanup and multilib script handling as h5cc.

---
 meta-oe/recipes-support/hdf5/hdf5_2.0.0.bb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
meta-oe/recipes-support/hdf5/hdf5_2.0.0.bb +10 -1
index a0eb5eb155..4e493f0aa7 100644
@@ -35,6 +35,10 @@ EXTRA_OECMAKE = " \
     -DCMAKE_INSTALL_PREFIX='${prefix}' \
     -DHDF5_INSTALL_LIB_DIR='${baselib}' \
 "
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[cpp] = "-DHDF5_BUILD_CPP_LIB=ON,-DHDF5_BUILD_CPP_LIB=OFF"
+
 EXTRA_OECMAKE:prepend:class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper "
 
 gen_emu() {
@@ -60,9 +64,14 @@ do_install:append() {
     # Used for generating config files on target
     oe_multilib_header H5pubconf.h
     sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5cc
+    if ${@bb.utils.contains('PACKAGECONFIG', 'cpp', 'true', 'false', d)}; then
+        sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' ${D}${bindir}/h5c++
+    fi
 }
 
-MULTILIB_SCRIPTS += "${PN}:${bindir}/h5cc"
+MULTILIB_SCRIPTS += "${PN}:${bindir}/h5cc \
+                     ${@bb.utils.contains('PACKAGECONFIG', 'cpp', '${PN}:${bindir}/h5c++', '', d)} \
+"
 
 BBCLASSEXTEND = "native"
 
author
#5 lore raw

PATCH 6/8 tbb: Skip test_resumable_tasks in ptest under QEMU

In reply to Khem Raj

test_resumable_tasks suspends and resumes tasks about 6 million times. On qemuriscv64 it passes but takes ~790s without printing anything, so ptest-runner hits its 450s timeout and kills the whole suite after 28 tests.

Skip it when running under QEMU, detected at runtime via DMI sys_vendor, a fw-cfg device tree node or a qemu device tree compatible, so real hardware still runs it. With that, all other 140 tests pass on qemuriscv64.

AI-Generated: Uses Claude Code

---
 meta-oe/recipes-support/tbb/files/run-ptest | 23 ++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)
meta-oe/recipes-support/tbb/files/run-ptest +20 -3
index ef14dab437..d5ca892150 100755
@@ -1,10 +1,27 @@
 #!/bin/sh
 
-# ctest result lines look like: "  1/142 Test   #1: test_tick_count .....   Passed    0.01 sec"
-# anything other than Passed/Skipped/Disabled (Failed, Timeout, Exception, Not Run) is a FAIL
+# Running under QEMU (x86 and UEFI arm64 report it via DMI, arm/arm64/riscv
+# virt machines have a fw-cfg node, ppc64 pseries a qemu compatible)
+is_qemu() {
+    [ "$(cat /sys/class/dmi/id/sys_vendor 2>/dev/null)" = "QEMU" ] && return 0
+    for f in /proc/device-tree/fw-cfg@*; do
+        [ -e "$f" ] && return 0
+    done
+    grep -qs qemu /proc/device-tree/compatible
+}
+
 # test_scheduler_mix hangs intermittently on every architecture
 # https://github.com/uxlfoundation/oneTBB/issues/1281
-ctest -E '^test_scheduler_mix$' | awk '/Test +#[0-9]+:/ {
+SKIP='test_scheduler_mix'
+# test_resumable_tasks switches fibers ~6 million times; emulated, it runs
+# silently for longer than the ptest-runner timeout (~790s on qemuriscv64)
+if is_qemu; then
+    SKIP="$SKIP|test_resumable_tasks"
+fi
+
+# ctest result lines look like: "  1/142 Test   #1: test_tick_count .....   Passed    0.01 sec"
+# anything other than Passed/Skipped/Disabled (Failed, Timeout, Exception, Not Run) is a FAIL
+ctest -E "^($SKIP)\$" | awk '/Test +#[0-9]+:/ {
     if ($0 ~ /Passed/) res = "PASS"
     else if ($0 ~ /Skipped|Disabled/) res = "SKIP"
     else res = "FAIL"
author
#6 lore raw

PATCH 7/8 python3-simple-websocket: Add recipe

In reply to Khem Raj

Simple WebSocket server and client for Python, built on wsproto.

Backport the upstream conversion of the async tests to pytest-asyncio; the 1.1.0 tests call asyncio.get_event_loop(), which fails on Python 3.14 when there is no current event loop. Add it to the fast ptest list; all 47 tests pass on qemuriscv64.

AI-Generated: Uses Claude Code

---
 .../ptest-packagelists-meta-python.inc        |   1 +
 ...test-improvements-for-Python-3.14-48.patch | 422 ++++++++++++++++++
 .../python/python3-simple-websocket_1.1.0.bb  |  19 +
 3 files changed, 442 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-simple-websocket/0001-Async-test-improvements-for-Python-3.14-48.patch
 create mode 100644 meta-python/recipes-devtools/python/python3-simple-websocket_1.1.0.bb
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index 92183897c7..6e4af06aaa 100644
@@ -103,6 +103,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-serpent \
     python3-service-identity \
     python3-setproctitle \
+    python3-simple-websocket \
     python3-simpleeval \
     python3-six \
     python3-smpplib \
meta-python/recipes-devtools/python/python3-simple-websocket/0001-Async-test-improvements-for-Python-3.14-48.patch new file +422 -0

422 lines not on this page · raw message

meta-python/recipes-devtools/python/python3-simple-websocket_1.1.0.bb new file +19 -0
new file mode 100644
index 0000000000..35c568cf7c
@@ -0,0 +1,19 @@
+SUMMARY = "Simple WebSocket server and client for Python"
+HOMEPAGE = "https://github.com/miguelgrinberg/simple-websocket"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9d272c9fe2437531b5bbecf4fcc82e24"
+
+inherit pypi python_setuptools_build_meta ptest-python-pytest
+
+SRC_URI += "file://0001-Async-test-improvements-for-Python-3.14-48.patch"
+SRC_URI[sha256sum] = "7939234e7aa067c534abdab3a9ed933ec9ce4691b0713c78acb195560aa52ae4"
+
+RDEPENDS:${PN} += " \
+    python3-asyncio \
+    python3-io \
+    python3-wsproto \
+"
+
+RDEPENDS:${PN}-ptest += " \
+    python3-pytest-asyncio \
+"
author
#7 lore raw

PATCH 8/8 python3-engineio: Add missing runtime dependencies

In reply to Khem Raj

simple-websocket is the only hard dependency in pyproject.toml, and the default threading async mode uses it for WebSocket connections. The threading driver and the client also import queue (python3-threading), and the client imports ssl (python3-io).

---
 meta-python/recipes-devtools/python/python3-engineio_4.14.0.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-python/recipes-devtools/python/python3-engineio_4.14.0.bb +3 -0
index cabee98d00..3811ca332c 100644
@@ -15,6 +15,9 @@ RDEPENDS:${PN} += " \
 	python3-logging \
 	python3-compression \
 	python3-asyncio \
+	python3-io \
+	python3-simple-websocket \
+	python3-threading \
 "
 
 SRC_URI[sha256sum] = "eaa1e386baf9c2c7959eef7f9d9165c5ea910c5b392f5316e78d29ed073cb43d"