This patch adds extra logic to code generation to sort dependencies to guarantee that C code is generated in the right order for circular cdef imports. It does NOT solve python circular import issues. a.pyx: cimport b b.pyx: cimport a Is thus legal, but you can not reference a or b in the global namespace of b.pyx or a.pyx (such as to instantiate a class). This patch also modifies cython to output the exact line in the C code where an exception was thrown in addition to the currently displayed pyx file and line. This enables significantly faster developmental debugging. Finally it splits module initialization into two phases: one that initiates types and handles imports, and another that executes python commands at the global namespace level. This will be more useful as Cython starts to assume more advanced optimization and code generation features The patch is available at: http://trac.sagemath.org/sage_trac/ticket/2655(the third attachment only) and is based against 0.9.6.12, although I can rebase if needed. I am hoping this can be merged into Cython.
--Gary Furnish
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
