From patchwork Wed Nov 11 14:17:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 103750 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.10228.1794406653518225283 for ; Wed, 11 Nov 2026 06:17:33 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=VqT+lpXm; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 19B3F1576 for ; Wed, 11 Nov 2026 06:17:30 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C913A3F632 for ; Wed, 11 Nov 2026 06:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1794406653; bh=qu+PONV4LU0aEx8bhaZi/o/C26CyFWm4Y5jOyBbSn1g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VqT+lpXmewUsAJONV5RPY6a4ooopmeudd2g3pR9g+w3hYk8Z96nI/4FV2UOGnCsl3 AZYViwIHLqP4SOZ0ebaMMEhEsAax1QDzRi9hKHjQd3Ejjwaqy0sFDONWN8SFbCXQts 0UkqC+4fv1q6fdtANIcXiwqElaVZHz0AzYNoMVTM= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 4/6] python3: no need to use an OrderedDict Date: Wed, 11 Nov 2026 14:17:24 +0000 Message-ID: <20261111141726.1496785-4-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261111141726.1496785-1-ross.burton@arm.com> References: <20261111141726.1496785-1-ross.burton@arm.com> MIME-Version: 1.0 X-ARM-No-Footer: NoDisclaimer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Wed, 11 Nov 2026 14:17:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250033 As of Python 3.7, standard dictionaries are sorted by insertion order. As this stable order was the only reason for using OrderedDict, we can switch to using a normal dictionary. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3/create_manifest3.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py index 5dda382de8f..029d9235c1a 100644 --- a/meta/recipes-devtools/python/python3/create_manifest3.py +++ b/meta/recipes-devtools/python/python3/create_manifest3.py @@ -37,7 +37,6 @@ import sys import subprocess import json import os -import collections if '-d' in sys.argv: debugFlag = '-d' @@ -54,7 +53,7 @@ for p in sys.path: nativelibfolder = p[:p.find(pivot)+len(pivot)] # Empty dict to hold the whole manifest -new_manifest = collections.OrderedDict() +new_manifest = {} # Check for repeated files, folders and wildcards allfiles = [] @@ -91,7 +90,7 @@ with open('python3-manifest.json') as manifest: manifest.seek(0) comments = manifest.read(json_start) manifest_str = manifest.read() - old_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict) + old_manifest = json.loads(manifest_str) # # First pass to get core-package functionality, because we base everything on the fact that core is actually working @@ -195,7 +194,7 @@ for pypkg in old_manifest: for pypkg in old_manifest: # Use an empty dict as data structure to hold data for each package and fill it up - new_manifest[pypkg] = collections.OrderedDict() + new_manifest[pypkg] = {} new_manifest[pypkg]['summary'] = old_manifest[pypkg]['summary'] new_manifest[pypkg]['rdepends'] = [] new_manifest[pypkg]['files'] = []