GSoC Week #11 & #12

I completed the feature of using function annotation to type arguments and return value. Meanwhile, tests have been added or improved for this feature and the previously implemented cdef/cpdef support in pure Python mode.

Documentations also get updated to reflect the features I improved.

At now, GSoC is almost finished. It is quite fun to work on the Cython codebase. I’ll continue to maintain these patches, respond to reviews and help them get merged. Probably I’ll continue to work on improving Cython as a hobby. ūüôā

August 16, 2010. Uncategorized. Leave a comment.

GSoC Week #10

Last week I merged the pure Python decorator changes into my “integration branch”, then the hudson tests revealed some minor problem, and finally I got them fixed.

I also started to think about annotation support. To export the __annotations__ slot, there is a Python C-API PyFunction_SetAnnotations. However,¬†apparently this API is for PyFunction, but Cython compiled functions are PyCFunction. Thus, to export this slot, we have to somehow extend and customize the¬†¬†PyCFunction type, just like what has been done in Cython for binding method. However so far it seems it is not worth the effort to have a customized type just for exporting annotation. Thus, turning annotations to argument typing would have higher priority and I’ll head to that.

Turning annotations to typing information should not be hard. Before actually to do this, I refactored  the DefNode a bit and got the issue #477 fixed. Since the @cython.locals is actually similar to the typing annotations, it would be then easier to get it done.

August 4, 2010. Uncategorized. Leave a comment.