cython: Python 3.9 test failures on 0.29.x

Hello. In Fedora, we try to build our packages with pre-releases of Python 3.9. Cython seem to work fine in general cases, but there are some test failures with Cython 0.29.15 and Python 3.9.0a3.

I haven’t found any issue for this, so I’m opening this one to track it. I know that sometimes the master branch has such problems fixed and if pointed to them, we can work on backports.

Here is the full log: build.log

And here are the failures:

======================================================================
FAIL: A (always_allow_keywords_T295)
Doctest: always_allow_keywords_T295.A
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for always_allow_keywords_T295.A
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/c/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line unknown line number, in A
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/c/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line ?, in always_allow_keywords_T295.A
Failed example:
    A().meth1(arg=None)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: meth1() takes no keyword arguments
Got:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest always_allow_keywords_T295.A[2]>", line 1, in <module>
        A().meth1(arg=None)
    TypeError: A.meth1() takes no keyword arguments
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/c/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line ?, in always_allow_keywords_T295.A
Failed example:
    A().meth2(arg=None)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: meth2() takes no keyword arguments
Got:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest always_allow_keywords_T295.A[5]>", line 1, in <module>
        A().meth2(arg=None)
    TypeError: A.meth2() takes no keyword arguments
======================================================================
FAIL: func1 (always_allow_keywords_T295)
Doctest: always_allow_keywords_T295.func1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for always_allow_keywords_T295.func1
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/c/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line unknown line number, in func1
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/c/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line ?, in always_allow_keywords_T295.func1
Failed example:
    func1(arg=None)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: func1() takes no keyword arguments
Got:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest always_allow_keywords_T295.func1[2]>", line 1, in <module>
        func1(arg=None)
    TypeError: always_allow_keywords_T295.func1() takes no keyword arguments
======================================================================
FAIL: func2 (always_allow_keywords_T295)
Doctest: always_allow_keywords_T295.func2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for always_allow_keywords_T295.func2
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/c/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line unknown line number, in func2
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/c/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line ?, in always_allow_keywords_T295.func2
Failed example:
    func2(arg=None)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: func2() takes no keyword arguments
Got:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest always_allow_keywords_T295.func2[2]>", line 1, in <module>
        func2(arg=None)
    TypeError: always_allow_keywords_T295.func2() takes no keyword arguments
======================================================================
FAIL: A (always_allow_keywords_T295)
Doctest: always_allow_keywords_T295.A
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for always_allow_keywords_T295.A
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/cpp/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line unknown line number, in A
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/cpp/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line ?, in always_allow_keywords_T295.A
Failed example:
    A().meth1(arg=None)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: meth1() takes no keyword arguments
Got:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest always_allow_keywords_T295.A[2]>", line 1, in <module>
        A().meth1(arg=None)
    TypeError: A.meth1() takes no keyword arguments
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/cpp/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line ?, in always_allow_keywords_T295.A
Failed example:
    A().meth2(arg=None)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: meth2() takes no keyword arguments
Got:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest always_allow_keywords_T295.A[5]>", line 1, in <module>
        A().meth2(arg=None)
    TypeError: A.meth2() takes no keyword arguments
======================================================================
FAIL: func1 (always_allow_keywords_T295)
Doctest: always_allow_keywords_T295.func1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for always_allow_keywords_T295.func1
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/cpp/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line unknown line number, in func1
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/cpp/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line ?, in always_allow_keywords_T295.func1
Failed example:
    func1(arg=None)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: func1() takes no keyword arguments
Got:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest always_allow_keywords_T295.func1[2]>", line 1, in <module>
        func1(arg=None)
    TypeError: always_allow_keywords_T295.func1() takes no keyword arguments
======================================================================
FAIL: func2 (always_allow_keywords_T295)
Doctest: always_allow_keywords_T295.func2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for always_allow_keywords_T295.func2
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/cpp/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line unknown line number, in func2
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/cpp/always_allow_keywords_T295/always_allow_keywords_T295.cpython-39-x86_64-linux-gnu.so", line ?, in always_allow_keywords_T295.func2
Failed example:
    func2(arg=None)
Expected:
    Traceback (most recent call last):
    ...
    TypeError: func2() takes no keyword arguments
Got:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest always_allow_keywords_T295.func2[2]>", line 1, in <module>
        func2(arg=None)
    TypeError: always_allow_keywords_T295.func2() takes no keyword arguments
======================================================================
FAIL: B (py3k_super)
Doctest: py3k_super.B
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for py3k_super.B
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/c/py3k_super/py3k_super.cpython-39-x86_64-linux-gnu.so", line unknown line number, in B
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/c/py3k_super/py3k_super.cpython-39-x86_64-linux-gnu.so", line ?, in py3k_super.B
Failed example:
    B.class_method()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest py3k_super.B[2]>", line 1, in <module>
        B.class_method()
      File "tests/run/py3k_super.pyx", line 37, in py3k_super.B.class_method
        return super().class_method()
    TypeError: super(type, obj): obj must be an instance or subtype of type
