Re: [Cython] Rewriting/compiling parts of CPython's stdlib in Cython

2011-03-23 Thread Craig Citro
> We have a clear 1.0 goal, being able to compile the full Python > language. We're not there yet, but very close. It may make sense at > that point to also clean up any cruft we don't want to continue > supporting forever. I agree, until that point, there's no way we would > be a Python developmen

Re: [Cython] Rewriting/compiling parts of CPython's stdlib in Cython

2011-03-23 Thread Stefan Behnel
Robert Bradshaw, 23.03.2011 00:54: On Tue, Mar 22, 2011 at 4:09 PM, Dan Stromberg wrote: I think it's a good idea, but I think it'd be better to use pure mode to get code that runs either way, or some sort of preprocessor (I've used m4 with good luck for this, though it doesn't syntax highlight

Re: [Cython] Rewriting/compiling parts of CPython's stdlib in Cython

2011-03-23 Thread Stefan Behnel
Craig Citro, 23.03.2011 08:11: We have a clear 1.0 goal, being able to compile the full Python language. We're not there yet, but very close. It may make sense at that point to also clean up any cruft we don't want to continue supporting forever. I agree, until that point, there's no way we would

Re: [Cython] Rewriting/compiling parts of CPython's stdlib in Cython

2011-03-23 Thread Vitja Makarov
2011/3/23 Stefan Behnel : > Craig Citro, 23.03.2011 08:11: >>> >>> We have a clear 1.0 goal, being able to compile the full Python >>> language. We're not there yet, but very close. It may make sense at >>> that point to also clean up any cruft we don't want to continue >>> supporting forever. I ag

[Cython] Bug report: lambda and numpy.vectorize segfaults

2011-03-23 Thread René Rex
Hello The attached code creates a segfault with Cython 0.14.1. A workaround is to use a real function instead of lambda. Using the normal python interpreter the same code works flawlessly. Here are my build commands: cython --embed vectorizeBug.pyx gcc -pthread -fno-strict-aliasing -DNDEBUG -g -

Re: [Cython] Bug report: lambda and numpy.vectorize segfaults

2011-03-23 Thread Vitja Makarov
2011/3/23 René Rex : > Hello > > The attached code creates a segfault with Cython 0.14.1. A workaround > is to use a real function instead of lambda. Using the normal python > interpreter the same code works flawlessly. > > Here are my build commands: > > cython --embed vectorizeBug.pyx > gcc -pthr

Re: [Cython] Bug report: lambda and numpy.vectorize segfaults

2011-03-23 Thread Stefan Behnel
Vitja Makarov, 23.03.2011 17:25: File "/home/vitja/tmp/cython-my-git/Cython/Compiler/Parsing.py", line 2307, in p_c_arg_decl if 'pxd' in s.level: AttributeError: 'PyrexScanner' object has no attribute 'level' Yes it does: """ # Cython/Plex/Scanners.pxd cdef class Scanner: [...]

Re: [Cython] Bug report: lambda and numpy.vectorize segfaults

2011-03-23 Thread Stefan Behnel
Vitja Makarov, 23.03.2011 17:25: def f(): return lambda x=0: x f()() Gives me this bogus code at function entry: Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); PyObject* values[1] = {0}; values[0] = ((PyObject *)0); // <<< !!! Looks like the default value is considered an

Re: [Cython] Bug report: lambda and numpy.vectorize segfaults

2011-03-23 Thread Vitja Makarov
2011/3/23 Stefan Behnel : > Vitja Makarov, 23.03.2011 17:25: >> >>   File "/home/vitja/tmp/cython-my-git/Cython/Compiler/Parsing.py", >> line 2307, in p_c_arg_decl >>     if 'pxd' in s.level: >> AttributeError: 'PyrexScanner' object has no attribute 'level' > > Yes it does: > > """ > # Cython/Plex/

Re: [Cython] Bug in cython-mode.el under GNU Emacs 23.2.1

2011-03-23 Thread Lisandro Dalcin
On 22 March 2011 02:21, Vitja Makarov wrote: > 2011/3/22 Rafe Kettler : >> I've just tried out cython-mode.el and I was a bit disappointed when it >> didn't work right off the bat. >> >> I added the following to my .emacs: >> >> (setq load-path (cons "~/lib/emacs-plugins" load-path)) >> (require '

Re: [Cython] Bug report: lambda and numpy.vectorize segfaults

2011-03-23 Thread Stefan Behnel
Vitja Makarov, 23.03.2011 20:11: 2011/3/23 Stefan Behnel: Vitja Makarov, 23.03.2011 17:25: File "/home/vitja/tmp/cython-my-git/Cython/Compiler/Parsing.py", line 2307, in p_c_arg_decl if 'pxd' in s.level: AttributeError: 'PyrexScanner' object has no attribute 'level' Yes it does: """