From patchwork Fri Jan 26 12:15:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 84792 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 DBA213858CD1 for ; Fri, 26 Jan 2024 12:15:30 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 343853858D33 for ; Fri, 26 Jan 2024 12:15:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 343853858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 343853858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706271325; cv=none; b=dNnIcfLegYdqdQUm+zpUO5PvqPSIhyWcW6PBvD8byEm+aTytJZ1FV0TgwTrUz663uzELaty9D+MIHIIHHxUBWBoA4qeIvXuHTVFo7qIpaVb43wbgKMRmysLBXH9tB8cngE/xJtxlefey+/dwH4zFz+VSTCwchQe5DW/KZ0tzbIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706271325; c=relaxed/simple; bh=qI/5N0YkC++DIF3BHcDmKDSdnZbWVqgfk1WUSQNDSLo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ka0Px7Z7wXhOOCDaFPeyi/6eIbqmmK7gNm7qpxtA9v3hUHRI4oDQODpJavO2xlks0IjMNM9WiDzq9sbeS43O8hhGHMIKZ4EHYP34PpY1n3HkaOsqSxgXo0Jizc9KNOGRMbvFdtlfbBMzj2Z79qvogXPAUPVAlTSU19yqyLzPyJ4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706271323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=aP76Yqr6VpiDcHbU2dXMaQStm06P4HgXO6g1Xa64XC0=; b=GnzZEDEbKFQBPQDZf/HBfK1TAa+b4N3yn0UiR+4Z1BaBYYeRzotk9jlZ3qFCpLhjwB98Hf VX6rA3kJFNlBHt5IGM6rs6kRX9zNvFXCZy/uNaTBKCsDj6sj4DlIrxtGIM+pbqha4bVNY6 wQrn+7O6S/bhPgel9OcgPZu6xpgunGI= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-228-GVWp-bVcOXaZQBE7X7Bx0Q-1; Fri, 26 Jan 2024 07:15:22 -0500 X-MC-Unique: GVWp-bVcOXaZQBE7X7Bx0Q-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-783603ba574so50889085a.2 for ; Fri, 26 Jan 2024 04:15:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706271317; x=1706876117; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aP76Yqr6VpiDcHbU2dXMaQStm06P4HgXO6g1Xa64XC0=; b=Zej2bQbByosEH4lq8KnJF8ODQqoIXHlsn3O5lGO/leav87AqmG+PCbdw3a5YcopCuy TE/9ZPxyOMWy0GtDqeYdfo7Kcds1rP4ES2aLW9tS7s4XrmNnXcq6uEuEq9TI8v5SqsRe piRjqg9bTK22dLs+U0A0zlmbIipgxcoyOjBmCq9XHEL4SQXNxQMJyOOCEx1Y2/OXQqfB 1yu6kOeoYIpB0gOtLQnqGemfs3OEUa3vJivSe3FOjpQkaqaq8HcOfiaCbShb8ooRqupo kfTuR8UpAHCc25eaFKmnQjiYzbHc4TOPyZ/6RoCafs2hsfyGDQh8EXRvONQsVeKWd+PH YDlg== X-Gm-Message-State: AOJu0YxM7eFDZW2//WebexnUzv0uUVsX/8I+URO9pwg2oY4J6G3YUPEg +8NTWogzi50LrIcdTy7j4x0JLJWkRdWGhFnTfMTxa2leo3IxxCsvww5wQI2V5tZKELkOVInTHQi UZ95E/zawaM9xptafRjwzPyyHVmJKoNbQl3l+T3nzSyBWJ0e20uq4HNJYcfS5IAi1VoPLjVQcJj /tz9GnP6X5b/ckkz4XhmV4oEj+absCGVRjRvYELA== X-Received: by 2002:a05:620a:1368:b0:783:8621:5e6d with SMTP id d8-20020a05620a136800b0078386215e6dmr1397487qkl.14.1706271317320; Fri, 26 Jan 2024 04:15:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUMAu/nRvZMRbGXScPtpQl3P+VQUVrZmaFnosZKFY33Z5h8+Fsd92MZhmBd9ZTO7JcL3EODA== X-Received: by 2002:a05:620a:1368:b0:783:8621:5e6d with SMTP id d8-20020a05620a136800b0078386215e6dmr1397473qkl.14.1706271317002; Fri, 26 Jan 2024 04:15:17 -0800 (PST) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id b23-20020a05620a0f9700b00783b01df24csm521220qkn.71.2024.01.26.04.15.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 04:15:16 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 249F45077C6B; Fri, 26 Jan 2024 13:15:15 +0100 (CET) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH] Remove python3-mock dependency and use unittest.mock instead Organization: Red Hat / France X-Operating-System: AlmaLinux 9.3 X-URL: http://www.redhat.com Date: Fri, 26 Jan 2024 13:15:15 +0100 Message-ID: <87le8c1eb0.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_WEB, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Hello, As explained in https://fedoraproject.org/wiki/Changes/RemovePythonMockUsage, python-mock is now deprecated. We ought to use mock from the python standard library instead. Maxwell G submitted a patch to libabigail's Fedora package in Rawhide at https://src.fedoraproject.org/fork/gotmax23/rpms/libabigail/c/405c5046d84fc6977c75cd42a381f7eb30b3efa7. I am applying this patch inspired from his work here. * configure.ac: Do not require python-mock anymore. * tests/mockfedabipkgdiff.in: Use unittest.mock, not mock from python-mock. Signed-off-by: Dodji Seketeli --- configure.ac | 2 +- tests/mockfedabipkgdiff.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 788b5620..a94255a1 100644 --- a/configure.ac +++ b/configure.ac @@ -764,7 +764,7 @@ if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF="\ argparse logging os re subprocess sys $URLPARSE_MODULE \ - xdg koji mock rpm $IMPORT_MODULE tempfile mimetypes shutil six" + xdg koji rpm $IMPORT_MODULE tempfile mimetypes shutil six" AX_CHECK_PYTHON_MODULES([$REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF], [$PYTHON], diff --git a/tests/mockfedabipkgdiff.in b/tests/mockfedabipkgdiff.in index 1e562666..863cf7f6 100644 --- a/tests/mockfedabipkgdiff.in +++ b/tests/mockfedabipkgdiff.in @@ -42,7 +42,7 @@ import tempfile import six try: - from mock import patch + from unittest.mock import patch except ImportError: import sys six.print_('mock is required to run tests. Please install before running'