All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: chugh.ishani@research.iiit.ac.in
Subject: Re: [Qemu-devel] [PATCH 0/3] scripts: add argparse module for Python 2.6 compatibility
Date: Fri, 25 Aug 2017 13:35:24 -0300	[thread overview]
Message-ID: <4eede1a1-5ac4-41e3-e6ef-700348fc3d37@amsat.org> (raw)
In-Reply-To: <20170825155732.15665-1-stefanha@redhat.com>

Hi Stefan,

On 08/25/2017 12:57 PM, Stefan Hajnoczi wrote:
> Many scripts can benefit from the standard library argparse module, which has
> improvements over the older optparse module.  Unfortunately argparse was only
> shipped in Python 2.7 so we need a fallback for Python 2.6.

I probably missed some discussion about it, but what are the reasons to 
stay 2.6 compatible?

Python 2.6 support ended during October 2013, 4 years ago... [1] Why 
don't kill it, start deprecating 2.7 which support will end in less than 
3 years from now [2], and move efforts to version 3...?

Apparently we expect a C compiler compatible with GCC >= 4.1 which was 
released on 2006, before Python 2.5 :S
Then QEMU_BUILD_BUG_ON() try to use C11 feature...

[1] https://www.python.org/dev/peps/pep-0361/ and
https://mail.python.org/pipermail/python-dev/2013-September/128287.html
[2] https://www.python.org/dev/peps/pep-0373/ and
https://pythonclock.org/

Regards,

Phil.

> 
> This patch series adds a copy of argparse.py and updates scripts as necessary
> to import it.
> 
> Stefan Hajnoczi (3):
>    scripts: add argparse module for Python 2.6 compatibility
>    docker.py: Python 2.6 argparse compatibility
>    tests: migration/guestperf Python 2.6 argparse compatibility
> 
>   COPYING.PYTHON                     |  270 ++++
>   scripts/argparse.py                | 2406 ++++++++++++++++++++++++++++++++++++
>   tests/docker/docker.py             |    4 +-
>   tests/migration/guestperf/shell.py |    8 +-
>   4 files changed, 2684 insertions(+), 4 deletions(-)
>   create mode 100644 COPYING.PYTHON
>   create mode 100644 scripts/argparse.py
> 

  parent reply	other threads:[~2017-08-25 16:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 15:57 [Qemu-devel] [PATCH 0/3] scripts: add argparse module for Python 2.6 compatibility Stefan Hajnoczi
2017-08-25 15:57 ` [Qemu-devel] [PATCH 1/3] " Stefan Hajnoczi
2017-08-25 15:57 ` [Qemu-devel] [PATCH 2/3] docker.py: Python 2.6 argparse compatibility Stefan Hajnoczi
2017-08-26  0:29   ` Fam Zheng
2017-08-25 15:57 ` [Qemu-devel] [PATCH 3/3] tests: migration/guestperf " Stefan Hajnoczi
2017-08-25 16:24 ` [Qemu-devel] [PATCH 0/3] scripts: add argparse module for Python 2.6 compatibility no-reply
2017-08-29  9:59   ` Stefan Hajnoczi
2017-08-25 16:35 ` Philippe Mathieu-Daudé [this message]
2017-08-25 16:40   ` Peter Maydell
2017-08-25 17:42     ` Eric Blake
2017-08-29 10:01       ` Stefan Hajnoczi
2017-08-29 18:02         ` Philippe Mathieu-Daudé
2017-08-28 21:47 ` John Snow
2017-08-30 11:02 ` Stefan Hajnoczi

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=4eede1a1-5ac4-41e3-e6ef-700348fc3d37@amsat.org \
    --to=f4bug@amsat.org \
    --cc=chugh.ishani@research.iiit.ac.in \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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.