From nobody Mon Apr 29 02:32:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676888523; cv=none; d=zohomail.com; s=zohoarc; b=He9qqKcSOEmOfGugUpX+MlR1g8dxunA/maPVUPA7C3Ui1WUBBKcyYNv5cIwEnXJG6e3ZG5Iie/1sSyC9CVRSAC6ubJNtKCyuGD9oKbv39uEwh+aowP9eMDt3wI/dW8fbbs5AzvOcUYgZfVXqxvmNVZ5/jONXOzkE//k6I4N9M9c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676888523; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3iVkL2qhwt5Pk9cesinYilWvfAniWoZE4OFXzcS7dfE=; b=SiiEHw31itjwXEBPLdJc8QYh13SHUvhC++00jtlMv7hO/WNJ6SS6KbXM2x4EyqZLmoQcbwqKMclQYYMnBAPcVTmy2w9QCAd+RpcFQHFx9pANBSFqgjSqDb6Jlwt7pgyWSCix+zCHcr84vcIlhVkTF0WkKgMzUeUzqfjtyyewdF0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1676888523306398.9783258050056; Mon, 20 Feb 2023 02:22:03 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-274-qV3zb7QVO962-LB7_JMqBg-1; Mon, 20 Feb 2023 05:21:54 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0F893C0D854; Mon, 20 Feb 2023 10:21:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 965931121318; Mon, 20 Feb 2023 10:21:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A4B1E19465B1; Mon, 20 Feb 2023 10:21:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 89AB11946587 for ; Mon, 20 Feb 2023 10:21:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6DC674015319; Mon, 20 Feb 2023 10:21:50 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.96]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E337140168BD for ; Mon, 20 Feb 2023 10:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676888522; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3iVkL2qhwt5Pk9cesinYilWvfAniWoZE4OFXzcS7dfE=; b=FN5myLJxYVSWhImWpy0uY0anlErlfVuJMn3MtQYxOjvPVwTPpgLQuDp9Ico0/sEe2PFQWR JnkXAP3MYCdUB5MtpXbd/8K3HEvtDAlqvZaGHi44lmoKufugVnlkTegCGW1P1UelaR57oO D4qEdt0MuHPXMYlu3sGK/vC1NzFuByA= X-MC-Unique: qV3zb7QVO962-LB7_JMqBg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] docs: Recommend better python3 shebang Date: Mon, 20 Feb 2023 11:21:45 +0100 Message-Id: <20230220102146.22955-2-abologna@redhat.com> In-Reply-To: <20230220102146.22955-1-abologna@redhat.com> References: <20230220102146.22955-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676888525291100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Python scripts should always invoked the interpreter through env(1) to ensure that they work on macOS and the BSDs, and at this point not explicitly asking for Python 3 doesn't really make sense. Signed-off-by: Andrea Bolognani --- docs/hooks.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hooks.rst b/docs/hooks.rst index 9c5f3ff456..9387676a55 100644 --- a/docs/hooks.rst +++ b/docs/hooks.rst @@ -78,7 +78,7 @@ or: =20 :: =20 - #!/usr/bin/python + #!/usr/bin/env python3 =20 Other command interpreters are equally valid, as is any executable binary,= so you are welcome to use your favourite languages. --=20 2.39.2 From nobody Mon Apr 29 02:32:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676888521; cv=none; d=zohomail.com; s=zohoarc; b=ahzrxbztAIzd+1LCjltkomhdKlcxoAmDeakc5QKEe1CxdXnTX+GmK6IDewUDEuIndh/2AEIH2Xa/ApkptuZOgnXVXOiu9kyC2F9XBM8hVumr0Z1AYujqMxG07/962RElPkJBY8GRvVcoH0kLG1XdBjXSxaNR8cRAM11uEYEZoCA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676888521; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7VMH50O11i8DLqpuaAiFdlQ4hVGf5Y0+wzHgdLzKSQw=; b=N9PjnIW9q2nxvv0PxLRjlvkq6AExfBTtU5Utb02CGy3acl7MUei/De9p87glzscjUGixF++BUAYIP5VIspTiAuIWIUfy+v2WIwVzz5kSkxFLCIRgWmfJDw4nN1eWsMUXoA51VttEv/AGVGNaVaZJUD2BV9yAzvS0sOo9UX03vOU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1676888521022515.9522099774176; Mon, 20 Feb 2023 02:22:01 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-228-L0WRqlKzPeGZFhqjbog4BA-1; Mon, 20 Feb 2023 05:21:55 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1D1F9823D61; Mon, 20 Feb 2023 10:21:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0171118EC6; Mon, 20 Feb 2023 10:21:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D8F3A1946588; Mon, 20 Feb 2023 10:21:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 897FB1946595 for ; Mon, 20 Feb 2023 10:21:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6F32A408573E; Mon, 20 Feb 2023 10:21:51 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.96]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CDEC140C1423 for ; Mon, 20 Feb 2023 10:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676888519; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=7VMH50O11i8DLqpuaAiFdlQ4hVGf5Y0+wzHgdLzKSQw=; b=DUOYIZLkHm+xdce625Cjkk1TiN2SeaJm/yRDTnVmf/yWrwVR+p0eb7TkX1wou41IPukdfN t8I1cS92RGHfQJd/diVkGn4GVDNj1MarvjUe0DRcAb4M2qbVMTZjQUh3lLpfcFEtYECkRL MA4NyyWxMTy+UAvvbqwcnxnVdsOm8og= X-MC-Unique: L0WRqlKzPeGZFhqjbog4BA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] syntax-check: Ensure Python is called via env(1) Date: Mon, 20 Feb 2023 11:21:46 +0100 Message-Id: <20230220102146.22955-3-abologna@redhat.com> In-Reply-To: <20230220102146.22955-1-abologna@redhat.com> References: <20230220102146.22955-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676888521303100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The syntax-check rule that calls flake8 on Python scripts expects this to be the case, and it's the best practice anyway. Signed-off-by: Andrea Bolognani Reviewed-by: Erik Skultety --- build-aux/syntax-check.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 96d322ee04..21f6b311ce 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -561,6 +561,11 @@ sc_require_enum_last_marker: { echo 'enum impl needs _LAST marker on second line' 1>&2; \ exit 1; } || : =20 +sc_prohibit_python_without_env: + @prohibit=3D'#!/usr/.*/py''thon' \ + halt=3D'always call python via /usr/bin/env' \ + $(_sc_search_regexp) + # We're intentionally ignoring a few warnings # # E501: Force breaking lines at < 80 characters results in --=20 2.39.2