Created attachment 857167 [details] build.log.xz (ppc, 0.29.33) [...] File "/var/tmp/portage/dev-python/cython-0.29.33/work/cython-0.29.33-python3_10/tests/run/cpp/special_methods_T561_py3/special_methods_T561_py3.cpython-310-powerpc-linux-gnu.so", line 37, in special_methods_T561_py3 Failed example: Ll = Long().__long__ Expected: Traceback (most recent call last): ... AttributeError: 'special_methods_T561_py3.Long' object has no attribute '__long__' Got: Traceback (most recent call last): File "/usr/lib/python3.10/doctest.py", line 1350, in __run exec(compile(example.source, filename, "single", File "<doctest special_methods_T561_py3[7]>", line 1, in <module> Ll = Long().__long__ AttributeError: 'special_methods_T561_py3.Long' object has no attribute '__long__'. Did you mean: '__doc__'? ---------------------------------------------------------------------- Ran 12443 tests in 5849.199s FAILED (failures=33, errors=2, skipped=66) Some test failures seem due to missing modules like the one above, other are due to wrong test results, e.g: ====================================================================== FAIL: getattribute_py (__getattribute_subclasses__) Doctest: __getattribute_subclasses__.getattribute_py ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.10/doctest.py", line 2221, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for __getattribute_subclasses__.getattribute_py File "/var/tmp/portage/dev-python/cython-0.29.33/work/cython-0.29.33-python3_10/tests/run/cpp/__getattribute_subclasses__/__getattribute_subclasses__.cpython-310-powerpc-linux-gnu.so", line unknown line number, in getattribute_py ---------------------------------------------------------------------- File "/var/tmp/portage/dev-python/cython-0.29.33/work/cython-0.29.33-python3_10/tests/run/cpp/__getattribute_subclasses__/__getattribute_subclasses__.cpython-310-powerpc-linux-gnu.so", line ?, in __getattribute_subclasses__.getattribute_py Failed example: a.getattribute_called Expected: 7 Got: 11
Created attachment 857169 [details] emerge --info
I think we'll need to send this one upstream. Could you try running the test suite by cloning the upstream repo then running 'tox'? (need to install the tox package first) (Try both master + 0.29.x)
On git-master I only got 2 test failures: [...] ====================================================================== FAIL: test_stof (cpp_stl_string) Doctest: cpp_stl_string.test_stof ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.11/doctest.py", line 2222, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for cpp_stl_string.test_stof File "/root/build/cython/TEST_TMP/run/cpp/cpp_stl_string/cpp_stl_string.cpython-311-powerpc-linux-gnu.so", line unknown line number, in test_stof ---------------------------------------------------------------------- File "/root/build/cython/TEST_TMP/run/cpp/cpp_stl_string/cpp_stl_string.cpython-311-powerpc-linux-gnu.so", line ?, in cpp_stl_string.test_stof Failed example: test_stof(b'5.5') Expected: 5.5 Got: 5.0 ====================================================================== FAIL: test_stof (cpp_stl_string) Doctest: cpp_stl_string.test_stof ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.11/doctest.py", line 2222, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for cpp_stl_string.test_stof File "/root/build/cython/TEST_TMP/run/cpp/cpp_stl_string_directives_cpp_locals_True/cpp_stl_string.cpython-311-powerpc-linux-gnu.so", line unknown line number, in test_stof ---------------------------------------------------------------------- File "/root/build/cython/TEST_TMP/run/cpp/cpp_stl_string_directives_cpp_locals_True/cpp_stl_string.cpython-311-powerpc-linux-gnu.so", line ?, in cpp_stl_string.test_stof Failed example: test_stof(b'5.5') Expected: 5.5 Got: 5.0 ---------------------------------------------------------------------- Ran 14804 tests in 3800.858s FAILED (failures=2, skipped=73) Following tests excluded because of missing dependencies on your system: Cython.Coverage build.depfile_numpy errors.w_numpy_arr_as_cppvec_ref memoryview.contig_check memoryview.extension_type_memoryview memoryview.memoryview_annotation_typing memoryview.memoryviewattrs memoryview.numpy_memoryview memoryview.numpy_memoryview_readonly memoryview.relaxed_strides run.complex_extern_GH1433 run.coverage_api run.coverage_cmd run.coverage_cmd_src_layout run.coverage_cmd_src_pkg_layout run.coverage_installed_pkg run.coverage_nogil run.numpy_ValueError_T172 run.numpy_attributes run.numpy_bufacc_T155 run.numpy_cimport run.numpy_cimport_1 run.numpy_cimport_2 run.numpy_cimport_3 run.numpy_cimport_4 run.numpy_cimport_5 run.numpy_cimport_6 run.numpy_math run.numpy_parallel run.numpy_pythran run.numpy_pythran_unit run.numpy_subarray run.numpy_test run.ufunc numpy_ufuncs.ufunc numpy_ufuncs.ufunc numpy_ufuncs.ufunc_ctuple numpy_ufuncs.ufunc_ctuple numpy_ufuncs.ufunc_fused numpy_ufuncs.ufunc_fused numpy.convolve2 TestCodeFormat Most expensive pipeline stages: 'AnalyseDeclarationsTransform': 287.37 / 7311 (0.039 / run), 'generate_pyx_code_stage': 195.14 / 2584 (0.076 / run), 'inject_utility_code_stage': 129.04 / 2922 (0.044 / run), 'parse': 65.38 / 5914 (0.011 / run), 'AnalyseExpressionsTransform': 32.95 / 6503 (0.005 / run), 'RemoveUnreachableCode': 19.64 / 13816 (0.001 / run), 'ControlFlowAnalysis': 18.74 / 6504 (0.003 / run), 'MarkClosureVisitor': 15.83 / 7312 (0.002 / run), 'PostParse': 13.17 / 7313 (0.002 / run), 'InterpretCompilerDirectives': 12.39 / 7312 (0.002 / run) Times: compile-cpp : 1490.29 sec (1315, 1.133 / run) - slowest: 'cpp:test_dataclasses' (24.41s), 'cpp:test_unicode' (16.98s), 'cpp:test_coroutines_pep492' (16.41s), 'cpp:fused_types' (10.93s), 'cpp:test_grammar' (9.27s), 'cpp:test_asyncgen' (9.01s), 'cpp:closure_tests_4_def_to_cdef' (8.94s), 'cpp:fused_def' (8.62s) compile-c : 800.36 sec (1151, 0.695 / run) - slowest: 'c:test_dataclasses' (19.38s), 'c:test_unicode' (13.56s), 'c:test_coroutines_pep492' (13.21s), 'c:fused_types' (7.50s), 'c:test_grammar' (7.48s), 'c:test_asyncgen' (7.05s), 'c:memslice' (6.45s), 'c:exttype_total_ordering' (5.81s) cython : 719.89 sec (2695, 0.267 / run) - slowest: 'c:test_dataclasses' (12.02s), 'cpp:test_dataclasses' (11.60s), 'cpp:fused_types' (10.49s), 'cpp:test_unicode' (6.86s), 'c:test_unicode' (6.83s), 'cpp:test_coroutines_pep492' (6.41s), 'c:test_coroutines_pep492' (6.23s), 'cpp:fused_def' (5.60s) run : 290.25 sec (1575, 0.184 / run) - slowest: 'c:trashcan' (67.39s), 'cpp:trashcan' (67.22s), 'cpp:memslice' (17.52s), 'c:memslice' (17.47s), 'c:test_coroutines_pep492' (15.40s), 'c:test_fstring' (13.98s), 'cpp:test_unicode' (10.14s), 'c:test_unicode' (10.12s) etoe-build : 243.88 sec ( 92, 2.651 / run) - slowest: 'c:module_api(1)' (6.86s), 'c:memoryview_compare_type_pointers(1)' (6.16s), 'c:memoryview_acq_count(1)' (5.66s), 'c:cythonize_pep420_namespace(1)' (5.49s), 'c:common_include_dir(1)' (5.23s), 'c:cpp_extern(1)' (5.08s), 'c:cpdef_enums_import(1)' (4.79s), 'c:cythonize_with_annotate(1)' (4.78s) etoe-run : 65.36 sec ( 172, 0.380 / run) - slowest: 'c:cythonize_script_package(1)' (4.06s), 'c:depfile_package_cythonize(1)' (4.00s), 'c:cythonize_script(1)' (3.85s), 'c:cythonize_with_annotate_via_cli(5)' (3.27s), 'c:cythonize_with_annotate_via_cli(1)' (3.27s), 'c:cythonize_with_annotate_via_cli(3)' (3.25s), 'c:depfile_package_cython(2)' (2.63s), 'c:depfile_package_cython(3)' (2.54s) import : 2.04 sec (1575, 0.001 / run) - slowest: 'cpp:test_dataclasses' (0.02s), 'cpp:bufaccess' (0.02s), 'c:test_dataclasses' (0.02s), 'cpp:memslice' (0.01s), 'c:generators_py' (0.01s), 'c:memslice' (0.01s), 'c:memoryview' (0.01s), 'c:bufaccess' (0.01s) pyrun : 1.06 sec ( 69, 0.015 / run) - slowest: 'py:posonly' (0.11s), 'py:pure_py' (0.10s), 'py:generators_py' (0.09s), 'py:constant_folding' (0.07s), 'py:builtin_float' (0.07s), 'py:methodmangling_T5' (0.05s), 'py:uninitialized' (0.04s), 'py:ext_auto_richcmp' (0.04s) pyimport : 0.10 sec ( 69, 0.001 / run) - slowest: 'py:constant_folding' (0.01s), 'py:pure_py' (0.01s), 'py:generators_py' (0.00s), 'py:pep526_variable_annotations' (0.00s), 'py:builtin_float' (0.00s), 'py:pep557_dataclasses' (0.00s), 'py:genexpr_arg_order' (0.00s), 'py:methodmangling_T5' (0.00s) ALL DONE Compiler output for module embedded: embedded_main.c: In function 'main': embedded_main.c:29:5: warning: 'Py_SetProgramName' is deprecated [-Wdeprecated-declarations] 29 | Py_SetProgramName(program); | ^~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.11/Python.h:94, from embedded.h:6, from embedded_main.c:4: /usr/include/python3.11/pylifecycle.h:37:38: note: declared here 37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *); | ^~~~~~~~~~~~~~~~~ py311: exit 1 (3804.28 seconds) /root/build/cython> .tox/py311/bin/python runtests.py -vv pid=25300 pypy: remove tox env folder /root/build/cython/.tox/pypy py311: FAIL ✖ in 1 hour 4 minutes 17.37 seconds
Created attachment 857407 [details] test.log.xz (ppc, git-0.29.33) Hmm, interesting... 0.29.33 tested out of the git-rep also does show much less test failures. In both cases I tested git-0.29.33 and git master with 'setarch ppc32 tox -r -v &> test.log' [...] ====================================================================== FAIL: test_stof (cpp_stl_string) Doctest: cpp_stl_string.test_stof ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.11/doctest.py", line 2222, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for cpp_stl_string.test_stof File "/root/build/cython/TEST_TMP/run/cpp/cpp_stl_string/cpp_stl_string.cpython-311-powerpc-linux-gnu.so", line unknown line number, in test _stof ---------------------------------------------------------------------- File "/root/build/cython/TEST_TMP/run/cpp/cpp_stl_string/cpp_stl_string.cpython-311-powerpc-linux-gnu.so", line ?, in cpp_stl_string.test_stof Failed example: test_stof(b'5.5') Expected: 5.5 Got: 5.0 ---------------------------------------------------------------------- Ran 12102 tests in 3157.511s FAILED (failures=1, skipped=66)
Created attachment 857409 [details] test.log.xz (ppc, git-master)
I see similar failures (no obvious differences to the original build.log, though the failures count is 1 off) in my amd64 desktop: FAILED (failures=32, errors=2, skipped=72) A number of them look like we have a "did you mean" feature that the test assertions didn't expect (they're expecting an exception to be thrown with a message like "... has no attribute 'cdefvar'" but instead it had that "... has no attribute 'cdefvar'. Did you mean: 'cdefval1'?" But I also see the getattribute ".called" counts differing in some tests. Just before that, I see one test ERRORed with this: Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 939, in _find_spec AttributeError: 'PyxImporter' object has no attribute 'find_spec' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "tests/run/test_coroutines_pep492.pyx", line 528, in test_coroutines_pep492.AsyncBadSyntaxTest.test_badsyntax_3 (test_c oroutines_pep492.cpp:15770) with warnings.catch_warnings(): File "tests/run/test_coroutines_pep492.pyx", line 530, in test_coroutines_pep492.AsyncBadSyntaxTest.test_badsyntax_3 (test_c oroutines_pep492.cpp:15712) compile("async = 1", "<test>", "exec") File "tests/run/test_coroutines_pep492.pyx", line 91, in test_coroutines_pep492.compile (test_coroutines_pep492.cpp:11115) exec(code_string, {}, {}) File "tests/run/test_coroutines_pep492.pyx", line 77, in test_coroutines_pep492.exec (test_coroutines_pep492.cpp:10544) from StringIO import StringIO File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1002, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 941, in _find_spec File "<frozen importlib._bootstrap>", line 914, in _find_spec_legacy ImportWarning: PyxImporter.find_spec() not found; falling back to find_module() If the test suite is failing to find or to load properly the PyxImporter library (which seems to be part of Cython) when run from src_test(), I wonder if that may be why the "no such attribute" errors have different exception messages and the called-count tests get different results? That could also explain why @ernsteiswuerfel got only 2 failures when running in the upstream-supported test environment.
Latest cython-0.29.x no longer in tree since 2024-03-10. Closing.