Hannes Röst, 17.07.2013 14:45: > I am trying to compile a program with Cython using the compiler directives and > I am running into some trouble. Specifically, I am trying to port a Cython > 0.18 > program to Cython 0.19 and due to changes how char * and Python str are > handled, I need to set the c_string_encoding directive.
This may or may not be so. The fact that it gives an error in 0.19 might also hint at problems in your code. There's some documentation available: http://docs.cython.org/src/tutorial/strings.html If you need further help, then the cython-users mailing list is the right place to ask. > Unfortunately, this > fails for my project and also in the following testcase when I try to do it > locally: > > cimport cython > cdef class TestClass: > def foo(self): > with cython.c_string_encoding("ascii"): > return This can't work. The string encoding is a module global option. > The error message that > I get is attached at the end. Did I do something wrong or can somebody point > me > in the right direction? > > Error message: > > inimalcase.pyx:6:13: Compiler crash in InterpretCompilerDirectives > [...] > File "/home/hr/lib/Cython-0.19.1/Cython/Compiler/ParseTreeTransforms.py", > line 913, in try_to_parse_directive > assert False > AssertionError: That's a bug. It shouldn't crash and instead give a compile error. Thanks for the report. Stefan _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel