From nobody Thu Nov 13 23:24:15 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1583253346; cv=none; d=zohomail.com; s=zohoarc; b=bSQ/ctNWCkIzD8w36+uXO+aqtAPu9kaRT4i0pH9kgy0m0vf0SfbbhLiQTdSZyEGgZJlYWeCJ0takiKhxEKCHGV6YL/78MgVmKzerLJ1VPYN+Yg1+FjqjxN2MHSjUTJzD9wx5JnKsXUcW6wS7I3irAx4xv8V+ZlO2AM7fTUnAeQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583253346; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Fbo5JhnnTf0I02ZkCG4yrI4+5qo3vdDLrEPTR8T/fbg=; b=Gsn0A8VCS1qoEjZa/X+8kc+Zt2rU8Vb86Lujv/17Lr2QnwmSH2v35mobZLGXz0VfwElQ4FgxhApJ0ljR6qeDlNtNeNZlzyGKeccWLbtNE4soIROcZvC5J6CkRiovck8QRx+LxPG5lB1r7iVMt58XO7wUHZMVSgevvvGxTGq3dqM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1583253346081278.82395694405227; Tue, 3 Mar 2020 08:35:46 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-267-jDznNqMsMP-anoKzfpfmVA-1; Tue, 03 Mar 2020 11:35:42 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 51064801FC7; Tue, 3 Mar 2020 16:35:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 223055C1D4; Tue, 3 Mar 2020 16:35:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C5E9718089D6; Tue, 3 Mar 2020 16:35:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 023GZCFr001182 for ; Tue, 3 Mar 2020 11:35:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id F26421000322; Tue, 3 Mar 2020 16:35:11 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-129.ams2.redhat.com [10.36.116.129]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BC6E61001920; Tue, 3 Mar 2020 16:35:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id D29581133013; Tue, 3 Mar 2020 17:35:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583253345; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Fbo5JhnnTf0I02ZkCG4yrI4+5qo3vdDLrEPTR8T/fbg=; b=VVPgcpHRjIwlZSILpOynvpm3KNU5wRkZ0YdKQJqP9oo1Wc/yxbIJFhR+74cRkgaLhcSWoG Jh4KBOl+fwRJP3DDyml/Gn1DYvntMCM/oNqAJbrzlrDIo3SLd3IQH4wkn0SDsUWmo/wF3n 1oKE5HqTby22kMHOGO1T2NV/rlYK4xs= X-MC-Unique: jDznNqMsMP-anoKzfpfmVA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 11/30] qapi/schema: Clean up around QAPISchemaEntity.connect_doc() Date: Tue, 3 Mar 2020 17:34:46 +0100 Message-Id: <20200303163505.32041-12-armbru@redhat.com> In-Reply-To: <20200303163505.32041-1-armbru@redhat.com> References: <20200303163505.32041-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" QAPISchemaEntity calls doc.connect_feature() in .check(). Improper since commit ee1e6a1f6c8 split .connect_doc() off .check(). Move the call. Requires making the children call super().connect_doc() as they should. Signed-off-by: Markus Armbruster --- scripts/qapi/schema.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index cfbb9758c4..1c8d126441 100644 --- a/scripts/qapi/schema.py +++ b/scripts/qapi/schema.py @@ -53,13 +53,13 @@ class QAPISchemaEntity: seen =3D {} for f in self.features: f.check_clash(self.info, seen) - if self.doc: - self.doc.connect_feature(f) - self._checked =3D True =20 def connect_doc(self, doc=3DNone): - pass + doc =3D doc or self.doc + if doc: + for f in self.features: + doc.connect_feature(f) =20 def check_doc(self): if self.doc: @@ -250,6 +250,7 @@ class QAPISchemaEnumType(QAPISchemaType): m.check_clash(self.info, seen) =20 def connect_doc(self, doc=3DNone): + super().connect_doc(doc) doc =3D doc or self.doc if doc: for m in self.members: @@ -392,6 +393,7 @@ class QAPISchemaObjectType(QAPISchemaType): m.check_clash(info, seen) =20 def connect_doc(self, doc=3DNone): + super().connect_doc(doc) doc =3D doc or self.doc if doc: if self.base and self.base.is_implicit(): @@ -668,6 +670,7 @@ class QAPISchemaAlternateType(QAPISchemaType): types_seen[qt] =3D v.name =20 def connect_doc(self, doc=3DNone): + super().connect_doc(doc) doc =3D doc or self.doc if doc: for v in self.variants.variants: @@ -734,6 +737,7 @@ class QAPISchemaCommand(QAPISchemaEntity): % self.ret_type.describe()) =20 def connect_doc(self, doc=3DNone): + super().connect_doc(doc) doc =3D doc or self.doc if doc: if self.arg_type and self.arg_type.is_implicit(): @@ -776,6 +780,7 @@ class QAPISchemaEvent(QAPISchemaEntity): % self.arg_type.describe()) =20 def connect_doc(self, doc=3DNone): + super().connect_doc(doc) doc =3D doc or self.doc if doc: if self.arg_type and self.arg_type.is_implicit(): --=20 2.21.1