[Cython] Cython 0.15 release

Vitja Makarov vitja.makarov at gmail.com
Wed Jul 20 11:58:31 CEST 2011


2011/7/20 mark florisson <markflorisson88 at gmail.com>:
> On 20 July 2011 11:47, Stefan Behnel <stefan_ml at behnel.de> wrote:
>> mark florisson, 20.07.2011 11:40:
>>>
>>> On 20 July 2011 11:26, Stefan Behnel wrote:
>>>>
>>>> mark florisson, 20.07.2011 10:51:
>>>>>
>>>>> On 20 July 2011 02:32, Robert Bradshaw wrote:
>>>>>>
>>>>>> We're long overdue for a release, and this week would be a good one
>>>>>> for me to push one out. Hudson
>>>>>> https://sage.math.washington.edu:8091/hudson is looking in pretty good
>>>>>> shape, and though I know we've got a big pile of stuff currently in
>>>>>> progress, we've also got a big backlog of stuff to get out. I'd like
>>>>>> to finish looking at https://github.com/cython/cython/pull/38 , are
>>>>>> there any other changes that people want to urgently get in? Also,
>>>>>> I've started http://wiki.cython.org/ReleaseNotes-0.15 , feel free to
>>>>>> edit if you think anything should be highlighted.
>>>>>
>>>>> I think cpdef enum is a rather small but still very useful change for
>>>>> many people.
>>>>
>>>> Did we agree on the right syntax yet? We should be sure about that before
>>>> adding a new syntax feature to the language that we won't be able to
>>>> change
>>>> later on.
>>>
>>> I think we settled on the syntax in the thread called Cython .pxd
>>> introspection: listing defined constants, when Trevor was working on
>>> it:
>>> http://mail.python.org/pipermail/cython-devel/2011-February/000035.html
>>>
>>> It does look like the most sensible syntax to me, as cpdef is about
>>> exposing C/Cython-only stuff to Python.
>>
>> Ok. Does the current implementation raise syntax errors where appropriate,
>> in order to prevent the syntax from allowing to be applied in unwanted
>> places? What about the "cdef extern: ... cpdef enum" case? Is that to be
>> allowed?
>
> I don't know about the former, but I believe it will raise syntax
> errors whenever cdef enum would be invalid. I don't know if it checks
> whether there is a corresponding .pyx when it is cimported, perhaps
> Vitja can comment on that.
>

Actually I don't. My change simply allows cpdef enum and doesn't do
context checking.
So it's better to write some tests for this.

> Yes, especially cdef extern: cpdef enum is very useful (and
> implemented), when you want to expose C constants to Python.
>

Yes, this works, but I do worry about it
https://github.com/vitek/cython/commit/471c41a7b37728b1b8844ea13d64b892530f403d

I've changed CDefExternNode.generate_execution_code() to call
body.generate_execution_code()
And I'm not sure if it generates unwanted code.


-- 
vitja.


More information about the cython-devel mailing list