All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	David Michael <fedora.dm0@gmail.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] scripts: Support building with Python 3
Date: Thu, 31 Aug 2017 14:14:12 +0100	[thread overview]
Message-ID: <20170831131412.GK17315@redhat.com> (raw)
In-Reply-To: <87r2vrlwr3.fsf@dusky.pond.sub.org>

On Thu, Aug 31, 2017 at 02:58:24PM +0200, Markus Armbruster wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
> 
> > On 31 August 2017 at 07:35, Markus Armbruster <armbru@redhat.com> wrote:
> >> So, first we'll invest in work-arounds to make both 2 and 3 work.  Once
> >> 2 is gone, we can invest some more to clean them up.  Which probably
> >> won't happen, so we'll continue to carry work-arounds that no longer
> >> make sense.
> >>
> >> I maintain roughly one fourth of all Python code in qemu, and I'm not
> >> looking forward to this hoop-jumping at all.
> >>
> >> Are we really, really sure we want to go this way?  What exactly are we
> >> hoping to accomplish by it?
> >
> > My take is that we have the following goals we want to achieve:
> >
> > (1) We need to continue to build and run on older (long-term-support)
> > distros that still ship only Python 2.x (alas even back to 2.6)
> 
> That's an assertion, not an answer to my question :)
> 
> What exactly are we hoping to accomplish by supporting what distros
> exactly?
> 
> > (2) We need to be able to build and run on newer distros that
> > have dropped Python 2 altogether in favour of Python 3
> > (I don't know if there are any such today, but presumably by
> > 2020 there will be)
> 
> Yup.
> 
> > Unless we can confidently say that either (1) or (2) is the
> > empty set, we need to handle both 2 and 3 in the same codebase.
> > This is a pain, but unfortunately Python upstream have forced
> > us into it by breaking source code compatibility.
> >
> > I think (1) is pretty clearly not (yet) an empty set, so the
> > only alternative I see to "support 2 and 3 now" is "keep supporting
> > only 2 for the moment and hope that no distro drops 2 support
> > before all the LTS 2-only distro versions vanish into history".
> 
> I don't buy the "clearly" in "pretty clearly not (yet) an empty set",
> because I don't understand *why* we need to support "older
> (long-term-support) distros".
> 
> If we can leave Python 2 behind, I'm all for porting to Python 3 now.
> 
> If we can't yet, then I don't see why I should do work *now* just
> because "some" distro might drop support for Python 2 "before all the
> LTS 2-only distro versions vanish into history".

As mentioned before, while for many projects, maintaining py2 & py3
in parallel is hard, I don't think that is going to be the case for
QEMU due to the simplicity of much of our python usage. IOW, for QEMU
I tend to view this as more like the work we do to fix up compiler
warnings when new GCC comes out. There's some cleanup needed, but the
result is rarely harder to maintain.

It is fine if you don't want to do the work to convert QAPI code to
support py3, but if some other contributor submits patches for parallel
py2 & py3 support that don't appreciably harm maintainability I see 
little reason to reject them.

> If it ain't broke, don't fix it!

NB, some distros have already changed /usr/bin/python to point to py3
so all the files with #!/usr/bin/python in QEMU are already broken on
those distros.

In theory you could change the shebang to #!/usr/bin/python2, but the
/usr/bin/python2 file symlink is not standard in py2.6 - though certain
distros have backported support for it.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2017-08-31 13:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-20  5:58 [Qemu-devel] [PATCH] scripts: Support building with Python 3 David Michael
2017-08-21 14:29 ` Markus Armbruster
2017-08-30 17:09   ` Stefan Hajnoczi
2017-08-31  6:35     ` Markus Armbruster
2017-08-31 10:27       ` Peter Maydell
2017-08-31 10:47         ` Daniel P. Berrange
2017-08-31 10:55           ` Peter Maydell
2017-08-31 11:02             ` Daniel P. Berrange
2017-08-31 12:44               ` Markus Armbruster
2017-08-31 13:22                 ` Kashyap Chamarthy
2017-08-31 12:50               ` Peter Maydell
2017-08-31 12:58         ` Markus Armbruster
2017-08-31 13:14           ` Daniel P. Berrange [this message]
2017-08-31 13:19             ` Peter Maydell
2017-08-31 13:25               ` Daniel P. Berrange
2017-08-31 13:32                 ` Peter Maydell
2017-09-01 19:26             ` Max Reitz
2017-08-31 13:29           ` Peter Maydell
2017-08-30 17:15 ` Stefan Hajnoczi
2017-09-18 15:36 ` Stefan Hajnoczi
2017-10-02  6:17   ` Markus Armbruster

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=20170831131412.GK17315@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=fedora.dm0@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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.