Commit c0c11c66 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix error line numbers (due to tag additions).

parent f7d1c64f
...@@ -27,11 +27,11 @@ def bool_result(): ...@@ -27,11 +27,11 @@ def bool_result():
_ERRORS = u''' _ERRORS = u'''
2:0: break statement not inside loop 3:0: break statement not inside loop
5:4: break statement not inside loop 6:4: break statement not inside loop
8:4: break statement not inside loop 9:4: break statement not inside loop
11:4: break statement not inside loop 12:4: break statement not inside loop
16:5: break statement not inside loop 17:5: break statement not inside loop
20:4: break statement not inside loop 21:4: break statement not inside loop
22:4: break statement not inside loop 23:4: break statement not inside loop
''' '''
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
ctypedef object[float] mybuffer ctypedef object[float] mybuffer
_ERRORS = u""" _ERRORS = u"""
1:23: Syntax error in ctypedef statement 4:23: Syntax error in ctypedef statement
""" """
...@@ -12,7 +12,7 @@ cdef class MyStr(str): # only in Py2, but can't know that during compilation ...@@ -12,7 +12,7 @@ cdef class MyStr(str): # only in Py2, but can't know that during compilation
pass pass
_ERRORS = """ _ERRORS = """
4:5: inheritance from PyVarObject types like 'tuple' is not currently supported 5:5: inheritance from PyVarObject types like 'tuple' is not currently supported
7:5: inheritance from PyVarObject types like 'bytes' is not currently supported 8:5: inheritance from PyVarObject types like 'bytes' is not currently supported
10:5: inheritance from PyVarObject types like 'str' is not currently supported 11:5: inheritance from PyVarObject types like 'str' is not currently supported
""" """
...@@ -18,5 +18,5 @@ def test(): ...@@ -18,5 +18,5 @@ def test():
# too bad we don't get more errors here ... # too bad we don't get more errors here ...
_ERRORS = u""" _ERRORS = u"""
8:13: Non-keyword arg following star-arg 10:13: Non-keyword arg following star-arg
""" """
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
nonexisting(3, with_kw_arg=4) nonexisting(3, with_kw_arg=4)
_ERRORS = u""" _ERRORS = u"""
1:11: undeclared name not builtin: nonexisting 4:11: undeclared name not builtin: nonexisting
""" """
...@@ -18,12 +18,12 @@ cdef class Bar: ...@@ -18,12 +18,12 @@ cdef class Bar:
pass pass
_ERRORS = u""" _ERRORS = u"""
5:24: C attribute of type 'VoidP' cannot be accessed from Python 8:24: C attribute of type 'VoidP' cannot be accessed from Python
5:24: Cannot convert 'VoidP' to Python object 8:24: Cannot convert 'VoidP' to Python object
6:24: C attribute of type 'VoidP' cannot be accessed from Python 9:24: C attribute of type 'VoidP' cannot be accessed from Python
6:24: Cannot convert 'VoidP' to Python object 9:24: Cannot convert 'VoidP' to Python object
6:24: Cannot convert Python object to 'VoidP' 9:24: Cannot convert Python object to 'VoidP'
14:22: C attribute of type 'Foo' cannot be accessed from Python 17:22: C attribute of type 'Foo' cannot be accessed from Python
14:22: Cannot convert Python object to 'Foo' 17:22: Cannot convert Python object to 'Foo'
""" """
...@@ -5,7 +5,7 @@ cdef void ...@@ -5,7 +5,7 @@ cdef void
cdef nogil class test: pass cdef nogil class test: pass
_ERRORS = u""" _ERRORS = u"""
2: 5: Expected an identifier, found 'pass' 3: 5: Expected an identifier, found 'pass'
3: 9: Empty declarator 4: 9: Empty declarator
4:11: Expected ':', found 'class' 5:11: Expected ':', found 'class'
""" """
...@@ -7,5 +7,5 @@ cdef b(a, b, c=1, d=2): ...@@ -7,5 +7,5 @@ cdef b(a, b, c=1, d=2):
pass pass
_ERRORS = u""" _ERRORS = u"""
2:5:Call with wrong number of arguments (expected at most 4, got 5) 4:5:Call with wrong number of arguments (expected at most 4, got 5)
""" """
...@@ -8,6 +8,6 @@ cdef class Test: ...@@ -8,6 +8,6 @@ cdef class Test:
pass pass
_ERRORS = u""" _ERRORS = u"""
3:9: Special methods must be declared with 'def', not 'cdef' 4:9: Special methods must be declared with 'def', not 'cdef'
6:9: Special methods must be declared with 'def', not 'cdef' 7:9: Special methods must be declared with 'def', not 'cdef'
""" """
...@@ -9,6 +9,6 @@ cdef class D(C): ...@@ -9,6 +9,6 @@ cdef class D(C):
pass pass
_ERRORS = u""" _ERRORS = u"""
6: 9: Signature not compatible with previous declaration 8: 9: Signature not compatible with previous declaration
2: 9: Previous declaration is here 4: 9: Previous declaration is here
""" """
...@@ -26,11 +26,11 @@ def bool_result(): ...@@ -26,11 +26,11 @@ def bool_result():
return True return True
_ERRORS = u''' _ERRORS = u'''
2:0: continue statement not inside loop 3:0: continue statement not inside loop
5:4: continue statement not inside loop 6:4: continue statement not inside loop
8:4: continue statement not inside loop 9:4: continue statement not inside loop
11:4: continue statement not inside loop 12:4: continue statement not inside loop
16:5: continue statement not inside loop 17:5: continue statement not inside loop
20:4: continue statement not inside loop 21:4: continue statement not inside loop
22:4: continue statement not inside loop 23:4: continue statement not inside loop
''' '''
...@@ -4,7 +4,7 @@ cpdef nogil: pass ...@@ -4,7 +4,7 @@ cpdef nogil: pass
cpdef nogil class test: pass cpdef nogil class test: pass
_ERRORS = u""" _ERRORS = u"""
2: 6: cdef blocks cannot be declared cpdef 3: 6: cdef blocks cannot be declared cpdef
3: 6: cdef blocks cannot be declared cpdef 4: 6: cdef blocks cannot be declared cpdef
3:12: Expected ':', found 'class' 4:12: Expected ':', found 'class'
""" """
...@@ -9,5 +9,5 @@ cdef extern from *: ...@@ -9,5 +9,5 @@ cdef extern from *:
new Foo(1, 2) new Foo(1, 2)
_ERRORS = u""" _ERRORS = u"""
6:7: no suitable method found 9:7: no suitable method found
""" """
...@@ -6,5 +6,5 @@ escaped = b'abc\xc3\xbc\xc3\xb6\xc3\xa4' ...@@ -6,5 +6,5 @@ escaped = b'abc\xc3\xbc\xc3\xb6\xc3\xa4'
invalid = b'abcüöä' invalid = b'abcüöä'
_ERRORS = """ _ERRORS = """
5:10: bytes can only contain ASCII literal characters. 6:10: bytes can only contain ASCII literal characters.
""" """
...@@ -54,24 +54,24 @@ cdef unsigned long long var[100][100] ...@@ -54,24 +54,24 @@ cdef unsigned long long var[100][100]
# in 0.11.1 these are warnings # in 0.11.1 these are warnings
FUTURE_ERRORS = u""" FUTURE_ERRORS = u"""
4:13: cdef variable 's' declared after it is used 6:13: cdef variable 's' declared after it is used
4:16: cdef variable 'vv' declared after it is used 6:16: cdef variable 'vv' declared after it is used
9:14: cdef variable 'i' declared after it is used 11:14: cdef variable 'i' declared after it is used
15:14: cdef variable 'i' declared after it is used 17:14: cdef variable 'i' declared after it is used
21:14: cdef variable 'i' declared after it is used 23:14: cdef variable 'i' declared after it is used
24:9: cdef variable 's' declared after it is used 26:9: cdef variable 's' declared after it is used
30:17: cdef variable 't' declared after it is used 32:17: cdef variable 't' declared after it is used
34:13: cdef variable 'r' declared after it is used 36:13: cdef variable 'r' declared after it is used
40:17: cdef variable 't' declared after it is used 42:17: cdef variable 't' declared after it is used
47:10: cdef variable 'baz' declared after it is used 49:10: cdef variable 'baz' declared after it is used
50:24: cdef variable 'var' declared after it is used 52:24: cdef variable 'var' declared after it is used
""" """
syntax error syntax error
_ERRORS = u""" _ERRORS = u"""
40:17: cdef variable 't' declared after it is used 42:17: cdef variable 't' declared after it is used
47:10: cdef variable 'baz' declared after it is used 49:10: cdef variable 'baz' declared after it is used
50:24: cdef variable 'var' declared after it is used 52:24: cdef variable 'var' declared after it is used
67:7: Syntax error in simple statement list 70:7: Syntax error in simple statement list
""" """
...@@ -4,5 +4,5 @@ def test() nogil: ...@@ -4,5 +4,5 @@ def test() nogil:
pass pass
_ERRORS = """ _ERRORS = """
2:0: Python function cannot be declared nogil 3:0: Python function cannot be declared nogil
""" """
...@@ -5,5 +5,5 @@ cdef packed foo: ...@@ -5,5 +5,5 @@ cdef packed foo:
pass pass
_ERRORS = u""" _ERRORS = u"""
1:12: Expected 'struct', found 'foo' 4:12: Expected 'struct', found 'foo'
""" """
...@@ -6,5 +6,5 @@ def f(): ...@@ -6,5 +6,5 @@ def f():
ptr1 = ptr2 + ptr3 # error ptr1 = ptr2 + ptr3 # error
_ERRORS = u""" _ERRORS = u"""
4:13: Invalid operand types for '+' (int *; int *) 6:13: Invalid operand types for '+' (int *; int *)
""" """
...@@ -12,8 +12,8 @@ cdef class Grail: ...@@ -12,8 +12,8 @@ cdef class Grail:
pass pass
_ERRORS = u""" _ERRORS = u"""
1:10: Non-default argument follows default argument 3:10: Non-default argument follows default argument
1:36: Non-default argument following default argument 3:36: Non-default argument following default argument
4:23: Non-default argument following default argument 6:23: Non-default argument following default argument
9:16: This argument cannot have a default value 11:16: This argument cannot have a default value
""" """
...@@ -10,7 +10,7 @@ cdef void foo(obj): ...@@ -10,7 +10,7 @@ cdef void foo(obj):
obj = p2 # error obj = p2 # error
_ERRORS = u""" _ERRORS = u"""
5:16: Cannot assign type 'char *' to 'int' 7:16: Cannot assign type 'char *' to 'int'
6:17: Cannot convert Python object to 'int *' 8:17: Cannot convert Python object to 'int *'
8:17: Cannot convert 'int *' to Python object 10:17: Cannot convert 'int *' to Python object
""" """
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
cdef void spam(): cdef void spam():
None = 42 None = 42
_ERRORS = u""" _ERRORS = u"""
2:1: Cannot assign to or delete this 4:1: Cannot assign to or delete this
""" """
...@@ -7,5 +7,5 @@ def foo(): ...@@ -7,5 +7,5 @@ def foo():
pass pass
_ERRORS = u""" _ERRORS = u"""
4:0: The autotestdict compiler directive is not allowed in function scope 6:0: The autotestdict compiler directive is not allowed in function scope
""" """
...@@ -4,6 +4,6 @@ cdef char *spam() except -1: ...@@ -4,6 +4,6 @@ cdef char *spam() except -1:
pass pass
_ERRORS = u""" _ERRORS = u"""
1:26: Cannot assign type 'long' to 'char *' 3:26: Cannot assign type 'long' to 'char *'
1:26: Exception value incompatible with function return type 3:26: Exception value incompatible with function return type
""" """
...@@ -8,7 +8,7 @@ cdef int tomato(Spam s): # incomplete type ...@@ -8,7 +8,7 @@ cdef int tomato(Spam s): # incomplete type
pass pass
_ERRORS = u""" _ERRORS = u"""
3:21: Use spam() rather than spam(void) to declare a function with no arguments. 5:21: Use spam() rather than spam(void) to declare a function with no arguments.
4:29: Use spam() rather than spam(void) to declare a function with no arguments. 6:29: Use spam() rather than spam(void) to declare a function with no arguments.
5:16: Argument type 'Spam' is incomplete 7:16: Argument type 'Spam' is incomplete
""" """
...@@ -5,5 +5,5 @@ cdef struct Foo ...@@ -5,5 +5,5 @@ cdef struct Foo
def f(Foo *p): def f(Foo *p):
pass pass
_ERRORS = u""" _ERRORS = u"""
3:6: Cannot convert Python object argument to type 'Foo *' 5:6: Cannot convert Python object argument to type 'Foo *'
""" """
...@@ -26,19 +26,19 @@ cdef NoSuchType* ptr ...@@ -26,19 +26,19 @@ cdef NoSuchType* ptr
ptr = None # This should not produce another error ptr = None # This should not produce another error
_ERRORS = u""" _ERRORS = u"""
3:19: Python object cannot be declared extern 5:19: Python object cannot be declared extern
4:16: Array element cannot be a Python object 6:16: Array element cannot be a Python object
5:12: Pointer base type cannot be a Python object 7:12: Pointer base type cannot be a Python object
7:13: Variable type 'int []' is incomplete 9:13: Variable type 'int []' is incomplete
8:11: Variable type 'Grail' is incomplete 10:11: Variable type 'Grail' is incomplete
9:10: Variable type 'void' is incomplete 11:10: Variable type 'void' is incomplete
11:15: Array element type 'int []' is incomplete 13:15: Array element type 'int []' is incomplete
12:14: Array element type 'Grail' is incomplete 14:14: Array element type 'Grail' is incomplete
13:16: Array element type 'void' is incomplete 15:16: Array element type 'void' is incomplete
16:9: Variable type 'int []' is incomplete 18:9: Variable type 'int []' is incomplete
#19:1: Function argument cannot be void #19:1: Function argument cannot be void
19:1: Use spam() rather than spam(void) to declare a function with no arguments. 21:1: Use spam() rather than spam(void) to declare a function with no arguments.
18:7: Argument type 'Grail' is incomplete 20:7: Argument type 'Grail' is incomplete
19:1: Invalid use of 'void' 21:1: Invalid use of 'void'
23:5: 'NoSuchType' is not a type identifier 25:5: 'NoSuchType' is not a type identifier
""" """
...@@ -5,5 +5,5 @@ def f(): ...@@ -5,5 +5,5 @@ def f():
cdef char *ptr cdef char *ptr
int1 = int2 | ptr # error int1 = int2 | ptr # error
_ERRORS = u""" _ERRORS = u"""
4:13: Invalid operand types for '|' (int; char *) 6:13: Invalid operand types for '|' (int; char *)
""" """
...@@ -30,15 +30,15 @@ if union_not_boolean: ...@@ -30,15 +30,15 @@ if union_not_boolean:
_ERRORS = u""" _ERRORS = u"""
5:26: 'struct_type_not_boolean' is not a constant, variable or function identifier 7:26: 'struct_type_not_boolean' is not a constant, variable or function identifier
5:26: Type 'struct_type_not_boolean' not acceptable as a boolean 7:26: Type 'struct_type_not_boolean' not acceptable as a boolean
12:21: 'struct_not_boolean' is not a constant, variable or function identifier 14:21: 'struct_not_boolean' is not a constant, variable or function identifier
12:21: Type 'struct_not_boolean' not acceptable as a boolean 14:21: Type 'struct_not_boolean' not acceptable as a boolean
19:25: 'union_type_not_boolean' is not a constant, variable or function identifier 21:25: 'union_type_not_boolean' is not a constant, variable or function identifier
19:25: Type 'union_type_not_boolean' not acceptable as a boolean 21:25: Type 'union_type_not_boolean' not acceptable as a boolean
26:20: 'union_not_boolean' is not a constant, variable or function identifier 28:20: 'union_not_boolean' is not a constant, variable or function identifier
26:20: Type 'union_not_boolean' not acceptable as a boolean 28:20: Type 'union_not_boolean' not acceptable as a boolean
""" """
...@@ -15,9 +15,9 @@ def f(): ...@@ -15,9 +15,9 @@ def f():
cdef object[x, 1] buf0 cdef object[x, 1] buf0
_ERRORS = u""" _ERRORS = u"""
1:17: Buffer types only allowed as function local variables 3:17: Buffer types only allowed as function local variables
3:21: Buffer types only allowed as function local variables 5:21: Buffer types only allowed as function local variables
6:31: "fakeoption" is not a buffer option 8:31: "fakeoption" is not a buffer option
""" """
#TODO: #TODO:
#7:22: "ndim" must be non-negative #7:22: "ndim" must be non-negative
......
...@@ -29,9 +29,9 @@ def withnogil_acquire(x): ...@@ -29,9 +29,9 @@ def withnogil_acquire(x):
buf = x buf = x
_ERRORS = u""" _ERRORS = u"""
3:9: 'nothing' is not a type identifier 3: 9: 'nothing' is not a type identifier
10:11: Cannot check buffer index bounds without gil; use boundscheck(False) directive 12:11: Cannot check buffer index bounds without gil; use boundscheck(False) directive
22:11: Cannot access buffer with object dtype without gil 24:11: Cannot access buffer with object dtype without gil
22:11: Assignment of Python object not allowed without gil 24:11: Assignment of Python object not allowed without gil
27:12: Assignment of Python object not allowed without gil 29:12: Assignment of Python object not allowed without gil
""" """
...@@ -16,7 +16,7 @@ cdef int x(): ...@@ -16,7 +16,7 @@ cdef int x():
x()() x()()
_ERRORS = u""" _ERRORS = u"""
2:1: Calling non-function type 'int' 4:1: Calling non-function type 'int'
5:1: Calling non-function type 'float' 7:1: Calling non-function type 'float'
14:3: Calling non-function type 'int' 16:3: Calling non-function type 'int'
""" """
...@@ -39,8 +39,8 @@ p4 = h4 ...@@ -39,8 +39,8 @@ p4 = h4
#p2 = h4 # fail #p2 = h4 # fail
_ERRORS = u""" _ERRORS = u"""
16:22: cannot have both '__stdcall' and '__cdecl' calling conventions 18:22: cannot have both '__stdcall' and '__cdecl' calling conventions
19:23: cannot have both '__fastcall' and '__cdecl' calling conventions 21:23: cannot have both '__fastcall' and '__cdecl' calling conventions
""" """
#31:14: Cannot assign type 'void (__cdecl )(void)' to 'void (*)(void)' #31:14: Cannot assign type 'void (__cdecl )(void)' to 'void (*)(void)'
#32:14: Cannot assign type 'void (__stdcall )(void)' to 'void (*)(void)' #32:14: Cannot assign type 'void (__stdcall )(void)' to 'void (*)(void)'
......
...@@ -17,6 +17,6 @@ a.some_method(1, 2) ...@@ -17,6 +17,6 @@ a.some_method(1, 2)
a.some_method(1, y=2) a.some_method(1, y=2)
_ERRORS = u""" _ERRORS = u"""
9:13: Keyword and starred arguments not allowed in cdef functions. 12:13: Keyword and starred arguments not allowed in cdef functions.
14:13: Keyword and starred arguments not allowed in cdef functions. 17:13: Keyword and starred arguments not allowed in cdef functions.
""" """
...@@ -5,5 +5,5 @@ cdef int ...@@ -5,5 +5,5 @@ cdef int
cdef extern from *: cdef extern from *:
void f(int) void f(int)
_ERRORS = u""" _ERRORS = u"""
1:8: Empty declarator 3:8: Empty declarator
""" """
...@@ -8,6 +8,6 @@ cdef extern from *: ...@@ -8,6 +8,6 @@ cdef extern from *:
int value = 3 int value = 3
_ERRORS = u""" _ERRORS = u"""
2:13: Cannot assign default value to fields in cdef classes, structs or unions 4:13: Cannot assign default value to fields in cdef classes, structs or unions
6:12: Cannot assign default value to fields in cdef classes, structs or unions 8:12: Cannot assign default value to fields in cdef classes, structs or unions
""" """
...@@ -9,7 +9,7 @@ ctypedef union eggs: ...@@ -9,7 +9,7 @@ ctypedef union eggs:
cdef enum ham: cdef enum ham:
pass pass
_ERRORS = u""" _ERRORS = u"""
1:5: Empty struct or union definition not allowed outside a 'cdef extern from' block 3:5: Empty struct or union definition not allowed outside a 'cdef extern from' block
4:0: Empty struct or union definition not allowed outside a 'cdef extern from' block 6:0: Empty struct or union definition not allowed outside a 'cdef extern from' block
7:5: Empty enum definition not allowed outside a 'cdef extern from' block 9:5: Empty enum definition not allowed outside a 'cdef extern from' block
""" """
...@@ -8,5 +8,5 @@ cdef void f(): ...@@ -8,5 +8,5 @@ cdef void f():
a = 42 # assignment to non-lvalue a = 42 # assignment to non-lvalue
_ERRORS = u""" _ERRORS = u"""
6:3: Assignment to non-lvalue 'a' 8:3: Assignment to non-lvalue 'a'
""" """
...@@ -8,6 +8,6 @@ cdef class D(C): ...@@ -8,6 +8,6 @@ cdef class D(C):
cdef void f(self, int x): cdef void f(self, int x):
pass pass
_ERRORS = u""" _ERRORS = u"""
6:6: Signature not compatible with previous declaration 8:6: Signature not compatible with previous declaration
2:6: Previous declaration is here 4:6: Previous declaration is here
""" """
...@@ -14,7 +14,7 @@ cdef void foo(): ...@@ -14,7 +14,7 @@ cdef void foo():
bool = 1 in 2 in 3 bool = 1 in 2 in 3
_ERRORS = u""" _ERRORS = u"""
8:13: Invalid types for '==' (int *, Python object) 10:13: Invalid types for '==' (int *, Python object)
9:13: Invalid types for '==' (int, char *) 11:13: Invalid types for '==' (int, char *)
10:13: Invalid types for '==' (char *, int *) 12:13: Invalid types for '==' (char *, int *)
""" """
...@@ -24,10 +24,10 @@ cdef void eggs(Spam s): ...@@ -24,10 +24,10 @@ cdef void eggs(Spam s):
_ERRORS = u""" _ERRORS = u"""
5:36: C struct/union member cannot be a Python object 7:36: C struct/union member cannot be a Python object
15:6: Object of type 'Spam' has no attribute 'k' 17:6: Object of type 'Spam' has no attribute 'k'
16:6: Cannot assign type 'float *[42]' to 'int' 18:6: Cannot assign type 'float *[42]' to 'int'
17:21: Cannot assign type 'int' to 'float *[42]' 19:21: Cannot assign type 'int' to 'float *[42]'
20:7: Cannot select attribute of incomplete type 'Grail' 22:7: Cannot select attribute of incomplete type 'Grail'
21:3: Cannot select attribute of incomplete type 'Grail' 23:3: Cannot select attribute of incomplete type 'Grail'
""" """
...@@ -10,5 +10,5 @@ ctypedef struct Spam: ...@@ -10,5 +10,5 @@ ctypedef struct Spam:
ctypedef struct Spam ctypedef struct Spam
_ERRORS = u""" _ERRORS = u"""
1:0: Forward-referenced type must use 'cdef', not 'ctypedef' 3:0: Forward-referenced type must use 'cdef', not 'ctypedef'
""" """
...@@ -14,6 +14,6 @@ cdef Foo f ...@@ -14,6 +14,6 @@ cdef Foo f
cdef Blarg b cdef Blarg b
_ERRORS = u""" _ERRORS = u"""
3:0: 'Foo' previously declared using 'cdef' 5:0: 'Foo' previously declared using 'cdef'
9:5: 'Blarg' previously declared using 'ctypedef' 11:5: 'Blarg' previously declared using 'ctypedef'
""" """
...@@ -12,8 +12,8 @@ cdef void f(): ...@@ -12,8 +12,8 @@ cdef void f():
_ERRORS = u""" _ERRORS = u"""
1:19: Array element cannot be a function 3:19: Array element cannot be a function
3:18: Function cannot return a function 5:18: Function cannot return a function
8:10: Function cannot return a function 10:10: Function cannot return a function
8:5: Cannot cast to a function type 10:5: Cannot cast to a function type
""" """
...@@ -13,8 +13,8 @@ def f(a): ...@@ -13,8 +13,8 @@ def f(a):
del x[i] # error: deletion of non-Python object del x[i] # error: deletion of non-Python object
del s.m # error: deletion of non-Python object del s.m # error: deletion of non-Python object
_ERRORS = u""" _ERRORS = u"""
8:6: Cannot assign to or delete this 10:6: Cannot assign to or delete this
9:45: Deletion of non-Python, non-C++ object 11:45: Deletion of non-Python, non-C++ object
11:6: Deletion of non-Python, non-C++ object 13:6: Deletion of non-Python, non-C++ object
12:6: Deletion of non-Python, non-C++ object 14:6: Deletion of non-Python, non-C++ object
""" """
...@@ -10,6 +10,6 @@ print 3 ...@@ -10,6 +10,6 @@ print 3
# cython: boundscheck = true # cython: boundscheck = true
_ERRORS = u""" _ERRORS = u"""
3:0: boundscheck directive must be set to True or False, got 'true' 4:0: boundscheck directive must be set to True or False, got 'true'
4:0: boundscheck directive must be set to True or False, got '9' 5:0: boundscheck directive must be set to True or False, got '9'
""" """
...@@ -12,6 +12,6 @@ except AttributeError: ...@@ -12,6 +12,6 @@ except AttributeError:
pass pass
_ERRORS = u""" _ERRORS = u"""
8:0: default 'except:' must be last 9:0: default 'except:' must be last
10:0: default 'except:' must be last 11:0: default 'except:' must be last
""" """
...@@ -9,6 +9,6 @@ cdef spamfunc spam ...@@ -9,6 +9,6 @@ cdef spamfunc spam
grail = spam # type mismatch grail = spam # type mismatch
spam = grail # type mismatch spam = grail # type mismatch
_ERRORS = u""" _ERRORS = u"""
7:28: Cannot assign type 'spamfunc' to 'grailfunc' 9:28: Cannot assign type 'spamfunc' to 'grailfunc'
8:28: Cannot assign type 'grailfunc' to 'spamfunc' 10:28: Cannot assign type 'grailfunc' to 'spamfunc'
""" """
...@@ -15,12 +15,12 @@ cdef void f(): ...@@ -15,12 +15,12 @@ cdef void f():
x = c.__weakref__ x = c.__weakref__
c.__weakref__ = x c.__weakref__ = x
_ERRORS = u""" _ERRORS = u"""
5:20: Illegal use of special attribute __weakref__ 7:20: Illegal use of special attribute __weakref__
5:20: Illegal use of special attribute __weakref__ 7:20: Illegal use of special attribute __weakref__
5:20: Illegal use of special attribute __weakref__ 7:20: Illegal use of special attribute __weakref__
5:20: Special attribute __weakref__ cannot be exposed to Python 7:20: Special attribute __weakref__ cannot be exposed to Python
8:22: Illegal use of special attribute __weakref__ 10:22: Illegal use of special attribute __weakref__
8:22: Special attribute __weakref__ cannot be exposed to Python 10:22: Special attribute __weakref__ cannot be exposed to Python
13:6: Illegal use of special attribute __weakref__ 15:6: Illegal use of special attribute __weakref__
14:2: Illegal use of special attribute __weakref__ 16:2: Illegal use of special attribute __weakref__
""" """
# mode: error
def foo(): def foo():
yield yield
return 0 return 0
...@@ -12,8 +14,8 @@ class Foo: ...@@ -12,8 +14,8 @@ class Foo:
yield yield
_ERRORS = u""" _ERRORS = u"""
3:4: 'return' with argument inside generator 5:4: 'return' with argument inside generator
7:4: 'yield' outside function 9:4: 'yield' outside function
9:0: 'yield' not supported here 11:0: 'yield' not supported here
12:4: 'yield' not supported here 14:4: 'yield' not supported here
""" """
...@@ -9,8 +9,8 @@ def f(obj1, obj2): ...@@ -9,8 +9,8 @@ def f(obj1, obj2):
int1 = int2[int3] # error int1 = int2[int3] # error
obj1 = obj2[ptr1] # error obj1 = obj2[ptr1] # error
_ERRORS = u""" _ERRORS = u"""
5:14: Invalid index type 'float' 7:14: Invalid index type 'float'
6:14: Invalid index type 'float *' 8:14: Invalid index type 'float *'
7:12: Attempting to index non-array type 'int' 9:12: Attempting to index non-array type 'int'
8:17: Cannot convert 'float *' to Python object 10:17: Cannot convert 'float *' to Python object
""" """
...@@ -10,7 +10,7 @@ def int_literals(): ...@@ -10,7 +10,7 @@ def int_literals():
_ERRORS = """ _ERRORS = """
6:8: illegal integer literal syntax in Python source file
7:8: illegal integer literal syntax in Python source file 7:8: illegal integer literal syntax in Python source file
8:8: illegal integer literal syntax in Python source file 8:8: illegal integer literal syntax in Python source file
9:8: illegal integer literal syntax in Python source file
""" """
...@@ -10,9 +10,9 @@ def int_literals(): ...@@ -10,9 +10,9 @@ def int_literals():
_ERRORS = """ _ERRORS = """
4:8: illegal integer literal syntax in Python source file
5:8: illegal integer literal syntax in Python source file 5:8: illegal integer literal syntax in Python source file
6:8: illegal integer literal syntax in Python source file 6:8: illegal integer literal syntax in Python source file
7:8: illegal integer literal syntax in Python source file 7:8: illegal integer literal syntax in Python source file
8:8: illegal integer literal syntax in Python source file 8:8: illegal integer literal syntax in Python source file
9:8: illegal integer literal syntax in Python source file
""" """
...@@ -5,5 +5,5 @@ def f(obj1a, obj1b): ...@@ -5,5 +5,5 @@ def f(obj1a, obj1b):
cdef int *ptr2 cdef int *ptr2
int1, int3, obj1a = int2, ptr2, obj1b # error int1, int3, obj1a = int2, ptr2, obj1b # error
_ERRORS = u""" _ERRORS = u"""
4:31: Cannot assign type 'int *' to 'int' 6:31: Cannot assign type 'int *' to 'int'
""" """
...@@ -10,9 +10,9 @@ cdef f(): ...@@ -10,9 +10,9 @@ cdef f():
spam() # too few args spam() # too few args
spam("blarg") # too few args spam("blarg") # too few args
_ERRORS = u""" _ERRORS = u"""
5:6: Call with wrong number of arguments (expected 2, got 0) 7:6: Call with wrong number of arguments (expected 2, got 0)
6:6: Call with wrong number of arguments (expected 2, got 1) 8:6: Call with wrong number of arguments (expected 2, got 1)
7:6: Call with wrong number of arguments (expected 2, got 3) 9:6: Call with wrong number of arguments (expected 2, got 3)
8:5: Call with wrong number of arguments (expected at least 2, got 0) 10:5: Call with wrong number of arguments (expected at least 2, got 0)
9:5: Call with wrong number of arguments (expected at least 2, got 1) 11:5: Call with wrong number of arguments (expected at least 2, got 1)
""" """
...@@ -5,6 +5,6 @@ cdef class C: ...@@ -5,6 +5,6 @@ cdef class C:
pass pass
_ERRORS = u""" _ERRORS = u"""
2:6: Signature not compatible with previous declaration
2:12: Previous declaration is here 2:12: Previous declaration is here
4: 6: Signature not compatible with previous declaration
""" """
...@@ -6,5 +6,5 @@ cdef extern from *: ...@@ -6,5 +6,5 @@ cdef extern from *:
fp = f fp = f
_ERRORS = u""" _ERRORS = u"""
5:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil' 7:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil'
""" """
...@@ -28,7 +28,7 @@ def redef_in_class_scope(): ...@@ -28,7 +28,7 @@ def redef_in_class_scope():
_ERRORS = u""" _ERRORS = u"""
3:4: no binding for nonlocal 'no_such_name' found 3:4: no binding for nonlocal 'no_such_name' found
10:8: 'x' redeclared as nonlocal 10:8: 'x' redeclared as nonlocal
15:4: no binding for nonlocal 'global_name' found 15:4: no binding for nonlocal 'global_name' found
27:8: 'x' redeclared as nonlocal 27:8: 'x' redeclared as nonlocal
......
...@@ -9,10 +9,10 @@ cdef unsigned long double j ...@@ -9,10 +9,10 @@ cdef unsigned long double j
_ERRORS = u""" _ERRORS = u"""
1:5: Unrecognised type modifier combination
2:5: Unrecognised type modifier combination
3:5: Unrecognised type modifier combination 3:5: Unrecognised type modifier combination
4:5: Unrecognised type modifier combination 4:5: Unrecognised type modifier combination
5:5: Unrecognised type modifier combination 5:5: Unrecognised type modifier combination
6:5: Unrecognised type modifier combination 6:5: Unrecognised type modifier combination
7:5: Unrecognised type modifier combination
8:5: Unrecognised type modifier combination
""" """
...@@ -5,5 +5,5 @@ cdef extern class Grail.Shrubbery ...@@ -5,5 +5,5 @@ cdef extern class Grail.Shrubbery
cdef void spam(Shrubbery sh not None): cdef void spam(Shrubbery sh not None):
pass pass
_ERRORS = u""" _ERRORS = u"""
3:15: 'not None' only allowed in Python functions 5:15: 'not None' only allowed in Python functions
""" """
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
def eggs(int x not None, char* y not None): def eggs(int x not None, char* y not None):
pass pass
_ERRORS = u""" _ERRORS = u"""
1: 9: Only Python type arguments can have 'not None' 3: 9: Only Python type arguments can have 'not None'
1:25: Only Python type arguments can have 'not None' 3:25: Only Python type arguments can have 'not None'
""" """
...@@ -5,5 +5,5 @@ def f(): ...@@ -5,5 +5,5 @@ def f():
cdef int *ptr cdef int *ptr
int1 = int2 * ptr # error int1 = int2 * ptr # error
_ERRORS = u""" _ERRORS = u"""
4:13: Invalid operand types for '*' (int; int *) 6:13: Invalid operand types for '*' (int; int *)
""" """
...@@ -6,5 +6,5 @@ cdef extern: ...@@ -6,5 +6,5 @@ cdef extern:
char a char a
_ERRORS = u""" _ERRORS = u"""
2:9: Cannot declare extern struct as 'packed' 5:9: Cannot declare extern struct as 'packed'
""" """
...@@ -7,6 +7,6 @@ def f(): ...@@ -7,6 +7,6 @@ def f():
flt1 = flt2 ** str1 # error flt1 = flt2 ** str1 # error
_ERRORS = u""" _ERRORS = u"""
4:13: Invalid operand types for '**' (char *; float) 6:13: Invalid operand types for '**' (char *; float)
5:13: Invalid operand types for '**' (float; char *) 7:13: Invalid operand types for '**' (float; char *)
""" """
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
cimport e_pxdimpl_imported cimport e_pxdimpl_imported
_ERRORS = u""" _ERRORS = u"""
6:4: function definition in pxd file must be declared 'cdef inline' 6:4: function definition in pxd file must be declared 'cdef inline'
18:4: function definition in pxd file must be declared 'cdef inline' 18:4: function definition in pxd file must be declared 'cdef inline'
23:8: function definition in pxd file must be declared 'cdef inline' 23:8: function definition in pxd file must be declared 'cdef inline'
""" """
...@@ -9,5 +9,5 @@ def f(): ...@@ -9,5 +9,5 @@ def f():
cdef spam s cdef spam s
s.parrot = x s.parrot = x
_ERRORS = u""" _ERRORS = u"""
4:8: C struct/union member cannot be a Python object 6:8: C struct/union member cannot be a Python object
""" """
...@@ -9,7 +9,7 @@ cdef int h(): ...@@ -9,7 +9,7 @@ cdef int h():
return # error return # error
return p # error return p # error
_ERRORS = u""" _ERRORS = u"""
3:17: Return with value in void function 5:17: Return with value in void function
7:1: Return value required 9:1: Return value required
8:17: Cannot assign type 'int *' to 'int' 10:17: Cannot assign type 'int *' to 'int'
""" """
...@@ -4,5 +4,5 @@ cdef struct unbekannt ...@@ -4,5 +4,5 @@ cdef struct unbekannt
cdef int n cdef int n
n = sizeof(unbekannt) n = sizeof(unbekannt)
_ERRORS = u""" _ERRORS = u"""
3:4: Cannot take sizeof incomplete type 'unbekannt' 5:4: Cannot take sizeof incomplete type 'unbekannt'
""" """
...@@ -17,10 +17,10 @@ for a in int_ptr[2:2:a]: ...@@ -17,10 +17,10 @@ for a in int_ptr[2:2:a]:
pass pass
_ERRORS = u""" _ERRORS = u"""
3:20: Cannot convert 'int *' to Python object 5:20: Cannot convert 'int *' to Python object
4:21: Cannot convert 'int *' to Python object 6:21: Cannot convert 'int *' to Python object
5:22: Cannot convert 'int *' to Python object 7:22: Cannot convert 'int *' to Python object
10:16: C array iteration requires known end index
12:16: C array iteration requires known end index 12:16: C array iteration requires known end index
14:22: C array iteration requires known step size and end index 14:16: C array iteration requires known end index
16:22: C array iteration requires known step size and end index
""" """
...@@ -12,8 +12,8 @@ cdef int u3 = u"\xFF" # fails ...@@ -12,8 +12,8 @@ cdef int u3 = u"\xFF" # fails
_ERRORS = """ _ERRORS = """
2:14: Only single-character string literals can be coerced into ints. 4:14: Only single-character string literals can be coerced into ints.
3:14: Only single-character string literals can be coerced into ints. 5:14: Only single-character string literals can be coerced into ints.
6:15: Only single-character string literals can be coerced into ints. 8:15: Only single-character string literals can be coerced into ints.
9:14: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4. 11:14: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4.
""" """
...@@ -6,6 +6,6 @@ def f(): ...@@ -6,6 +6,6 @@ def f():
ptr1 = int2 - ptr3 # error ptr1 = int2 - ptr3 # error
ptr1 = ptr2 - ptr3 # error ptr1 = ptr2 - ptr3 # error
_ERRORS = u""" _ERRORS = u"""
4:13: Invalid operand types for '-' (int; char *) 6:13: Invalid operand types for '-' (int; char *)
5:13: Cannot assign type 'int' to 'char *' 7:13: Cannot assign type 'int' to 'char *'
""" """
...@@ -10,5 +10,5 @@ elif x == 4: ...@@ -10,5 +10,5 @@ elif x == 4:
print 34 print 34
_ERRORS = u""" _ERRORS = u"""
3:19: undeclared name not builtin: NONEXISTING 5:19: undeclared name not builtin: NONEXISTING
""" """
...@@ -8,5 +8,5 @@ def foo(obj): ...@@ -8,5 +8,5 @@ def foo(obj):
p = <void *>(obj + blarg) # error - temporary p = <void *>(obj + blarg) # error - temporary
_ERRORS = u""" _ERRORS = u"""
6:5: Casting temporary Python object to non-numeric non-Python type 8:5: Casting temporary Python object to non-numeric non-Python type
""" """
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
cdef class Spam cdef class Spam
cdef extern class external.Eggs cdef extern class external.Eggs
_ERRORS = u""" _ERRORS = u"""
1:5: C class 'Spam' is declared but not defined 3:5: C class 'Spam' is declared but not defined
2:5: C class 'Eggs' is declared but not defined 4:5: C class 'Eggs' is declared but not defined
""" """
...@@ -6,6 +6,6 @@ def f(): ...@@ -6,6 +6,6 @@ def f():
int1 = -str2 # error int1 = -str2 # error
int1 = ~str2 # error int1 = ~str2 # error
_ERRORS = u""" _ERRORS = u"""
4:8: Invalid operand type for '-' (char *) 6:8: Invalid operand type for '-' (char *)
5:8: Invalid operand type for '~' (char *) 7:8: Invalid operand type for '~' (char *)
""" """
...@@ -5,6 +5,6 @@ def f(a, b): ...@@ -5,6 +5,6 @@ def f(a, b):
break # error break # error
continue # error continue # error
_ERRORS = u""" _ERRORS = u"""
3:1: break statement not inside loop 5:1: break statement not inside loop
4:1: continue statement not inside loop 6:1: continue statement not inside loop
""" """
# mode: error
# coding=ASCII # coding=ASCII
# mode: error
""" """
Trs bien. Trs bien.
""" """
_ERRORS = u""" _ERRORS = u"""
0:0:Decoding error, missing or incorrect coding=<encoding-name> at top of source ('ascii' codec can't decode byte 0x8f in position 22: ordinal not in range(128)) 0:0:Decoding error, missing or incorrect coding=<encoding-name> at top of source ('ascii' codec can't decode byte 0x8f in position 36: ordinal not in range(128))
""" """
...@@ -15,5 +15,5 @@ cdef class ExtClass: ...@@ -15,5 +15,5 @@ cdef class ExtClass:
_attribute = 5 # FIXME: this is not currently handled!!! _attribute = 5 # FIXME: this is not currently handled!!!
_ERRORS = u""" _ERRORS = u"""
8:13: Cannot assign default value to fields in cdef classes, structs or unions 10:13: Cannot assign default value to fields in cdef classes, structs or unions
""" """
...@@ -33,19 +33,19 @@ def types(l): ...@@ -33,19 +33,19 @@ def types(l):
_ERRORS = u""" _ERRORS = u"""
# syntax1() # syntax1()
7: 4: can use starred expression only as assignment target 8: 4: can use starred expression only as assignment target
9: 4: can use starred expression only as assignment target 10: 4: can use starred expression only as assignment target
11: 4: can use starred expression only as assignment target 12: 4: can use starred expression only as assignment target
13: 4: can use starred expression only as assignment target 14: 4: can use starred expression only as assignment target
15: 5: can use starred expression only as assignment target 16: 5: can use starred expression only as assignment target
15: 9: can use starred expression only as assignment target 16: 9: can use starred expression only as assignment target
17:11: can use starred expression only as assignment target 18:11: can use starred expression only as assignment target
17:24: can use starred expression only as assignment target 18:24: can use starred expression only as assignment target
# syntax2() # syntax2()
23:11: more than 1 starred expression in assignment 24:11: more than 1 starred expression in assignment
# types() # types()
29:15: Cannot coerce list to type 'int' 30:15: Cannot coerce list to type 'int'
30:10: starred target must have Python object (list) type 31:10: starred target must have Python object (list) type
""" """
...@@ -23,11 +23,11 @@ def length_recursive(): ...@@ -23,11 +23,11 @@ def length_recursive():
_ERRORS = u""" _ERRORS = u"""
5:4: too many values to unpack (expected 2, got 3) 6:4: too many values to unpack (expected 2, got 3)
8:4: need more than 1 value to unpack 9:4: need more than 1 value to unpack
11:4: need more than 0 values to unpack 12:4: need more than 0 values to unpack
14:4: need more than 0 values to unpack 15:4: need more than 0 values to unpack
17:4: need more than 0 values to unpack 18:4: need more than 0 values to unpack
18:4: need more than 1 value to unpack 19:4: need more than 1 value to unpack
21:6: need more than 1 value to unpack 22:6: need more than 1 value to unpack
""" """
...@@ -7,6 +7,6 @@ def syntax(): ...@@ -7,6 +7,6 @@ def syntax():
_ERRORS = u""" _ERRORS = u"""
5:4: more than 1 starred expression in assignment 6:4: more than 1 starred expression in assignment
5:8: more than 1 starred expression in assignment 6:8: more than 1 starred expression in assignment
""" """
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
from __future__ import braces from __future__ import braces
_ERRORS = u""" _ERRORS = u"""
1:23: not a chance 3:23: not a chance
""" """
...@@ -4,5 +4,5 @@ def f(): ...@@ -4,5 +4,5 @@ def f():
a = <foao>True a = <foao>True
_ERRORS = u""" _ERRORS = u"""
2:9: 'foao' is not a type identifier 4:9: 'foao' is not a type identifier
""" """
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
'\x' '\x'
_ERRORS = ''' _ERRORS = '''
2:1: Invalid hex escape '\x' 3:1: Invalid hex escape '\x'
''' '''
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
'\x1' '\x1'
_ERRORS = ''' _ERRORS = '''
2:1: Invalid hex escape '\x' 3:1: Invalid hex escape '\x'
''' '''
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
u'\uXYZ' u'\uXYZ'
_ERRORS = ''' _ERRORS = '''
2:2: Invalid unicode escape '\u' 3:2: Invalid unicode escape '\u'
''' '''
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
u'\u' u'\u'
_ERRORS = ''' _ERRORS = '''
2:2: Invalid unicode escape '\u' 3:2: Invalid unicode escape '\u'
''' '''
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
u'\u12' u'\u12'
_ERRORS = ''' _ERRORS = '''
2:2: Invalid unicode escape '\u' 3:2: Invalid unicode escape '\u'
''' '''
...@@ -9,5 +9,5 @@ def false(): ...@@ -9,5 +9,5 @@ def false():
return False return False
_ERRORS = u""" _ERRORS = u"""
4:10: Literal list must be assigned to pointer at time of declaration 6:10: Literal list must be assigned to pointer at time of declaration
""" """
...@@ -6,5 +6,5 @@ cdef class B: ...@@ -6,5 +6,5 @@ cdef class B:
pass pass
_ERRORS = u""" _ERRORS = u"""
3:10: C method has no self argument 5:10: C method has no self argument
""" """
...@@ -6,5 +6,5 @@ cdef class A: ...@@ -6,5 +6,5 @@ cdef class A:
pass pass
_ERRORS = u""" _ERRORS = u"""
3:10: Self argument (int) of C method 'a' does not match parent type (A) 5:10: Self argument (int) of C method 'a' does not match parent type (A)
""" """
...@@ -92,71 +92,71 @@ def bare_pyvar_name(object x): ...@@ -92,71 +92,71 @@ def bare_pyvar_name(object x):
# except these: 29, 34, 44, 56, 58, 60, 62-64 # except these: 29, 34, 44, 56, 58, 60, 62-64
_ERRORS = u""" _ERRORS = u"""
1:5: Function with Python return type cannot be declared nogil 3:5: Function with Python return type cannot be declared nogil
4:5: Function declared nogil has Python locals or temporaries 6:5: Function declared nogil has Python locals or temporaries
6:6: Assignment of Python object not allowed without gil 8:6: Assignment of Python object not allowed without gil
9:5: Discarding owned Python object not allowed without gil 11:5: Discarding owned Python object not allowed without gil
11:5: Function with Python return type cannot be declared nogil 13:5: Function with Python return type cannot be declared nogil
15:5: Calling gil-requiring function not allowed without gil 17:5: Calling gil-requiring function not allowed without gil
24:9: Calling gil-requiring function not allowed without gil 26:9: Calling gil-requiring function not allowed without gil
26:12: Assignment of Python object not allowed without gil 28:12: Assignment of Python object not allowed without gil
28:8: Discarding owned Python object not allowed without gil
28:16: Constructing complex number not allowed without gil
30:8: Backquote expression not allowed without gil
30:8: Discarding owned Python object not allowed without gil 30:8: Discarding owned Python object not allowed without gil
30:9: Operation not allowed without gil 30:16: Constructing complex number not allowed without gil
31:15: Assignment of Python object not allowed without gil 32:8: Backquote expression not allowed without gil
31:15: Operation not allowed without gil 32:8: Discarding owned Python object not allowed without gil
31:15: Python import not allowed without gil 32:9: Operation not allowed without gil
32:8: Operation not allowed without gil 33:15: Assignment of Python object not allowed without gil
32:13: Python import not allowed without gil 33:15: Operation not allowed without gil
32:25: Constructing Python list not allowed without gil 33:15: Python import not allowed without gil
32:25: Operation not allowed without gil 34:8: Operation not allowed without gil
33:17: Iterating over Python object not allowed without gil 34:13: Python import not allowed without gil
35:11: Discarding owned Python object not allowed without gil 34:25: Constructing Python list not allowed without gil
35:11: Indexing Python object not allowed without gil 34:25: Operation not allowed without gil
36:11: Discarding owned Python object not allowed without gil 35:17: Iterating over Python object not allowed without gil
36:11: Slicing Python object not allowed without gil
37:11: Constructing Python slice object not allowed without gil
37:11: Discarding owned Python object not allowed without gil 37:11: Discarding owned Python object not allowed without gil
37:11: Indexing Python object not allowed without gil 37:11: Indexing Python object not allowed without gil
37:13: Converting to Python object not allowed without gil
37:15: Converting to Python object not allowed without gil
37:17: Converting to Python object not allowed without gil
38:11: Accessing Python attribute not allowed without gil
38:11: Discarding owned Python object not allowed without gil 38:11: Discarding owned Python object not allowed without gil
39:9: Constructing Python tuple not allowed without gil 38:11: Slicing Python object not allowed without gil
39:9: Discarding owned Python object not allowed without gil 39:11: Constructing Python slice object not allowed without gil
40:8: Constructing Python list not allowed without gil 39:11: Discarding owned Python object not allowed without gil
40:8: Discarding owned Python object not allowed without gil 39:11: Indexing Python object not allowed without gil
41:8: Constructing Python dict not allowed without gil 39:13: Converting to Python object not allowed without gil
41:8: Discarding owned Python object not allowed without gil 39:15: Converting to Python object not allowed without gil
42:12: Discarding owned Python object not allowed without gil 39:17: Converting to Python object not allowed without gil
42:12: Truth-testing Python object not allowed without gil 40:11: Accessing Python attribute not allowed without gil
43:13: Python type test not allowed without gil 40:11: Discarding owned Python object not allowed without gil
45:10: Discarding owned Python object not allowed without gil 41:9: Constructing Python tuple not allowed without gil
45:10: Operation not allowed without gil 41:9: Discarding owned Python object not allowed without gil
46:8: Discarding owned Python object not allowed without gil 42:8: Constructing Python list not allowed without gil
46:8: Operation not allowed without gil 42:8: Discarding owned Python object not allowed without gil
47:10: Assignment of Python object not allowed without gil 43:8: Constructing Python dict not allowed without gil
47:14: Assignment of Python object not allowed without gil 43:8: Discarding owned Python object not allowed without gil
48:9: Assignment of Python object not allowed without gil 44:12: Discarding owned Python object not allowed without gil
48:13: Assignment of Python object not allowed without gil 44:12: Truth-testing Python object not allowed without gil
48:16: Creating temporary Python reference not allowed without gil 45:13: Python type test not allowed without gil
48:19: Creating temporary Python reference not allowed without gil 47:10: Discarding owned Python object not allowed without gil
49:11: Assignment of Python object not allowed without gil 47:10: Operation not allowed without gil
49:11: Indexing Python object not allowed without gil 48:8: Discarding owned Python object not allowed without gil
50:11: Accessing Python attribute not allowed without gil 48:8: Operation not allowed without gil
50:11: Assignment of Python object not allowed without gil 49:10: Assignment of Python object not allowed without gil
51:8: Constructing Python tuple not allowed without gil 49:14: Assignment of Python object not allowed without gil
51:8: Python print statement not allowed without gil 50:9: Assignment of Python object not allowed without gil
52:8: Deleting Python object not allowed without gil 50:13: Assignment of Python object not allowed without gil
53:8: Returning Python object not allowed without gil 50:16: Creating temporary Python reference not allowed without gil
54:8: Raising exception not allowed without gil 50:19: Creating temporary Python reference not allowed without gil
55:14: Truth-testing Python object not allowed without gil 51:11: Assignment of Python object not allowed without gil
57:17: Truth-testing Python object not allowed without gil 51:11: Indexing Python object not allowed without gil
59:8: For-loop using object bounds or target not allowed without gil 52:11: Accessing Python attribute not allowed without gil
61:8: Try-except statement not allowed without gil 52:11: Assignment of Python object not allowed without gil
65:8: Try-finally statement not allowed without gil 53:8: Constructing Python tuple not allowed without gil
82:8: For-loop using object bounds or target not allowed without gil 53:8: Python print statement not allowed without gil
54:8: Deleting Python object not allowed without gil
55:8: Returning Python object not allowed without gil
56:8: Raising exception not allowed without gil
57:14: Truth-testing Python object not allowed without gil
59:17: Truth-testing Python object not allowed without gil
61:8: For-loop using object bounds or target not allowed without gil
63:8: Try-except statement not allowed without gil
67:8: Try-finally statement not allowed without gil
84:8: For-loop using object bounds or target not allowed without gil
""" """
...@@ -5,6 +5,6 @@ cdef class C: ...@@ -5,6 +5,6 @@ cdef class C:
pass pass
_ERRORS = u""" _ERRORS = u"""
2:9: Signature not compatible with previous declaration
2:15: Previous declaration is here 2:15: Previous declaration is here
4:9: Signature not compatible with previous declaration
""" """
...@@ -12,5 +12,5 @@ gp = g ...@@ -12,5 +12,5 @@ gp = g
fp = f fp = f
_ERRORS = u""" _ERRORS = u"""
10:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil' 12:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil'
""" """
...@@ -4,6 +4,6 @@ import os ...@@ -4,6 +4,6 @@ import os
DEF ospath = os.path DEF ospath = os.path
_ERRORS = u""" _ERRORS = u"""
2:15: Compile-time name 'os' not defined 4:15: Compile-time name 'os' not defined
2:15: Error in compile-time expression: AttributeError: 'NoneType' object has no attribute 'path' 4:15: Error in compile-time expression: AttributeError: 'NoneType' object has no attribute 'path'
""" """
...@@ -6,5 +6,5 @@ import somemod.child ...@@ -6,5 +6,5 @@ import somemod.child
cdef somemod.child.something x cdef somemod.child.something x
_ERRORS = u""" _ERRORS = u"""
3:5: 'somemod.child' is not a cimported module 6:5: 'somemod.child' is not a cimported module
""" """
...@@ -18,8 +18,8 @@ def char_too_long_latin1(): ...@@ -18,8 +18,8 @@ def char_too_long_latin1():
_ERRORS = """ _ERRORS = """
7:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. 8:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
10:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. 11:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
13:21: Only single-character string literals can be coerced into ints. 14:21: Only single-character string literals can be coerced into ints.
16:37: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead. 17:37: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.
""" """
...@@ -18,8 +18,8 @@ def char_too_long_latin1(): ...@@ -18,8 +18,8 @@ def char_too_long_latin1():
_ERRORS = """ _ERRORS = """
7:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. 8:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
10:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. 11:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
13:24: Only single-character string literals can be coerced into ints. 14:24: Only single-character string literals can be coerced into ints.
16:40: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead. 17:40: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.
""" """
...@@ -7,5 +7,5 @@ cdef void* allowed = <void*>a ...@@ -7,5 +7,5 @@ cdef void* allowed = <void*>a
cdef double* disallowed = <double*>a cdef double* disallowed = <double*>a
_ERRORS = u""" _ERRORS = u"""
5:26: Python objects cannot be cast to pointers of primitive types 7:26: Python objects cannot be cast to pointers of primitive types
""" """
...@@ -31,13 +31,13 @@ else: ...@@ -31,13 +31,13 @@ else:
_ERRORS = u''' _ERRORS = u'''
5:0: Return not inside a function body 7:0: Return not inside a function body
8:4: Return not inside a function body 10:4: Return not inside a function body
11:4: Return not inside a function body 13:4: Return not inside a function body
13:5: Return not inside a function body 15:5: Return not inside a function body
16:5: Return not inside a function body 18:5: Return not inside a function body
20:4: Return not inside a function body 22:4: Return not inside a function body
23:4: Return not inside a function body 25:4: Return not inside a function body
26:4: Return not inside a function body
28:4: Return not inside a function body 28:4: Return not inside a function body
30:4: Return not inside a function body
''' '''
...@@ -4,5 +4,5 @@ def f(): ...@@ -4,5 +4,5 @@ def f():
a = b # space space a = b # space space
c = d # space tab c = d # space tab
_ERRORS = u""" _ERRORS = u"""
3:0: Mixed use of tabs and spaces 5:0: Mixed use of tabs and spaces
""" """
...@@ -4,6 +4,6 @@ def f(): ...@@ -4,6 +4,6 @@ def f():
a = b a = b
c = d c = d
_ERRORS = u""" _ERRORS = u"""
3:0: Possible inconsistent indentation 5:0: Possible inconsistent indentation
3:0: Expected an identifier or literal 5:0: Expected an identifier or literal
""" """
...@@ -4,5 +4,5 @@ def f(): ...@@ -4,5 +4,5 @@ def f():
a = b # space space a = b # space space
c = d # tab c = d # tab
_ERRORS = u""" _ERRORS = u"""
3:0: Mixed use of tabs and spaces 5:0: Mixed use of tabs and spaces
""" """
...@@ -4,5 +4,5 @@ def f(obj1a, obj2a, obj3a, obj1b, obj2b, obj3b, obj4b): ...@@ -4,5 +4,5 @@ def f(obj1a, obj2a, obj3a, obj1b, obj2b, obj3b, obj4b):
obj1a, (obj2a, obj3a) = obj1b, (obj2b, obj3b, obj4b) obj1a, (obj2a, obj3a) = obj1b, (obj2b, obj3b, obj4b)
_ERRORS = u""" _ERRORS = u"""
2:9: too many values to unpack (expected 2, got 3) 4:9: too many values to unpack (expected 2, got 3)
""" """
...@@ -51,26 +51,26 @@ cdef list l_f2 = b1 ...@@ -51,26 +51,26 @@ cdef list l_f2 = b1
cdef list l_f3 = u1 cdef list l_f3 = u1
_ERRORS = u""" _ERRORS = u"""
25:20: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4. 26:20: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4.
26:22: Unicode objects do not support coercion to C types. 27:22: Unicode objects do not support coercion to C types.
27:22: 'str' objects do not support coercion to C types (use 'bytes'?). 28:22: 'str' objects do not support coercion to C types (use 'bytes'?).
29:20: Cannot convert Unicode string to 'bytes' implicitly, encoding required. 30:20: Cannot convert Unicode string to 'bytes' implicitly, encoding required.
30:22: Cannot convert Unicode string to 'bytes' implicitly, encoding required. 31:22: Cannot convert Unicode string to 'bytes' implicitly, encoding required.
31:22: Cannot convert 'str' to 'bytes' implicitly. This is not portable. 32:22: Cannot convert 'str' to 'bytes' implicitly. This is not portable.
33:17: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3. 34:17: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3.
34:19: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3. 35:19: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3.
35:17: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding. 36:17: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding.
36:19: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding. 37:19: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding.
38:20: str objects do not support coercion to unicode, use a unicode string literal instead (u'') 39:20: str objects do not support coercion to unicode, use a unicode string literal instead (u'')
39:22: str objects do not support coercion to unicode, use a unicode string literal instead (u'') 40:22: str objects do not support coercion to unicode, use a unicode string literal instead (u'')
40:20: Cannot convert 'bytes' object to unicode implicitly, decoding required 41:20: Cannot convert 'bytes' object to unicode implicitly, decoding required
41:22: Cannot convert 'bytes' object to unicode implicitly, decoding required 42:22: Cannot convert 'bytes' object to unicode implicitly, decoding required
42:22: Cannot convert 'char*' to unicode implicitly, decoding required 43:22: Cannot convert 'char*' to unicode implicitly, decoding required
44:19: Cannot assign type 'str object' to 'tuple object' 45:19: Cannot assign type 'str object' to 'tuple object'
45:18: Cannot assign type 'unicode object' to 'tuple object' 46:18: Cannot assign type 'unicode object' to 'tuple object'
46:18: Cannot assign type 'bytes object' to 'tuple object' 47:18: Cannot assign type 'bytes object' to 'tuple object'
""" """
...@@ -10,5 +10,5 @@ cdef class SubType(FinalClass): ...@@ -10,5 +10,5 @@ cdef class SubType(FinalClass):
pass pass
_ERRORS = """ _ERRORS = """
8:5: Base class 'FinalClass' of type 'SubType' is final 9:5: Base class 'FinalClass' of type 'SubType' is final
""" """
...@@ -11,8 +11,8 @@ def test(): ...@@ -11,8 +11,8 @@ def test():
_ERRORS = u""" _ERRORS = u"""
8:0: Expected path '//ComprehensionNode' not found in result tree 9:0: Expected path '//ComprehensionNode' not found in result tree
8:0: Expected path '//ComprehensionNode//FuncDefNode' not found in result tree 9:0: Expected path '//ComprehensionNode//FuncDefNode' not found in result tree
8:0: Unexpected path '//NameNode' found in result tree 9:0: Unexpected path '//NameNode' found in result tree
8:0: Unexpected path '//SimpleCallNode' found in result tree 9:0: Unexpected path '//SimpleCallNode' found in result tree
""" """
...@@ -5,5 +5,5 @@ def f(): ...@@ -5,5 +5,5 @@ def f():
print assert sizeof(int) == sizof(short) == sizeof(long) print assert sizeof(int) == sizof(short) == sizeof(long)
_ERRORS = u""" _ERRORS = u"""
3:10: Expected an identifier or literal 5:10: Expected an identifier or literal
""" """
...@@ -6,6 +6,6 @@ def test(i): ...@@ -6,6 +6,6 @@ def test(i):
return _this_local_name_does_not_exist_ return _this_local_name_does_not_exist_
_ERRORS = u""" _ERRORS = u"""
1:37:undeclared name not builtin: _this_global_name_does_not_exist_ 3:37:undeclared name not builtin: _this_global_name_does_not_exist_
4:43:undeclared name not builtin: _this_local_name_does_not_exist_ 6:43:undeclared name not builtin: _this_local_name_does_not_exist_
""" """
...@@ -4,5 +4,5 @@ cdef extern from *: ...@@ -4,5 +4,5 @@ cdef extern from *:
void foo(void) void foo(void)
_ERRORS = u""" _ERRORS = u"""
2:13:Use spam() rather than spam(void) to declare a function with no arguments. 4:13:Use spam() rather than spam(void) to declare a function with no arguments.
""" """
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment