All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: Petr Vorel <petr.vorel@gmail.com>, buildroot@buildroot.org
Cc: David Laight <David.Laight@ACULAB.COM>,
	Edgar Bonet <bonet@grenoble.cnrs.fr>
Subject: Re: [Buildroot] [PATCH v2 3/4] utils/getdeveloperlib.py: use python3 explicitly
Date: Thu, 16 Sep 2021 20:42:01 +0200	[thread overview]
Message-ID: <56e9b208-6590-eaa7-35ce-55cec55e499a@mind.be> (raw)
In-Reply-To: <20210915194839.22122-4-petr.vorel@gmail.com>



On 15/09/2021 21:48, Petr Vorel wrote:
> + remove python2 compatibility imports
> 
> library is used by support/scripts/pkg-stats and utils/get-developers
> which both use python3. Although library does not require shebang,
> it's better to state python3 use.

 Do you have some supporting evidence of this claim "it's better to add a shebang"?

 Looking at a few random projects with python files, I see none that do it.

 And it seems like a lot of noise to add this for no obvious gain. If it's about
documenting the minimum python version, it's not even correct: some of these
scripts will require python3.4 or python3.5 and that's not documented...

 Regards,
 Arnout

> 
> Tested with python3 -m py_compile.
> 
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> ---
> New in v2
> 
>  utils/getdeveloperlib.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/utils/getdeveloperlib.py b/utils/getdeveloperlib.py
> index ce822320f8..74a3a420ee 100644
> --- a/utils/getdeveloperlib.py
> +++ b/utils/getdeveloperlib.py
> @@ -1,4 +1,5 @@
> -from __future__ import print_function
> +#!/usr/bin/env python3
> +
>  from io import open
>  import os
>  import re
> 
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-09-16 18:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 19:48 [Buildroot] [PATCH v2 0/4] use python3 explicitly Petr Vorel
2021-09-15 19:48 ` [Buildroot] [PATCH v2 1/4] support: utils: " Petr Vorel
2021-09-21 20:20   ` Romain Naour
2021-09-21 20:57     ` Petr Vorel
2021-09-15 19:48 ` [Buildroot] [PATCH v2 2/4] utils/scanpypi: remove python2 compatibility imports Petr Vorel
2021-09-15 19:48 ` [Buildroot] [PATCH v2 3/4] utils/getdeveloperlib.py: use python3 explicitly Petr Vorel
2021-09-16 18:42   ` Arnout Vandecappelle [this message]
2021-09-16 19:51     ` Petr Vorel
2021-09-15 19:48 ` [Buildroot] [PATCH v2 4/4] testing/tests/package: " Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56e9b208-6590-eaa7-35ce-55cec55e499a@mind.be \
    --to=arnout@mind.be \
    --cc=David.Laight@ACULAB.COM \
    --cc=bonet@grenoble.cnrs.fr \
    --cc=buildroot@buildroot.org \
    --cc=petr.vorel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.