From: Eduardo Habkost <ehabkost@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Fam Zheng <famz@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
Max Reitz <mreitz@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
"Daniel P . Berrange" <berrange@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-3.1] qemu-iotests: Adapt to moved location of StringIO module in py3
Date: Wed, 18 Jul 2018 12:05:10 -0300 [thread overview]
Message-ID: <20180718150510.GA31657@localhost.localdomain> (raw)
In-Reply-To: <8fbaf02a-752c-2fec-5bbd-9b31839ce19a@amsat.org>
On Wed, Jul 18, 2018 at 12:02:39PM -0300, Philippe Mathieu-Daudé wrote:
> Hi Eduardo,
>
> On 07/18/2018 11:53 AM, Eduardo Habkost wrote:
> > On Tue, Jul 17, 2018 at 08:40:15PM -0300, Philippe Mathieu-Daudé wrote:
> > [...]
> >> - import StringIO
> >> + try:
> >> + from StringIO import StringIO
> >> + except ImportError:
> >> + from io import StringIO
> >
> > Why do we need this? Python 2.7 has io.StringIO.
>
> Python 2 works fine, the problem is the Fedora Docker image uses Python
> 3 and the block tests started to fail...
My question is: why use StringIO.StringIO on Python 2 and
io.StringIO on Python 3, if io.StringIO works on both Python
versions?
--
Eduardo
next prev parent reply other threads:[~2018-07-18 15:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 23:40 [Qemu-devel] [PATCH for-3.1] qemu-iotests: Adapt to moved location of StringIO module in py3 Philippe Mathieu-Daudé
2018-07-18 7:27 ` Daniel P. Berrangé
2018-07-18 14:53 ` Eduardo Habkost
2018-07-18 15:02 ` Philippe Mathieu-Daudé
2018-07-18 15:05 ` Eduardo Habkost [this message]
2018-07-18 15:22 ` Philippe Mathieu-Daudé
2018-07-18 16:01 ` Eduardo Habkost
2018-07-18 15:28 ` [Qemu-devel] [Qemu-block] " John Snow
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=20180718150510.GA31657@localhost.localdomain \
--to=ehabkost@redhat.com \
--cc=berrange@redhat.com \
--cc=f4bug@amsat.org \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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.