I'm getting an infinite recursion in deepcopy() in fresh_finally_clause() here: https://github.com/cython/cython/blob/master/Cython/Compiler/Nodes.py#L7022 I'm reporting it now in case you immediately know what the problem is. I'll try to analyse it later.