From nobody Sun Apr 28 02:07:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+51784+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51784+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575544801; cv=none; d=zohomail.com; s=zohoarc; b=TpicJ2bEpHNuxT5J/PQnXGZBcUIHopseChNVIoBC6r62CVWVVTXU0BqTh8kFmaTBnr3IN7eF8PPyQpOPnkP1ywnK8rkalR/uZV8apM33h226gbgC5FWIObs++6L4deO4a+69Q7qDofIsshap7dOOEdp4Bsu9MyoaHsDRtfPx+FA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575544801; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=sZHrF2rThDPKlU9VHBhgBJKwXGLoo73HeBkbV6Hbfg8=; b=cHvB/MQ3IxpXHjnCs8VUpG5z9BiAiXO3ieaFYMpV0/ESHOShXI8DWlcFUpf1of5QFbpEf5xOKcyXXMBtlPeB6m+ZaRvKqVVA30hEIGgNfRpRI+R4kZSiVlGjfXARhM2iMoxbR3wKywMzJ4sKq9dm0OMqXGgGDcD4qG1/LuoWYOA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51784+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1575544801851970.2428579889705; Thu, 5 Dec 2019 03:20:01 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 2B3QYY1788612xugOBA9rxfE; Thu, 05 Dec 2019 03:20:01 -0800 X-Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web09.7645.1575544800883259434 for ; Thu, 05 Dec 2019 03:20:01 -0800 X-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-427-zbinORhMOiKd6nf0eptW6Q-1; Thu, 05 Dec 2019 06:19:56 -0500 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 296C9DBF8; Thu, 5 Dec 2019 11:19:55 +0000 (UTC) X-Received: from x1w.redhat.com (ovpn-205-76.brq.redhat.com [10.40.205.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DA85E1D1; Thu, 5 Dec 2019 11:19:51 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: devel@edk2.groups.io Cc: Sean Brogan , "Zhiju . Fan" , Bret Barkelew , Bob Feng , Liming Gao , Michael D Kinney , Philippe Mathieu-Daude Subject: [edk2-devel] [PATCH v2 1/2] BaseTools: Avoid "is" with a literal Python 3.8 warnings Date: Thu, 5 Dec 2019 12:19:41 +0100 Message-Id: <20191205111942.19492-2-philmd@redhat.com> In-Reply-To: <20191205111942.19492-1-philmd@redhat.com> References: <20191205111942.19492-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: zbinORhMOiKd6nf0eptW6Q-1 X-Mimecast-Spam-Score: 0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,philmd@redhat.com X-Gm-Message-State: jNjVskx4FfRdv5Wd7bBl8ijEx1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1575544801; bh=bzvf0mpHqNb8UcqCWjHJ0wHRuNsQEFv3pUJUndr8Cjw=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=dWisl7SOUPWdG+i4SeYqZPz4VxywurFc5sqA6tpOxPFJFvFUNSPw/VhNBdXzH+WiHmJ i8ZChRnoPyxSICSM8y9rlyGi3tjO/R8qhMLq+BaRKTOBqcPkqA3WIKpoPnxE/hPu50n5r zZFrBK+7K+VI8PTb7ry/izi8M7tWAp+TuZA= X-ZohoMail-DKIM: pass (identity @groups.io) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2304 The following statement produces a SyntaxWarning with Python 3.8: if str(FdRegion.RegionType) is 'FILE' and self.Platform.VpdToolGuid in \ str(FdRegion.RegionDataList): BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py:168: SyntaxWarning: \ "is" with a literal. Did you mean "=3D=3D"? Change the 'is' operator by the conventional '=3D=3D' comparator. Cc: Bob Feng Cc: Liming Gao Reviewed-by: Bob Feng Signed-off-by: Philippe Mathieu-Daude --- BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py b/BaseTool= s/Source/Python/AutoGen/WorkspaceAutoGen.py index fde48b4b2788..ec0c25bd1487 100644 --- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py @@ -165,7 +165,7 @@ class WorkspaceAutoGen(AutoGen): if Fdf.CurrentFdName and Fdf.CurrentFdName in Fdf.Profile.FdDi= ct: FdDict =3D Fdf.Profile.FdDict[Fdf.CurrentFdName] for FdRegion in FdDict.RegionList: - if str(FdRegion.RegionType) is 'FILE' and self.Platfor= m.VpdToolGuid in str(FdRegion.RegionDataList): + if str(FdRegion.RegionType) =3D=3D 'FILE' and self.Pla= tform.VpdToolGuid in str(FdRegion.RegionDataList): if int(FdRegion.Offset) % 8 !=3D 0: EdkLogger.error("build", FORMAT_INVALID, 'The = VPD Base Address %s must be 8-byte aligned.' % (FdRegion.Offset)) FdfProfile =3D Fdf.Profile --=20 2.21.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#51784): https://edk2.groups.io/g/devel/message/51784 Mute This Topic: https://groups.io/mt/66951244/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Apr 28 02:07:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+51785+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51785+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575544806; cv=none; d=zohomail.com; s=zohoarc; b=Bj5puBbY7WdWZyIlueJb43dv8LBsMzRpIJRb1umhxDI4iVxphnmM5DOUImP8r2czakwb6KKZprBAnU9EaznFG7PM9EjzT/OQ3MvRSeeqFPnSoVoZX+j+86UeUI8XS2IWFfCWpPZJqYt4b/X2bLZyRaSoXWfKpDP0gHaEOwgeHZw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575544806; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ydpvSJ/Ntq0Z3sVKDuooiFSoa9wQ9uu/12xrMCYALeg=; b=HuYHKOpkUuULaJIOJrpM0X4pH3GxkPvERFzMcmjqSFKOLj0wO/j4ZyWpUhvX4I5Yzh+QFX+r3GLFQOR2FVGzEAZvfmId+EjLly9+jD95p+J1+d5qd0GKpIA90aLFbvsh90DiI/GcqtQooeV8Z14xj8fBtZKmcvMc3pzMZkFnbQc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51785+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1575544806100127.17327217026764; Thu, 5 Dec 2019 03:20:06 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id t17eYY1788612xXOnhFVhnI3; Thu, 05 Dec 2019 03:20:05 -0800 X-Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web11.7667.1575544804406946947 for ; Thu, 05 Dec 2019 03:20:04 -0800 X-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-153-lKtX6eSqNEy9EBt422-fSA-1; Thu, 05 Dec 2019 06:20:00 -0500 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C002B1856A7C; Thu, 5 Dec 2019 11:19:58 +0000 (UTC) X-Received: from x1w.redhat.com (ovpn-205-76.brq.redhat.com [10.40.205.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7921691BC; Thu, 5 Dec 2019 11:19:55 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: devel@edk2.groups.io Cc: Sean Brogan , "Zhiju . Fan" , Bret Barkelew , Bob Feng , Liming Gao , Michael D Kinney , Philippe Mathieu-Daude Subject: [edk2-devel] [PATCH v2 2/2] .pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins Date: Thu, 5 Dec 2019 12:19:42 +0100 Message-Id: <20191205111942.19492-3-philmd@redhat.com> In-Reply-To: <20191205111942.19492-1-philmd@redhat.com> References: <20191205111942.19492-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: lKtX6eSqNEy9EBt422-fSA-1 X-Mimecast-Spam-Score: 0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,philmd@redhat.com X-Gm-Message-State: ISTIUJbajnfVn1E5RDbHQG57x1787277AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1575544805; bh=oRaAJ4WHlWBsMk4iA89o59PIeD75DGnxyRCFhdXKQ6g=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=n1Ly+ySV5ldpbsGLIhq4ckiAne7mBsajEeWIPF2vRxTFAjopTyEGb53GZD9IVpV7vJJ eXYRp4POXBU7Vd6is5Ev5Y45WAhvc8yA5toaoNfgFfNLUvYO0NHnLQYAHOWeDEHdbrUgz /DASsDyAeym9MBj3ziSqmu2jUYeOu8F+xbw= X-ZohoMail-DKIM: pass (identity @groups.io) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2304 To avoid SyntaxWarning with Python 3.8, change the 'is' operator by the conventional '=3D=3D' comparator. Cc: Sean Brogan Cc: Bret Barkelew Cc: Michael D Kinney Cc: Liming Gao Reviewed-by: Bob Feng Signed-off-by: Philippe Mathieu-Daude --- .pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py | 2 +- .pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py b/.pytool/= Plugin/DscCompleteCheck/DscCompleteCheck.py index e2485f570841..9af4f72c8de3 100644 --- a/.pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py +++ b/.pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py @@ -61,7 +61,7 @@ class DscCompleteCheck(ICiBuildPlugin): abs_dsc_path =3D os.path.join(abs_pkg_path, pkgconfig["DscPath"].s= trip()) wsr_dsc_path =3D Edk2pathObj.GetEdk2RelativePathFromAbsolutePath(a= bs_dsc_path) =20 - if abs_dsc_path is None or wsr_dsc_path is "" or not os.path.isfil= e(abs_dsc_path): + if abs_dsc_path is None or wsr_dsc_path =3D=3D "" or not os.path.i= sfile(abs_dsc_path): tc.SetSkipped() tc.LogStdError("Package Dsc not found") return 0 diff --git a/.pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py b/.pytoo= l/Plugin/LibraryClassCheck/LibraryClassCheck.py index 5dafcbc13f8a..a62a7e912b15 100644 --- a/.pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py +++ b/.pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py @@ -67,7 +67,7 @@ class LibraryClassCheck(ICiBuildPlugin): abs_dec_path =3D self.__GetPkgDec(abs_pkg_path) wsr_dec_path =3D Edk2pathObj.GetEdk2RelativePathFromAbsolutePath(a= bs_dec_path) =20 - if abs_dec_path is None or wsr_dec_path is "" or not os.path.isfil= e(abs_dec_path): + if abs_dec_path is None or wsr_dec_path =3D=3D "" or not os.path.i= sfile(abs_dec_path): tc.SetSkipped() tc.LogStdError("No DEC file {0} in package {1}".format(abs_dec= _path, abs_pkg_path)) return -1 --=20 2.21.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#51785): https://edk2.groups.io/g/devel/message/51785 Mute This Topic: https://groups.io/mt/66951245/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-