[Pyrex] [Cython-dev] Test case for Pyrex and Cython

David McNab rebirth at orcon.net.nz
Mon Nov 26 01:47:51 CET 2007


On Sun, 2007-11-25 at 14:14 -0800, Jim Kleckner wrote:
> especially Pyrex's segfaults and stack corruption
> > when loading three or more modules from a package hierarchy
...

> I'm certainly seeing those segfaults.

Ain't just me then - phew!!

> It would be nice if Cython were able to permit the fully-qualified
> form of the file and import naming and implement the shorthand as
> a feature.

That might be personal taste.

>From my perspective, Cython's approach is much more consistent with
distutils, where pure-python files have to be named as their leaves in
the hierarchy, and have to reside at the right part of the directory
tree.

Also, Java uses the same approach - source files must reside at the
correct points in a filesystem directory tree.

Guess I've kinda got used to it. I do like being able to mix pure-python
and Cython files in the same directory tree - makes sense.

>   I do prefer using fully-qualified names inside the pyx
> files.  That way if I copy code from one package/module to/from another,
> it doesn't need modification.  You always refer to the module by its
> unique "canonical" name.

That is an upside, but unless the Cython devs sort out the problem, the
dotted-filenames may not be an option for you - yet.

> Imagine that I created a module named testcimport/sys.pyx.
> I certainly would not want to write:
>   import sys
> which would collide with the global sys.  I want to be able
> to write:
>   import testcimport.sys
> Of course, I wouldn't do that for sys, but you can imagine
> a conflict occurring with a more obscurely-named base module.

Programming is always about picking the options that suck least :P

> It has been a "maze of twisty passages, all different"...
> Thanks again for your help navigating the maze, David.

I'm always happy whenever I can spare others of the same hair-pulling
I've had to go through. There are so many times I've benefited from
others writing up their experiences.

Cheers
David






More information about the Pyrex mailing list