From nobody Mon Nov 25 17:50:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+67331+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67331+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1605138107; cv=none; d=zohomail.com; s=zohoarc; b=f2ODVXmUEUF2CnRY7E7Bh6FRoZgHqXSnssz/3ToC0X8hy7KqqA92PdD2dERmd94j1oSs4AHJ4aiZ4q1Q9a7he0ayCKhZM6vHDLzQMAjiMsHemiSScj1ZFwC86LudOBUUkvNWR8czOwgGpPDjgw5PB206zRfZGjgSANnwOjUSYVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605138107; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=yyzAkWQfL7fesVnP9kyb28oDRr+lPFEl9EWt0xlwSNk=; b=n36i4HmDkxe+WRYp5rAyLJba91eKmNA0e9tOwnAQWNrjkgwIFDohqNcVf+fBJL8Wvxe+7lo7UzS9gQozDv+t3Iqv0dnxaX0VkonAfVqr7N73k+MEsslaufxEji/oAxNVUQ2R4rqrNY61cK9//GG51vl87BJXeDT6A6xS1e4L8fE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67331+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1605138107308720.4750065054893; Wed, 11 Nov 2020 15:41:47 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3u4kYY1788612xh6VrakreG2; Wed, 11 Nov 2020 15:41:46 -0800 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web08.15260.1605138106303410278 for ; Wed, 11 Nov 2020 15:41:46 -0800 IronPort-SDR: rANliloeotRR8po9Krku76zEYm2k341bYjW+UNMq9EyEcTLX4RXHmZCYorEtqRT02sFjVvJcMX LGOxZ5tZi8DQ== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="234399112" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="234399112" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2020 15:41:41 -0800 IronPort-SDR: vln31Nib5KnhQckfqsz9SwGy6Gna+IjFYGK9ZmcHHxFsNOqttfcPOCcxhwKTnEgSI1/DvnpEOD 3D4Vw+Ga+4xg== X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="366132804" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.212.245.21]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2020 15:41:40 -0800 From: "Ashley E Desimone" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Bret Barkelew , Prince Agyeman , Erik Bjorge Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Replace imp.reload with importlib.reload Date: Wed, 11 Nov 2020 15:41:36 -0800 Message-Id: <20201111234136.1825-1-ashley.e.desimone@intel.com> MIME-Version: 1.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,ashley.e.desimone@intel.com X-Gm-Message-State: XVsqlqvGLRofSTsh5qudJhMLx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1605138106; bh=7zeNrGX+n5d7Mpwy3Ulj8saLosjhT7CFI7iB1zsQhJM=; h=Cc:Date:From:Reply-To:Subject:To; b=RoQoQY4IJi0qQNLc8eV2+ffGYdRGng6f/SVftI6o0NF0nX91V4aFx+eyuzTjmezZ+JY lTjs6INSC2RjegZBetKLBzvs+qjHoLNpldBzB4QlQn32JMXrNJ0x/B77diBh5tKjt6cfo 5W+IJY51xS3VWI5l4J6F9kBv7bKQOq4WQuc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The imp module is deprecated since Python 3.4 in favor of importlib. This patch replaces uses of imp.reload() with importlib.reload() and removes unused imp imports. Cc: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Ashley E Desimone Reviewed-by: Nate DeSimone --- edkrepo/__main__.py | 4 ++-- edkrepo/edkrepo_cli.py | 1 - edkrepo/edkrepo_entry_point.py | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/edkrepo/__main__.py b/edkrepo/__main__.py index 115a779..2d538d3 100644 --- a/edkrepo/__main__.py +++ b/edkrepo/__main__.py @@ -7,7 +7,7 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent # =20 -import imp +import importlib import os import sys import site @@ -23,7 +23,7 @@ for directory in sitepackages: edkrepo_site_dir =3D edkrepo_package_path break else: - imp.reload(edkrepo) + importlib.reload(edkrepo) import edkrepo.edkrepo_entry_point =20 if __name__ =3D=3D '__main__': diff --git a/edkrepo/edkrepo_cli.py b/edkrepo/edkrepo_cli.py index 4e7ff16..1adb63f 100644 --- a/edkrepo/edkrepo_cli.py +++ b/edkrepo/edkrepo_cli.py @@ -18,7 +18,6 @@ import os import subprocess import site import inspect -import imp import importlib.util import datetime as dt =20 diff --git a/edkrepo/edkrepo_entry_point.py b/edkrepo/edkrepo_entry_point.py index dd2b36e..30d65ff 100644 --- a/edkrepo/edkrepo_entry_point.py +++ b/edkrepo/edkrepo_entry_point.py @@ -8,7 +8,7 @@ # =20 import argparse -import imp +import importlib import importlib.util import inspect import json @@ -37,7 +37,7 @@ for directory in sitepackages: edkrepo_site_dir =3D edkrepo_package_path break else: - imp.reload(edkrepo) + importlib.reload(edkrepo) edkrepo_package_path =3D os.path.dirname(os.path.dirname(edkrepo.__fil= e__)) for directory in sitepackages: if edkrepo_package_path =3D=3D directory: --=20 2.27.0.windows.1 -=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 (#67331): https://edk2.groups.io/g/devel/message/67331 Mute This Topic: https://groups.io/mt/78195940/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-