From nobody Tue Feb 10 15:01:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1649159019; cv=none; d=zohomail.com; s=zohoarc; b=IpPA7CDMFkM+SMHTOx70u7rnxS0Eur+SUlNJMGkSHMsTM3Ksaftil2CzNe6kayiIAz2GlsDHK0FJ2fJlJzEIpEbRBI4E0tvn/2FA4F4OlX7/jIRPYA2HH+c2/z1OlR8zW7REfALctrKHS8CIsTxPGKxexxmInXg6k8fzNN3gwcg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649159019; h=Content-Type:Content-Transfer-Encoding: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=PUM5Pk0sgcmp0GNkc4vh9SUIX4txDGpcUzBDH7XbAk0=; b=YRX71a6sLWyXZBEs4+cjm4opvgZGZr3cIwN72VKGBscy/KgbLOHPM4n9XafvcDTpZpcfJSkOfYT7h9hX2RbYlJRbvhHX1py0/M8aeWTKqTGe4ofaIui8fExsMSrmGvEWWPbEVgwKaaWuEvf46d9s0BCnFOhCmBMNbvZGAzqDJ0s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1649159019136842.4734453496695; Tue, 5 Apr 2022 04:43:39 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-612-w69OcFVwOs2IVUgTgA0dLA-1; Tue, 05 Apr 2022 07:43:34 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D86E899ED6; Tue, 5 Apr 2022 11:43:32 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E67D740CF8EE; Tue, 5 Apr 2022 11:43:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9B9801940346; Tue, 5 Apr 2022 11:43:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7089F193F6E9 for ; Tue, 5 Apr 2022 11:43:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 60ECD40CF8F1; Tue, 5 Apr 2022 11:43:30 +0000 (UTC) Received: from tapioca.home (unknown [10.40.192.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD96640CF8E5 for ; Tue, 5 Apr 2022 11:43:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649159017; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=PUM5Pk0sgcmp0GNkc4vh9SUIX4txDGpcUzBDH7XbAk0=; b=PORlgMl9dYK2lL3yOAScFwOogfnBM8B7fJTWRa7d5c/glW+Jsvc9ud5c6ypaABdHhXLKKx Z2X/LsuyEXP9cXtD9lpBaq2CvY10C1HG7klnIbRWlD5FtOsfiux2EYODo/MKBh9lYx4akV +dEmkh7Ob6wnaWwNExuGecHNSJxpXjQ= X-MC-Unique: w69OcFVwOs2IVUgTgA0dLA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Victor Toso To: libvir-list@redhat.com Subject: [PATCH v1 4/4] scripts: apibuild: add 'version' to variables Date: Tue, 5 Apr 2022 13:43:23 +0200 Message-Id: <20220405114323.33153-5-victortoso@redhat.com> In-Reply-To: <20220405114323.33153-1-victortoso@redhat.com> References: <20220405114323.33153-1-victortoso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1649159019537100003 Content-Type: text/plain; charset="utf-8"; x-default="true" Differently from the previous patches, we don't parse nor export comments associated with variables. This isn't a big deal because we only export a single variable: virConnectAuthPtrDefault Nonetheless, add version field to the exported XML by checking the allowlist file. This way, if we add another variable in the future, we can simply add it to that file. Calling the function should also warn in case we are exporting a new Variable without adding to the file, e.g: Missing 'Since' tag for: virConnectAuthPtrDefault Signed-off-by: Victor Toso --- scripts/apibuild.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index 1235e75999..5493b3065e 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -2341,12 +2341,14 @@ class docBuilder: =20 def serialize_variable(self, output, name): id =3D self.idx.variables[name] + # Only a single variable exported at the moment. Comments are not = parser nor exported. + (_, since) =3D self.retrieve_comment_tags(name, "") if id.info is not None: - output.write(" \n" % ( - name, self.modulename_file(id.header), id.info)) + output.write(" \n" % ( + name, self.modulename_file(id.header), id.info, since)) else: - output.write(" \n" % ( - name, self.modulename_file(id.header))) + output.write(" \n" % ( + name, self.modulename_file(id.header), since)) =20 def serialize_function(self, output, name): id =3D self.idx.functions[name] --=20 2.35.1