From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web09.15248.1605409214995946317 for ; Sat, 14 Nov 2020 19:00:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=PlnO18lo; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: y9/El8QMVv0Kw1dCzQZBR+P+0SB3UmpKInxKOBw3xZh+P7ErtoYhc1CmJLttpQuZHdU/XHDikB 0ap6KXlG/dmA== X-IronPort-AV: E=McAfee;i="6000,8403,9805"; a="169832834" X-IronPort-AV: E=Sophos;i="5.77,479,1596524400"; d="scan'208";a="169832834" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2020 19:00:14 -0800 IronPort-SDR: lM8/L5wrzOHepCLN5peCe7Hp9Ex3xbmAcg1TEcBHo90jeuZL50dJYm0tRL0akjIV74WFZnmL9L XPBSnj+SBS3Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,479,1596524400"; d="scan'208";a="543142736" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga005.jf.intel.com with ESMTP; 14 Nov 2020 19:00:14 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 14 Nov 2020 19:00:14 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 14 Nov 2020 19:00:13 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sat, 14 Nov 2020 19:00:13 -0800 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.58) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Sat, 14 Nov 2020 19:00:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bo8pscut6eUA03+H/wmi0yUpftT9Bjy/vb5ovSzLwwO1mCaVsEUuZxG0vGi3jM69SyJGgNQrbNRlt9ofFOTPY5PHvXOg5+8tF8tLekzEnomDS++4kj4PnDkBO1zb23Mx2kNQv0X/qFBEYbL3NyWhdzsk6x/94XgB8kDMaIXgvyBXaD/WyLXlxe150iLCUcL4+fkHofqvp7yeTxp3NKcWAijJz0rJBiDwhSL9D5qnvsTYXxfNV37MkKrVjKBEYNO6jmGuhUMA8xhODTaylu2iK+WnkeaCKHUsupfT8/LK4sPrwhQw7nOUD+8BzPJMcLCRJC/5m3+d3qZfLymUDyC1wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IOitHTooyWExPChkwAbti/6CPp6KSdiFTdr1y7455OQ=; b=RaB9UMRveXtCDt3OHGRtasqjiGNQfio+vlVpWwX+qT7Wnt7wSf7P81UFW67R4k2jO22/8cCrcObrtd2HsZftdxm2f2F0rXufUFwks5bIcpT31xYL8PLc0FhU9zJv+7NkUWpGNz+hqgdGY37rAus2P9eVjRmNg3UzEfOB64WeEDTxv4n+/+oYr/hxEWnyQS2sCygnxGRCKda+lo3vOfVbuVrYBVrVBHuyBSDX9VAZjLfBzv9oP8YisqDpOaUUEiN7EmqKQzYKCfhO/ArTvqVAqLRpn9LDWo8ll519wY2OuokHOieg7qqDAfQsz82/mKImwQ15beYEXEmMWfb73Z8nDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IOitHTooyWExPChkwAbti/6CPp6KSdiFTdr1y7455OQ=; b=PlnO18loAgLi/Ok/jzeTpVPxsbpUUW+JDaPxWTceNSaA9xem2TBf31E9U/MweJC39TPG47pFQLoWq5pFZkH6chXl3JXeDpQPsQwXzB6myVbLgEpL2hPy0vOwPa8XPAjM23iQzt5Kaa942RrTnz8upOeL3jAoHn1NJonigplDMsc= Received: from MWHPR1101MB2160.namprd11.prod.outlook.com (2603:10b6:301:5b::12) by MWHPR11MB1918.namprd11.prod.outlook.com (2603:10b6:300:110::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.28; Sun, 15 Nov 2020 03:00:12 +0000 Received: from MWHPR1101MB2160.namprd11.prod.outlook.com ([fe80::3161:c00f:c5c5:f710]) by MWHPR1101MB2160.namprd11.prod.outlook.com ([fe80::3161:c00f:c5c5:f710%8]) with mapi id 15.20.3564.028; Sun, 15 Nov 2020 03:00:12 +0000 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" , Bret Barkelew , "Agyeman, Prince" , "Bjorge, Erik C" Subject: Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Replace imp.reload with importlib.reload Thread-Topic: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Replace imp.reload with importlib.reload Thread-Index: AQHWuIQ3ePCdfQdV80edVLR1giKdSqnIhb/w Date: Sun, 15 Nov 2020 03:00:11 +0000 Message-ID: References: <20201111234136.1825-1-ashley.e.desimone@intel.com> In-Reply-To: <20201111234136.1825-1-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [50.53.190.176] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d71f65ff-2764-478e-e303-08d8891291c9 x-ms-traffictypediagnostic: MWHPR11MB1918: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3044; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0euNQcdB7QNCMrEZJjj6WtyeaMfiQcw05/LoGFVzjyjIZHQBPLQIABZNj5IqD/kEYMPqaReAihXqKH5TRIMNBcR+bCYQPjXWgqxcwjtb9fO3Ed6Bg3+1oV3eo6tQMhnvFRgq4zgqE+Ikmv8oGjdA1aJrGH7LACG9H3M8t42Kli47J4EuRrFs3MHqYIHmhW0FvMZWSXfysbU2GdVFXIq4jNWImHEtshKHGm5h3JrSqjRWqCh5DouYBles4/lvpb4z9PDbxmY7aNP5sZbS5fS6WGhzxMt7Mkjs+0fBgLG+ZC+Et6cZcxBMG1THKRZJVPiWJ2C4n+y8WQqKOKsNTQSpvg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1101MB2160.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(316002)(55016002)(107886003)(54906003)(7696005)(9686003)(110136005)(478600001)(26005)(186003)(6506007)(86362001)(53546011)(33656002)(52536014)(83380400001)(66946007)(66476007)(66556008)(66446008)(2906002)(64756008)(76116006)(8936002)(4326008)(5660300002)(8676002)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: zL/l62JisAhwvUsY1Snrh8sjFOwv7LDEBtgLNILeyYveV59zAWtqG5WRoqClfQHjSFZOHLRJCJ6EE+WIQDks0qIgAvlI9HB0BR4PCXsbfOZUkJP+Tr5DX1vRJUvcO7uyLwpe9nYXB14KqOG54a/Q2GnXuK/jTeLsdQojJJDRNoXGxL2gXrgHk2NpR22fxwcP7o19m7xasQf6fCMI7c663EbPuLwGa7Agqcerto/o2iM0skrJoS6iXlZeyqlxPjZsB7VkJXX+Lfe3ZmTVRU7ZMFOPa/K+H53IM4+wanDAXCqi0GWNmKvXpLv4yJaLnQ5L0Xvrv9tAkM1OERiK8t/B6rDmFpYRRZZusPPgWyJDTqMzWegLXNVvEvuOOdPTc13Ltd8ZHqJIO9/FrEGOJoz3dqo0NED3VSIzuKla0S0xUbqUvGHsOrwwt/KT69z6Btw4vt2wFahxLMoIzgpWwwyp2ZObGRtordajQJmggvnOyDHb9tRnYDF7W7jPKiJi2YwSXmaO1/6YOOLHRJNdFihE4ETmn1sy7V/viQIRnz6ubt9fA/LnSmyg8aM3ZU80zPjqlIRo7pP26uo2oWDOEDq0ieCZCBOkdvuhEaXxZ1YEjGDQGwfX3gXpht5yoK0sh224Otjj0iCpojBI0L2zzE7XIOYVjAa5tBih+P/S/Tbr5M/5Yb0T+7mylOPsvpt5gjHsXa5O/grpM7LELMC/i1zhUF1GACJUUg9HNH33AMeKAJqIww5Clrq7wNGwa+OYEs2aKScZXf5xPdaaRb1fKPtOp4RMuGcQa6aPugx2MDY4O6aixJd9fHt16YHICqmnquLV3BiFcEnWRwWMO57AuE3D5V2/d1vuBmKUdi0Qs71WeKqczhWaDNAmWfSLpzRc9elVWVh20TBw79oc+NIUq5aFnA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR1101MB2160.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d71f65ff-2764-478e-e303-08d8891291c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2020 03:00:12.0069 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: x9BCuZocZHg7CrI3t/anfNh34J+ivfFfSj6uoKsH5WoeLnS3ZwtKdpRipRPai5Mv7Sxnbpry5si817MZFCRkNYKO40JsxhLfw1urvsYEz40= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1918 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone > -----Original Message----- > From: Ashley E Desimone > Sent: Wednesday, November 11, 2020 3:42 PM > To: devel@edk2.groups.io > Cc: Desimone, Nathaniel L ; Pandya, Puja > ; Bret Barkelew ; > Agyeman, Prince ; Bjorge, Erik C > > Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Replace imp.reload with > importlib.reload >=20 > 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. >=20 > 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 > --- > edkrepo/__main__.py | 4 ++-- > edkrepo/edkrepo_cli.py | 1 - > edkrepo/edkrepo_entry_point.py | 4 ++-- > 3 files changed, 4 insertions(+), 5 deletions(-) >=20 > 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.__file__)) > for directory in sitepackages: > if edkrepo_package_path =3D=3D directory: > -- > 2.27.0.windows.1