You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the following incorrect code causes cython -a to raise an exception.
cdef class X:
cdef cinit(self):
self.X = not_defined
cython -a produces the following:
Error converting Pyrex file to C:
...
cdef class X:
cdef cinit(self):
^
/home/hoytak/workspace/clsynth-cython/clsynth/testcase.pyx:2:9: Special methods must be declared with 'def', not 'cdef'
Error converting Pyrex file to C:
...
cdef class X:
cdef cinit(self):
self.X = not_defined
^
/home/hoytak/workspace/clsynth-cython/clsynth/testcase.pyx:3:28: undeclared name not builtin: not_defined
Traceback (most recent call last):
File "/home/hoytak/sysroot/bin/cython", line 8, in
main(command_line = 1)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 698, in main
result = compile(sources, options)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 675, in compile
return compile_multiple(source, options)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 645, in compile_multiple
result = run_pipeline(source, options)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 507, in run_pipeline
err, enddata = context.run_pipeline(pipeline, source)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 169, in run_pipeline
data = phase(data)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 114, in generate_pyx_code
module_node.process_implementation(options, result)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 67, in process_implementation
self.generate_c_code(env, options, result)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 261, in generate_c_code
self.generate_typeobj_definitions(env, code)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 779, in generate_typeobj_definitions
self.generate_new_function(scope, code)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 873, in generate_new_function
if entry.trivial_signature:
AttributeError: Entry instance has no attribute 'trivial_signature'
I'm using 1080:c41700a7a340 from the cython-devel repository.
Hello,
the following incorrect code causes cython -a to raise an exception.
cdef class X:
cdef cinit(self):
self.X = not_defined
cython -a produces the following:
Error converting Pyrex file to C:
...
cdef class X:
cdef cinit(self):
^
/home/hoytak/workspace/clsynth-cython/clsynth/testcase.pyx:2:9: Special methods must be declared with 'def', not 'cdef'
Error converting Pyrex file to C:
...
cdef class X:
cdef cinit(self):
self.X = not_defined
^
/home/hoytak/workspace/clsynth-cython/clsynth/testcase.pyx:3:28: undeclared name not builtin: not_defined
Traceback (most recent call last):
File "/home/hoytak/sysroot/bin/cython", line 8, in
main(command_line = 1)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 698, in main
result = compile(sources, options)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 675, in compile
return compile_multiple(source, options)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 645, in compile_multiple
result = run_pipeline(source, options)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 507, in run_pipeline
err, enddata = context.run_pipeline(pipeline, source)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 169, in run_pipeline
data = phase(data)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 114, in generate_pyx_code
module_node.process_implementation(options, result)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 67, in process_implementation
self.generate_c_code(env, options, result)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 261, in generate_c_code
self.generate_typeobj_definitions(env, code)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 779, in generate_typeobj_definitions
self.generate_new_function(scope, code)
File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 873, in generate_new_function
if entry.trivial_signature:
AttributeError: Entry instance has no attribute 'trivial_signature'
I'm using 1080:c41700a7a340 from the cython-devel repository.
Migrated from http://trac.cython.org/ticket/59
The text was updated successfully, but these errors were encountered: