From nobody Thu May 2 09:18:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521133542578494.03507834308994; Thu, 15 Mar 2018 10:05:42 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5177E19D229; Thu, 15 Mar 2018 17:05:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B0D75D77D; Thu, 15 Mar 2018 17:05:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E330A4CA99; Thu, 15 Mar 2018 17:05:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2FH0j8r018474 for ; Thu, 15 Mar 2018 13:00:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id D3B9B1208F86; Thu, 15 Mar 2018 17:00:45 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B2681208F8C for ; Thu, 15 Mar 2018 17:00:45 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 15 Mar 2018 18:00:37 +0100 Message-Id: <20180315170038.24466-2-abologna@redhat.com> In-Reply-To: <20180315170038.24466-1-abologna@redhat.com> References: <20180315170038.24466-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] docs: Import print_function in reformat-news.py X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 15 Mar 2018 17:05:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The script already works perfectly fine with Python 2, but that's more by chance than by design: we have a single occurrence of print(), and it just so happens that its only argument is an expression. Importing print_function makes the script more future, err, past proof. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/reformat-news.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/reformat-news.py b/docs/reformat-news.py index 89f7ccb3dc..fe08bf6d91 100755 --- a/docs/reformat-news.py +++ b/docs/reformat-news.py @@ -21,6 +21,8 @@ # Authors: # Andrea Bolognani =20 +from __future__ import print_function + import sys =20 COLUMNS =3D 80 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 09:18:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521133550716603.2840593689936; Thu, 15 Mar 2018 10:05:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8C58B3ADAF; Thu, 15 Mar 2018 17:05:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5CD3D5D728; Thu, 15 Mar 2018 17:05:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2A9F3181BA02; Thu, 15 Mar 2018 17:05:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2FH0k1q018480 for ; Thu, 15 Mar 2018 13:00:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 72C051208F86; Thu, 15 Mar 2018 17:00:46 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A3A71208F89 for ; Thu, 15 Mar 2018 17:00:45 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 15 Mar 2018 18:00:38 +0100 Message-Id: <20180315170038.24466-3-abologna@redhat.com> In-Reply-To: <20180315170038.24466-1-abologna@redhat.com> References: <20180315170038.24466-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] python: Drop explicit version where possible X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 15 Mar 2018 17:05:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Some of our scripts are known to work both with Python 2 and Python 3, so for them we shouldn't be forcing any specific version of the interpreter when they're called directly. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/reformat-news.py | 2 +- src/esx/esx_vi_generator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reformat-news.py b/docs/reformat-news.py index fe08bf6d91..d8726f1a1c 100755 --- a/docs/reformat-news.py +++ b/docs/reformat-news.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python =20 # reformat-news.py: Reformat the NEWS file properly # diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index 6ce017d794..545f8bdda3 100755 --- a/src/esx/esx_vi_generator.py +++ b/src/esx/esx_vi_generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python =20 # # esx_vi_generator.py: generates most of the SOAP type mapping code --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list