[Numpy-discussion] StringIO test failure with Python3.1.2
Charles R Harris
Wed Mar 24 10:59:46 CDT 2010
On Wed, Mar 24, 2010 at 9:29 AM, Pauli Virtanen <email@example.com> wrote:
> ke, 2010-03-24 kello 09:20 -0600, Charles R Harris kirjoitti:
> > What would be the best fix? Should we rename io to something like
> > npyio?
> That, or:
> Disable import conversions in tools/py3tool.py for that particular file,
> and fix any import errors manually so that the same code works both for
> Python 2 and Python 3. Actually, I suspect there are no import errors,
> since the top-level imports in that file are already absolute.
I have some preference for the name change just to avoid shadowing a
standard module, it makes numpy just a bit safer.
> Anyway, it's a bug in 2to3. I suppose it first converts
> from StringIO import StringIO
> from io import StringIO
> and then runs the import fixer, which does
> from .io import StringIO
> and that's a bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion