Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.15.0: pytest fails in one unit pythran/tests/test_euler.py::TestEuler::test_euler11_run0 and pytest wartnings #2192

Open
kloczek opened this issue Mar 31, 2024 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Mar 31, 2024

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix> using installer module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pythran-0.15.0-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pythran-0.15.0-2.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0
configfile: pyproject.toml
collected 3569 items

pythran/tests/test_advanced.py ......................................s.. [  1%]
..............................                                           [  1%]
pythran/tests/test_base.py ............................................. [  3%]
.......s................................................................ [  5%]
........................................................................ [  7%]
.........                                                                [  7%]
pythran/tests/test_bisect.py ...........                                 [  7%]
pythran/tests/test_blas.py .                                             [  7%]
pythran/tests/test_cases.py ............................................ [  9%]
...............s......................s...............................s. [ 11%]
..s...............................                                       [ 12%]
pythran/tests/test_complex.py ..........................                 [ 12%]
pythran/tests/test_conversion.py .......s............................... [ 13%]
..............                                                           [ 14%]
pythran/tests/test_copperhead.py ......................                  [ 14%]
pythran/tests/test_dict.py ...................................           [ 15%]
pythran/tests/test_distutils.py ..........                               [ 16%]
pythran/tests/test_euler.py ........F.s.s..s....ss.......s.s...ss.s.     [ 17%]
pythran/tests/test_exception.py ..s..................................... [ 18%]
........................................................................ [ 20%]
.                                                                        [ 20%]
pythran/tests/test_file.py ...........................................   [ 21%]
pythran/tests/test_format.py s                                           [ 21%]
pythran/tests/test_gwebb.py ...s                                         [ 21%]
pythran/tests/test_icc.py .                                              [ 21%]
pythran/tests/test_import_all.py ..........                              [ 22%]
pythran/tests/test_ipython.py ..                                         [ 22%]
pythran/tests/test_itertools.py ........................................ [ 23%]
......                                                                   [ 23%]
pythran/tests/test_list.py ......................................        [ 24%]
pythran/tests/test_math.py .......................................       [ 25%]
pythran/tests/test_named_parameters.py .............                     [ 25%]
pythran/tests/test_ndarray.py .......................................... [ 27%]
.....ss........sss...................................................... [ 29%]
........................................................................ [ 31%]
...................................................                      [ 32%]
pythran/tests/test_nogil.py ....                                         [ 32%]
pythran/tests/test_none.py ............................................. [ 33%]
..................                                                       [ 34%]
pythran/tests/test_normalize_methods.py .........................        [ 35%]
pythran/tests/test_numpy_broadcasting.py ..............................  [ 36%]
pythran/tests/test_numpy_fft.py ................s....................... [ 37%]
.........................................s.................ss........... [ 39%]
.........................................................                [ 40%]
pythran/tests/test_numpy_func0.py ...................................... [ 41%]
........................................................................ [ 43%]
........................................................................ [ 45%]
............................................sss...........ss..........   [ 47%]
pythran/tests/test_numpy_func1.py ss.................................... [ 48%]
.................................................                        [ 50%]
pythran/tests/test_numpy_func2.py ...................................... [ 51%]
...........................................................ss........... [ 53%]
........................................................................ [ 55%]
........................................................................ [ 57%]
.........................                                                [ 58%]
pythran/tests/test_numpy_func3.py ...................................... [ 59%]
...........................s............................................ [ 61%]
.........................................................                [ 62%]
pythran/tests/test_numpy_linalg.py ..........                            [ 63%]
pythran/tests/test_numpy_random.py ..................................... [ 64%]
........................................................................ [ 66%]
............                                                             [ 66%]
pythran/tests/test_numpy_ufunc_binary.py ............................... [ 67%]
........................................................................ [ 69%]
........................................................................ [ 71%]
......................................................                   [ 72%]
pythran/tests/test_numpy_ufunc_unary.py ................................ [ 73%]
........................................................................ [ 75%]
........................................................................ [ 77%]
........................................................................ [ 79%]
...............................                                          [ 80%]
pythran/tests/test_operator.py ......................................... [ 81%]
.............................................................            [ 83%]
pythran/tests/test_optimizations.py .................................... [ 84%]
..................................s.........                             [ 85%]
pythran/tests/test_os.py .....                                           [ 85%]
pythran/tests/test_random.py ..............                              [ 86%]
pythran/tests/test_rec.py ..                                             [ 86%]
pythran/tests/test_rosetta.py ............ss........s.....s.s.........s. [ 87%]
..s......s.............................                                  [ 88%]
pythran/tests/test_scipy.py ...........................                  [ 89%]
pythran/tests/test_set.py .............................................. [ 90%]
........................                                                 [ 91%]
pythran/tests/test_slice.py .............................                [ 92%]
pythran/tests/test_spec_parser.py ................                       [ 92%]
pythran/tests/test_str.py .............................................. [ 93%]
.......                                                                  [ 94%]
pythran/tests/test_submodules.py .....                                   [ 94%]
pythran/tests/test_time.py .                                             [ 94%]
pythran/tests/test_typing.py ..............ss..........................s [ 95%]
.s...............ss................                                      [ 96%]
pythran/tests/test_user_defined_import.py ............                   [ 96%]
pythran/tests/test_version.py ..                                         [ 96%]
pythran/tests/test_xdoc.py ............................................. [ 98%]
....................................................................     [100%]

