On Mon, Sep 27, 2010 at 9:49 AM, Lisandro Dalcin <[email protected]> wrote:
> On 27 September 2010 10:10, Darren Dale <[email protected]> wrote:
>> On Mon, Sep 27, 2010 at 9:00 AM, Darren Dale <[email protected]> wrote:
>>> On Sat, Sep 25, 2010 at 5:25 PM, Lisandro Dalcin <[email protected]> wrote:
>>>> On 25 September 2010 16:04, Darren Dale <[email protected]> wrote:
>>>>> On Sat, Sep 25, 2010 at 2:03 PM, Lisandro Dalcin <[email protected]> 
>>>>> wrote:
>>>>>> On 25 September 2010 12:10, Darren Dale <[email protected]> wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am attempting to contribute to the h5py project by porting the code
>>>>>>> to python3. The code is available in the py3k branch at github
>>>>>>> (http://github.com/darrendale/h5py/tree/py3k). So far, I am able to
>>>>>>> build and install h5py using python3, but when I try to import it, I
>>>>>>> get the following error:
>>>>>>>
>>>>>>> Python 3.1.2 (release31-maint, Sep 17 2010, 20:27:33)
>>>>>>> [GCC 4.4.5] on linux2
>>>>>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>>>>>> import h5py
>>>>>>> Traceback (most recent call last):
>>>>>>>  File "<stdin>", line 1, in <module>
>>>>>>>  File 
>>>>>>> "/home/darren/.local/lib/python3.1/site-packages/h5py-1.3.1.dev-py3.1-linux-x86_64.egg/h5py/__init__.py",
>>>>>>> line 24, in <module>
>>>>>>
>>>>>> Is h5py-1.3.1.dev-py3.1-linux-x86_64.egg a directory or a zip file?
>>>>>
>>>>> It is a directory, not a zipfile.
>>>>>
>>>>
>>>> OK.
>>>>
>>>> I've cloned your repo and tested with cython-devel, and I cannot
>>>> reproduce your error with Python 2.6.
>>>
>>> Right, that was the point of my inquiry.
>>>
>>>> With Python 3.1 (debug build), I get this:
>>>>
>>>> $ python3.1
>>>> Python 3.1.1 (r311:74480, Jun 25 2010, 11:49:56)
>>>> [GCC 4.4.3 20100127 (Red Hat 4.4.3-4)] on linux2
>>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>>> import h5py
>>>> Traceback (most recent call last):
>>>>  File "<stdin>", line 1, in <module>
>>>>  File "h5py/__init__.py", line 24, in <module>
>>>>    from . import h5
>>>>  File "h5e.pyx", line 1, in init h5py.h5e (h5py/h5e.c:3538)
>>>>  File "h5e.pxd", line 20, in init h5py.h5 (h5py/h5.c:5430)
>>>> RuntimeError: maximum recursion depth exceeded while calling a Python 
>>>> object
>>>
>>> Right. Does anyone have any ideas why these imports work with
>>> python-2.6 and not python-3.1?
>>
>> Additional information: I just tried installing that py3k branch on a
>> Snow Leopard machine at work, using the python provided by MacPorts.
>> In this case, I'm getting:
>>
>>>>> import h5py
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in <module>
>>  File 
>> "/Users/darren/.local/lib/python3.1/site-packages/h5py-1.3.1.dev-py3.1-macosx-10.6-x86_64.egg/h5py/__init__.py",
>> line 34, in <module>
>>    from . import h5, h5a, h5d, h5f, h5fd, h5g, h5l, h5o, h5i, h5p,
>> h5r, h5s, h5t, h5z
>>  File "h5t.pxd", line 17, in init h5py.h5a (h5py/h5a.c:5248)
>>  File "h5p.pxd", line 23, in init h5py.h5t (h5py/h5t.c:16481)
>>  File "h5t.pxd", line 17, in init h5py.h5p (h5py/h5p.c:9297)
>> ImportError: No module named h5t
>>
>
> Is h5py know to have circular imports?

Nothing that has ever manifested as a problem with python-2. But yes,
there are some cases, as illustrated by my last post, where one cython
extension cimports from another, and vice versa.

Darren
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to