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

Reply via email to