======================================================================
FAIL: B (py3k_super)
Doctest: py3k_super.B
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for py3k_super.B
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/cpp/py3k_super/py3k_super.cpython-39-x86_64-linux-gnu.so", line unknown line number, in B
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/1/run/cpp/py3k_super/py3k_super.cpython-39-x86_64-linux-gnu.so", line ?, in py3k_super.B
Failed example:
    B.class_method()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest py3k_super.B[2]>", line 1, in <module>
        B.class_method()
      File "tests/run/py3k_super.pyx", line 37, in py3k_super.B.class_method
        return super().class_method()
    TypeError: super(type, obj): obj must be an instance or subtype of type
----------------------------------------------------------------------
======================================================================
FAIL: staff (closure_class_T596)
Doctest: closure_class_T596.staff
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for closure_class_T596.staff
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/5/run/c/closure_class_T596/closure_class_T596.cpython-39-x86_64-linux-gnu.so", line unknown line number, in staff
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/5/run/c/closure_class_T596/closure_class_T596.cpython-39-x86_64-linux-gnu.so", line ?, in closure_class_T596.staff
Failed example:
    kls.klass()
Expected:
    ('Foo', 1, 2)
Got:
    ('type', 1, 2)
======================================================================
FAIL: staff (closure_class_T596)
Doctest: closure_class_T596.staff
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for closure_class_T596.staff
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/5/run/cpp/closure_class_T596/closure_class_T596.cpython-39-x86_64-linux-gnu.so", line unknown line number, in staff
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/5/run/cpp/closure_class_T596/closure_class_T596.cpython-39-x86_64-linux-gnu.so", line ?, in closure_class_T596.staff
Failed example:
    kls.klass()
Expected:
    ('Foo', 1, 2)
Got:
    ('type', 1, 2)
----------------------------------------------------------------------
======================================================================
FAIL: B (py2_super)
Doctest: py2_super.B
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for py2_super.B
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/0/run/c/py2_super/py2_super.cpython-39-x86_64-linux-gnu.so", line unknown line number, in B
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/0/run/c/py2_super/py2_super.cpython-39-x86_64-linux-gnu.so", line ?, in py2_super.B
Failed example:
    B.class_method()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest py2_super.B[2]>", line 1, in <module>
        B.class_method()
      File "tests/run/py2_super.pyx", line 37, in py2_super.B.class_method
        return super(B, cls).class_method()
    TypeError: super(type, obj): obj must be an instance or subtype of type
======================================================================
FAIL: B (py2_super)
Doctest: py2_super.B
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for py2_super.B
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/0/run/cpp/py2_super/py2_super.cpython-39-x86_64-linux-gnu.so", line unknown line number, in B
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/0/run/cpp/py2_super/py2_super.cpython-39-x86_64-linux-gnu.so", line ?, in py2_super.B
Failed example:
    B.class_method()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python3.9/doctest.py", line 1329, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest py2_super.B[2]>", line 1, in <module>
        B.class_method()
      File "tests/run/py2_super.pyx", line 37, in py2_super.B.class_method
        return super(B, cls).class_method()
    TypeError: super(type, obj): obj must be an instance or subtype of type
----------------------------------------------------------------------
======================================================================
FAIL: classmethod ()
Doctest: classmethod
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for classmethod
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/c/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 1, in classmethod
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/c/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 9, in classmethod
Failed example:
    class1.bview()
Expected:
    class1
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/c/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 11, in classmethod
Failed example:
    class1().bview()
Expected:
    class1
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/c/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 21, in classmethod
Failed example:
    class3.bview()
Expected:
    class3
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/c/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 23, in classmethod
Failed example:
    class3().bview()
Expected:
    class3
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/c/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 28, in classmethod
Failed example:
    class4.view()
Expected:
    class4
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/c/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 30, in classmethod
Failed example:
    class5.view()
Expected:
    class5
Got:
    type
======================================================================
FAIL: classmethod ()
Doctest: classmethod
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.9/doctest.py", line 2197, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for classmethod
  File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/cpp/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 1, in classmethod
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/cpp/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 9, in classmethod
Failed example:
    class1.bview()
Expected:
    class1
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/cpp/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 11, in classmethod
Failed example:
    class1().bview()
Expected:
    class1
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/cpp/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 21, in classmethod
Failed example:
    class3.bview()
Expected:
    class3
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/cpp/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 23, in classmethod
Failed example:
    class3().bview()
Expected:
    class3
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/cpp/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 28, in classmethod
Failed example:
    class4.view()
Expected:
    class4
Got:
    type
----------------------------------------------------------------------
File "/builddir/build/BUILD/cython-0.29.15/TEST_TMP/4/run/cpp/classmethod/classmethod.cpython-39-x86_64-linux-gnu.so", line 30, in classmethod
Failed example:
    class5.view()
Expected:
    class5
Got:
    type
----------------------------------------------------------------------

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 31 (28 by maintainers)

Most upvoted comments

@hroncok could you test the latest 0.29.x (or release) branch?

It contains a somewhat questionable change that makes it generate different code on 16-bit Py2.x Unicode platforms (including Windows), and hopefully only there – that’s what I would like to be sure about.

They came from #3106.