=================================== FAILURES ===================================
_________________________ TestEuler.test_euler11_run0 __________________________

self = <pythran.tests.TestFromDir.TestFunctor object at 0x7f92fcfbe550>

    def __call__(self):
        if "unittest.skip" in self.module_code:
            return self.test_env.skipTest("Marked as skippable")

        if "unittest.python3.skip" in self.module_code:
            return self.test_env.skipTest("Marked as skippable")

        # resolve import locally to where the tests are located
        sys.path.insert(0, self.test_env.path)

>       self.test_env.run_test_case(self.module_code, self.module_name,
                                    self.runas, module_dir=self.module_dir,
                                    **self.specs)

pythran/tests/__init__.py:460:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pythran/tests/__init__.py:253: in run_test_case
    cxx_compiled = compile_pythrancode(
pythran/toolchain.py:426: in compile_pythrancode
    str(module),
pythran/cxxgen.py:693: in __str__
    return "\n".join(Module(body).generate())
pythran/cxxgen.py:409: in generate
    yield from c.generate()
pythran/cxxgen.py:421: in generate
    for item_line in item.generate():
pythran/cxxgen.py:421: in generate
    for item_line in item.generate():
pythran/cxxgen.py:388: in generate
    yield from self.body.generate()
pythran/cxxgen.py:401: in generate
    for item_line in item.generate():
pythran/cxxgen.py:401: in generate
    for item_line in item.generate():
pythran/cxxgen.py:245: in generate
    yield from self.body.generate()
pythran/cxxgen.py:401: in generate
    for item_line in item.generate():
pythran/cxxgen.py:401: in generate
    for item_line in item.generate():
pythran/cxxgen.py:245: in generate
    yield from self.body.generate()
pythran/cxxgen.py:401: in generate
    for item_line in item.generate():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pythran.cxxgen.Statement object at 0x7f92f9f8e2b0>

    def generate(self):
>       yield self.text + ";"
E       TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

pythran/cxxgen.py:325: TypeError
=============================== warnings summary ===============================
pythran/dist.py:24
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/dist.py:24: DeprecationWarning:

    `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
    of the deprecation of `distutils` itself. It will be removed for
    Python >= 3.12. For older Python versions it will remain present.
    It is recommended to use `setuptools < 60.0` for those Python versions.
    For more details, see:
      https://numpy.org/devdocs/reference/distutils_status_migration.html


    from numpy.distutils.extension import Extension

../../../../../usr/lib/python3.9/site-packages/setuptools/sandbox.py:13
  /usr/lib/python3.9/site-packages/setuptools/sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../../../usr/lib/python3.9/site-packages/pkg_resources/__init__.py:2846
  /usr/lib/python3.9/site-packages/pkg_resources/__init__.py:2846: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../../../usr/lib/python3.9/site-packages/setuptools/_distutils/msvccompiler.py:66
  /usr/lib/python3.9/site-packages/setuptools/_distutils/msvccompiler.py:66: DeprecationWarning: msvccompiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.
    warnings.warn(

../../../../../usr/lib64/python3.9/site-packages/numpy/distutils/command/build_ext.py:8
  /usr/lib64/python3.9/site-packages/numpy/distutils/command/build_ext.py:8: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
    from distutils.dep_util import newer_group

../../../../../usr/lib64/python3.9/site-packages/numpy/distutils/command/build_clib.py:11
  /usr/lib64/python3.9/site-packages/numpy/distutils/command/build_clib.py:11: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
    from distutils.dep_util import newer_group

../../../../../usr/lib64/python3.9/site-packages/numpy/distutils/command/build_src.py:10
../../../../../usr/lib64/python3.9/site-packages/numpy/distutils/command/build_src.py:10
  /usr/lib64/python3.9/site-packages/numpy/distutils/command/build_src.py:10: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
    from distutils.dep_util import newer_group, newer

pythran/tests/test_cases.py:21
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/tests/test_cases.py:21: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(numpy.__version__) >= '1.20':

../../../../../usr/lib/python3.9/site-packages/setuptools/_distutils/version.py:345
../../../../../usr/lib/python3.9/site-packages/setuptools/_distutils/version.py:345
../../../../../usr/lib/python3.9/site-packages/setuptools/_distutils/version.py:345
  /usr/lib/python3.9/site-packages/setuptools/_distutils/version.py:345: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    other = LooseVersion(other)

pythran/tests/test_numpy_fft.py:132
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/tests/test_numpy_fft.py:132: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    @unittest.skipIf(LooseVersion(numpy.__version__) <'1.20', "introduced in 1.20")

pythran/tests/test_numpy_fft.py:140
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/tests/test_numpy_fft.py:140: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    @unittest.skipIf(LooseVersion(numpy.__version__) <'1.20', "introduced in 1.20")

<string>:1
  <string>:1: RuntimeWarning: invalid value encountered in arccosh

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:59: RuntimeWarning: overflow encountered in scalar multiply

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:60: RuntimeWarning: overflow encountered in scalar multiply

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:63: RuntimeWarning: overflow encountered in scalar multiply

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:15: RuntimeWarning: invalid value encountered in scalar add

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:17: RuntimeWarning: invalid value encountered in scalar subtract

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:19: RuntimeWarning: invalid value encountered in scalar subtract

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:63: RuntimeWarning: invalid value encountered in scalar subtract

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:64: RuntimeWarning: overflow encountered in scalar multiply

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:21: RuntimeWarning: invalid value encountered in scalar subtract

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:23: RuntimeWarning: invalid value encountered in scalar subtract

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:20: RuntimeWarning: invalid value encountered in scalar add

pythran/tests/test_cases.py::TestCases::test_d2q9_nxnyns_run0
  <string>:22: RuntimeWarning: invalid value encountered in scalar add

pythran/tests/test_cases.py::TestCases::test_log_likelihood_run0
  <string>:10: RuntimeWarning: divide by zero encountered in log

pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_fromstring0
pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_fromstring1
  <string>:1: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead

pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_fromstring1
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/optimizations/constant_folding.py:334: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
    return func(*args)

pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_nanmax2
pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_nanmin2
  <string>:1: RuntimeWarning: All-NaN slice encountered

pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_product
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/tests/__init__.py:163: DeprecationWarning: `product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
    ret_val = env[runas[0]](*runas[1])

pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_sometrue0
pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_sometrue1
pythran/tests/test_numpy_func0.py::TestNumpyFunc0::test_sometrue2
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/tests/__init__.py:163: DeprecationWarning: `sometrue` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `any` instead.
    ret_val = env[runas[0]](*runas[1])

pythran/tests/test_numpy_func1.py::TestNumpyFunc1::test_alltrue0
pythran/tests/test_numpy_func1.py::TestNumpyFunc1::test_alltrue1
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/tests/__init__.py:163: DeprecationWarning: `alltrue` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `all` instead.
    ret_val = env[runas[0]](*runas[1])

pythran/tests/test_numpy_func1.py::TestNumpyFunc1::test_sum12_
pythran/tests/test_numpy_func1.py::TestNumpyFunc1::test_sum12_
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/tests/test_numpy_func1.py:54: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -4294967295 to uint32 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    numpy.array([2**32-1, -2**32 +1 , -2**32 + 1], dtype=numpy.uint32), np_sum12_=[NDArray[numpy.uint32,:]])

pythran/tests/test_numpy_func1.py::TestNumpyFunc1::test_sum14_
pythran/tests/test_numpy_func1.py::TestNumpyFunc1::test_sum14_
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/tests/test_numpy_func1.py:63: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of 2147483649 to int32 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    numpy.array([2**31-1, 2**31 +1 , 2**31 + 1], dtype=numpy.int32), np_sum14_=[NDArray[numpy.int32,:]])

pythran/tests/test_numpy_func3.py::TestNumpyFunc3::test_numpy_pow3
  <string>:1: RuntimeWarning: divide by zero encountered in power

pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_bytes1
  <string>:6: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead

pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_integers0
pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_integers0
pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_integers0
  <string>:5: DeprecationWarning: This function is deprecated. Please call randint(1, 9 + 1) instead

pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_integers1
pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_integers1
pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_integers1
pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_integers2
pythran/tests/test_numpy_random.py::TestNumpyRandom::test_numpy_random_integers3
  <string>:5: DeprecationWarning: This function is deprecated. Please call randint(10, 20 + 1) instead

pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_arccosh_scalar_float
  <string>:4: RuntimeWarning: invalid value encountered in arccosh

pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_arctan_complex
pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_arctan_matrix_complex
  <string>:4: RuntimeWarning: divide by zero encountered in arctan

pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_arctanh_float
pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_arctanh_matrix_float
  <string>:4: RuntimeWarning: divide by zero encountered in arctanh

pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_round__complex
pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_round__float
pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_round__matrix_complex
pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_round__matrix_float
pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_round__scalar_complex
pythran/tests/test_numpy_ufunc_unary.py::TestNumpyUFuncUnary::test_numpy_ufunc_unary_numpy_ufunc_unary_numpy_round__scalar_float
  /home/tkloczko/rpmbuild/BUILD/pythran-0.15.0/pythran/tests/__init__.py:163: DeprecationWarning: `round_` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `round` instead.
    ret_val = env[runas[0]](*runas[1])

pythran/tests/test_random.py::TestRandom::test_shuffle2
pythran/tests/test_random.py::TestRandom::test_shuffle3
  <string>:5: DeprecationWarning: The *random* parameter to shuffle() has been deprecated
  since Python 3.9 and will be removed in a subsequent version.

pythran/tests/test_str.py::TestStr::test_str_with_backslash
  <unknown>:1: DeprecationWarning: invalid escape sequence \h

pythran/tests/test_str.py::TestStr::test_str_with_backslash
  <string>:1: DeprecationWarning: invalid escape sequence \h

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] pythran/tests/test_advanced.py:200: lists as zeros parameter are not supported
SKIPPED [1] pythran/tests/test_base.py:200: impossible to handle max(int, float) without conversion
SKIPPED [23] pythran/tests/__init__.py:450: Marked as skippable
SKIPPED [1] pythran/tests/test_conversion.py:207: no dynamic type promotion in pythran :-/
SKIPPED [1] pythran/tests/test_exception.py:113: incompatible with py.test
SKIPPED [1] ../../../../../usr/lib/python3.9/site-packages/_pytest/unittest.py:357: clang-format-3.6 not available
SKIPPED [1] pythran/tests/test_ndarray.py:382: filtering a slice
SKIPPED [1] pythran/tests/test_ndarray.py:388: filtering a slice
SKIPPED [1] pythran/tests/test_ndarray.py:650: Unknown slice combination
SKIPPED [1] pythran/tests/test_ndarray.py:656: Unknown slice combination
SKIPPED [1] pythran/tests/test_ndarray.py:662: Unknown slice combination
SKIPPED [1] pythran/tests/test_numpy_fft.py:62: Mismatch because numpy converts to double before fft (See comment in header file)
SKIPPED [1] pythran/tests/test_numpy_fft.py:299: Mismatch because numpy converts to double before fft (See comment in header file)
SKIPPED [1] pythran/tests/test_numpy_fft.py:364: Fails because of numpy casting to  double (see documentation in headers for a discussion)
SKIPPED [1] pythran/tests/test_numpy_fft.py:371: Fails because of numpy casting to  double (see documentation in headers for a discussion)
SKIPPED [1] pythran/tests/test_numpy_func0.py:821: Require numpy_fexpr for multidim array
SKIPPED [1] pythran/tests/test_numpy_func0.py:825: Require numpy_fexpr for multidim array
SKIPPED [1] pythran/tests/test_numpy_func0.py:829: Require numpy_fexpr with indices
SKIPPED [1] pythran/tests/test_numpy_func0.py:854: bytes/str confusion
SKIPPED [1] pythran/tests/test_numpy_func0.py:858: bytes/str confusion
SKIPPED [1] pythran/tests/test_numpy_func1.py:213: np.alen is deprecated
SKIPPED [1] pythran/tests/test_numpy_func1.py:217: np.alen is deprecated
SKIPPED [1] pythran/tests/test_numpy_func2.py:475: np.asscalar is deprecated
SKIPPED [1] pythran/tests/test_numpy_func2.py:479: np.asscalar is deprecated
SKIPPED [1] pythran/tests/test_numpy_func3.py:292: not implemented yet
SKIPPED [1] pythran/tests/test_optimizations.py:593: Variable defined in a branch in loops are not accepted.
SKIPPED [1] pythran/tests/test_typing.py:601: bad typing: need higher order function handling
SKIPPED [1] pythran/tests/test_typing.py:614: bad typing: need higher order function handling
SKIPPED [1] pythran/tests/test_typing.py:356: bad typing: recursion and specialized list type
SKIPPED [1] pythran/tests/test_typing.py:649: bad typing: need fine grain subscript propagation
SKIPPED [1] pythran/tests/test_typing.py:294: bad typing: need backward propagation
SKIPPED [1] pythran/tests/test_typing.py:307: bad typing: need backward propagation
FAILED pythran/tests/test_euler.py::TestEuler::test_euler11_run0 - TypeError:...
==== 1 failed, 3514 passed, 54 skipped, 68 warnings in 12611.08s (3:30:11) =====
List of installed modules in build env:
Package                       Version
----------------------------- -----------
alabaster                     0.7.16
asttokens                     2.4.1
Babel                         2.14.0
backcall                      0.2.0
beniget                       0.4.1
build                         1.1.1
charset-normalizer            3.3.2
decorator                     5.1.1
docutils                      0.20.1
exceptiongroup                1.1.3
executing                     2.0.1
gast                          0.5.4
guzzle_sphinx_theme           0.7.11
idna                          3.6
imagesize                     1.4.1
importlib_metadata            7.1.0
iniconfig                     2.0.0
installer                     0.7.0
ipython                       8.13.1
jedi                          0.19.1
Jinja2                        3.1.3
libdnf                        0.73.1
MarkupSafe                    2.1.5
matplotlib-inline             0.1.6
numpy                         1.26.5
packaging                     24.0
parso                         0.8.3
pexpect                       4.9.0
pickleshare                   0.7.5
pluggy                        1.4.0
ply                           3.11
prompt_toolkit                3.0.43
ptyprocess                    0.7.0
pure_eval                     0.2.2
Pygments                      2.17.2
pyproject_hooks               1.0.0
pytest                        8.1.1
python-dateutil               2.9.0.post0
requests                      2.31.0
rst.linker                    2.4.0
setuptools                    69.1.1
snowballstemmer               2.2.0
Sphinx                        7.2.6
sphinxcontrib-applehelp       1.0.8
sphinxcontrib-devhelp         1.0.5
sphinxcontrib-htmlhelp        2.0.5
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.7
sphinxcontrib-serializinghtml 1.1.10
stack_data                    0.6.3
tokenize_rt                   5.2.0
tomli                         2.0.1
traitlets                     5.14.2
typing_extensions             4.10.0
urllib3                       1.26.18
wcwidth                       0.2.13
wheel                         0.43.0
zipp                          3.18.1

Please let me know if you need more details or want me to perform some diagnostics.

@serge-sans-paille
Copy link
Owner

Hey, thanks for the bug report. I fail to reproduce locally, even with the same version as you have (see for instance https://godbolt.org/z/74TovGceE).

Let's try to reduce the issue. What happens if you run

pythran pythran/tests/euler/euler11.py

in the same environment? You should hit the same issue.
If so, you could modify original sources with an assert so that we have a more interesting backtrace:

--- a/pythran/cxxgen.py
+++ b/pythran/cxxgen.py
@@ -326,6 +326,7 @@ class LineInfo(object):
 
 class Statement(object):
     def __init__(self, text):
+        assert text is not None
         self.text = text
 
     def generate(self):

rerun and report the backtrace here?

Thanks for packaging pythran o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants