From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebRXG-0008Fo-07 for qemu-devel@nongnu.org; Tue, 16 Jan 2018 08:44:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebRX8-0001E3-I8 for qemu-devel@nongnu.org; Tue, 16 Jan 2018 08:44:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51664) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebRX8-0001DS-Bd for qemu-devel@nongnu.org; Tue, 16 Jan 2018 08:44:10 -0500 From: "Daniel P. Berrange" Date: Tue, 16 Jan 2018 13:42:10 +0000 Message-Id: <20180116134217.8725-8-berrange@redhat.com> In-Reply-To: <20180116134217.8725-1-berrange@redhat.com> References: <20180116134217.8725-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v5 07/14] qapi: ensure stable sort ordering when checking QAPI entities List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Fam Zheng , Eduardo Habkost , Markus Armbruster , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Blake , "Daniel P. Berrange" Some early python 3.x versions will have different default ordering when calling the 'values()' method on a dict, compared to python 2.x and later 3.x versions. Explicitly sort the items to get a stable ordering. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Daniel P. Berrange --- scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 1fdd189c0d..58f995b07f 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -1678,7 +1678,7 @@ class QAPISchema(object): assert False =20 def check(self): - for ent in self._entity_dict.values(): + for (name, ent) in sorted(self._entity_dict.items()): ent.check(self) =20 def visit(self, visitor): --=20 2.14.3