From patchwork Tue Dec 21 14:04:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 49147 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F873385843A for ; Tue, 21 Dec 2021 14:04:54 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.18.44]) by sourceware.org (Postfix) with ESMTPS id 7A5AA3858C2C for ; Tue, 21 Dec 2021 14:04:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A5AA3858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=schwinge.name Received: from [192.94.31.2] (helo=dem-tschwing-1.ger.mentorg.com) by smtprelay02.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mzfkS-00015t-Ip; Tue, 21 Dec 2021 15:04:12 +0100 Received: (nullmailer pid 2159774 invoked by uid 1000); Tue, 21 Dec 2021 14:04:47 -0000 From: Thomas Schwinge To: libabigail@sourceware.org Subject: [PATCH] Replace Python 'import importlib' with 'import importlib.machinery' Date: Tue, 21 Dec 2021 15:04:32 +0100 Message-Id: <20211221140432.2159710-1-thomas@codesourcery.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <660b800832668cba9415c01d7cf5ab49438dba98.camel@klomp.org> References: <660b800832668cba9415c01d7cf5ab49438dba98.camel@klomp.org> MIME-Version: 1.0 X-Df-Sender: b3V0Z29pbmdAc2Nod2luZ2UubmFtZQ== X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , Cc: Mark Wielaard , Thomas Schwinge Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Fix-up for recent commit f0582fdbf1267f0f34bf3c3b6698b60026410146 "Replace use of deprecated Python 'imp' module with 'importlib'", which... [...] seems to have broken something on centos7 x86_64: https://builder.wildebeest.org/buildbot/#/changes/7273 File "/srv/buildbot/worker/libabigail-centos-x86_64/build/tests/mockfedabipkgdiff", line 73, in fedabipkgdiff_mod = importlib.machinery.SourceFileLoader('fedabipkgdiff', FEDABIPKGDIFF).load_module() AttributeError: 'module' object has no attribute 'machinery' Again, I've asked The Internet what to do about that, and this commit is the result. But beware: I'm still not a Python wizard. * tests/mockfedabipkgdiff.in: Replace Python 'import importlib' with 'import importlib.machinery'. --- tests/mockfedabipkgdiff.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mockfedabipkgdiff.in b/tests/mockfedabipkgdiff.in index 7de42b86..29a28ad9 100644 --- a/tests/mockfedabipkgdiff.in +++ b/tests/mockfedabipkgdiff.in @@ -39,7 +39,7 @@ variables. import os import tempfile -import importlib +import importlib.machinery import six try: