Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-26 Thread Charles R Harris
On Wed, Mar 24, 2010 at 12:41 PM, Pauli Virtanen > wrote: > Wed, 24 Mar 2010 13:35:51 -0500, Bruce Southey wrote: > [clip] > > elif isinstance(item, collections.Callable): > >File "/usr/local/lib/python3.1/abc.py", line 121, in > >__instancecheck__ > > subclass = instance.__clas

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Pauli Virtanen
Wed, 24 Mar 2010 13:35:51 -0500, Bruce Southey wrote: [clip] > elif isinstance(item, collections.Callable): >File "/usr/local/lib/python3.1/abc.py", line 121, in >__instancecheck__ > subclass = instance.__class__ > AttributeError: 'PyCapsule' object has no attribute '__class__' S

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Bruce Southey
On 03/24/2010 01:25 PM, Charles R Harris wrote: On Wed, Mar 24, 2010 at 8:17 AM, Bruce Southey > wrote: Hi, Wow, this is really impressive! I installed the svn numpy version '2.0.0.dev8300' with the latest Python 3.1.2 and it works! All the

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Charles R Harris
On Wed, Mar 24, 2010 at 8:17 AM, Bruce Southey wrote: > Hi, > Wow, this is really impressive! > I installed the svn numpy version '2.0.0.dev8300' with the latest Python > 3.1.2 and it works! > > All the tests pass except: > test_utils.test_lookfor > > I am guessing that it is this line as the oth

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Charles R Harris
On Wed, Mar 24, 2010 at 9:59 AM, Charles R Harris wrote: > > > On Wed, Mar 24, 2010 at 9:29 AM, Pauli Virtanen 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: >> >> Disabl

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Bruce Southey
On 03/24/2010 10:30 AM, Pauli Virtanen wrote: > ke, 2010-03-24 kello 10:28 -0500, Robert Kern kirjoitti: > >> utils.py is the only file in there that imports StringIO. It should >> probably do a local import "from io import BytesIO" because io.py >> already contains some Python3-awareness: >> >

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Charles R Harris
On Wed, Mar 24, 2010 at 9:29 AM, Pauli Virtanen 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

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Pauli Virtanen
ke, 2010-03-24 kello 10:28 -0500, Robert Kern kirjoitti: > utils.py is the only file in there that imports StringIO. It should > probably do a local import "from io import BytesIO" because io.py > already contains some Python3-awareness: > > if sys.version_info[0] >= 3: > import io > Bytes

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Pauli Virtanen
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 Pyt

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Robert Kern
On Wed, Mar 24, 2010 at 10:20, Charles R Harris wrote: > > On Wed, Mar 24, 2010 at 9:07 AM, Robert Kern wrote: >> >> On Wed, Mar 24, 2010 at 09:43, David Cournapeau >> wrote: >> > On Wed, Mar 24, 2010 at 11:35 PM, Nadav Horesh >> > wrote: >> >> Any idea why >> >> >> >>  from .io import StringIO

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Charles R Harris
On Wed, Mar 24, 2010 at 9:07 AM, Robert Kern wrote: > On Wed, Mar 24, 2010 at 09:43, David Cournapeau > wrote: > > On Wed, Mar 24, 2010 at 11:35 PM, Nadav Horesh > wrote: > >> Any idea why > >> > >> from .io import StringIO > >> > >> and not > >> > >> from io import StringIO > >> > >> ??? > >

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Robert Kern
On Wed, Mar 24, 2010 at 09:43, David Cournapeau wrote: > On Wed, Mar 24, 2010 at 11:35 PM, Nadav Horesh wrote: >> Any idea why >> >>  from .io import StringIO >> >> and not >> >>  from io import StringIO >> >> ??? >> >> (Why is the extra "." before "io") > > Maybe a bug in py2to3, because StringI

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Robert Kern
On Wed, Mar 24, 2010 at 09:35, Nadav Horesh wrote: > Any idea why > >  from .io import StringIO > > and not > >  from io import StringIO > > ??? > > (Why is the extra "." before "io") It is a relative import, i.e. numpy.lib.io . -- Robert Kern "I have come to believe that the whole world is an

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Robert Kern
On Wed, Mar 24, 2010 at 09:43, David Cournapeau wrote: > On Wed, Mar 24, 2010 at 11:35 PM, Nadav Horesh wrote: >> Any idea why >> >>  from .io import StringIO >> >> and not >> >>  from io import StringIO >> >> ??? >> >> (Why is the extra "." before "io") > > Maybe a bug in py2to3, because StringI

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread David Cournapeau
On Wed, Mar 24, 2010 at 11:35 PM, Nadav Horesh wrote: > Any idea why > >  from .io import StringIO > > and not > >  from io import StringIO > > ??? > > (Why is the extra "." before "io") Maybe a bug in py2to3, because StringIO is in io in python 3, and we have a io module in numpy (.io is the new

Re: [Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Nadav Horesh
rical Python Subject: [Numpy-discussion] StringIO test failure with Python3.1.2 Hi, Wow, this is really impressive! I installed the svn numpy version '2.0.0.dev8300' with the latest Python 3.1.2 and it works! All the tests pass except: test_utils.test_lookfor I am guessing that it is this l

[Numpy-discussion] StringIO test failure with Python3.1.2

2010-03-24 Thread Bruce Southey
Hi, Wow, this is really impressive! I installed the svn numpy version '2.0.0.dev8300' with the latest Python 3.1.2 and it works! All the tests pass except: test_utils.test_lookfor I am guessing that it is this line as the other io imports do not have the period. from .io import StringIO ==