From 7528dca88c197a1a58af9729b176f77fdbf3e1a8 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 16 Aug 2026 08:52:12 +0200 Subject: [PATCH] python3-rapidjson: deselect test broken by modern CPython refcounting test_endarray_leak asserts sys.getrefcount(j1['v']) == 3, but modern CPython's specialized dict/subscript bytecode holds one fewer temporary reference during the call, so the real count is 2 regardless of environment (reproduces on plain upstream CPython 3.13, unrelated to this target). Upstream test-authoring assumption broken by CPython internals, not a packaging issue. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- .../recipes-devtools/python/python3-rapidjson_1.19.bb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta-python/recipes-devtools/python/python3-rapidjson_1.19.bb b/meta-python/recipes-devtools/python/python3-rapidjson_1.19.bb index 5c47e06918..761676d2ce 100644 --- a/meta-python/recipes-devtools/python/python3-rapidjson_1.19.bb +++ b/meta-python/recipes-devtools/python/python3-rapidjson_1.19.bb @@ -26,3 +26,13 @@ RDEPENDS:${PN} += " \ python3-core \ " +do_install_ptest:append() { + # test_endarray_leak asserts sys.getrefcount(j1['v']) == 3, but modern + # CPython's specialized dict/subscript bytecode holds one fewer temporary + # reference during the call, so the real count is 2 regardless of + # environment (reproduces on plain upstream CPython 3.13, unrelated to + # this target). Upstream test-authoring assumption broken by CPython + # internals, not a packaging issue. + sed -i -e "/--automake/ s/$/ -k 'not test_endarray_leak'/" \ + ${D}${PTEST_PATH}/run-ptest +}