Bug#1067282: symfit: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.12 3.11" returned exit code 13

Lucas Nussbaum lucas at debian.org
Wed Mar 20 20:53:56 GMT 2024


Source: symfit
Version: 0.5.6-2
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20240319 ftbfs-trixie

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> make[1]: Entering directory '/<<PKGBUILDDIR>>'
> dh_auto_test
> I: pybuild base:305: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build; python3.12 -m pytest tests
> ============================= test session starts ==============================
> platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0
> rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build
> configfile: pytest.ini
> collected 123 items
> 
> tests/test_argument.py ....                                              [  3%]
> tests/test_auto_fit.py ......                                            [  8%]
> tests/test_constrained.py .....s............                             [ 22%]
> tests/test_distributions.py ..                                           [ 24%]
> tests/test_finite_difference.py ........                                 [ 30%]
> tests/test_fit_result.py ..........                                      [ 39%]
> tests/test_general.py .........s..............s......                    [ 64%]
> tests/test_global_opt.py ....                                            [ 67%]
> tests/test_minimize.py ......                                            [ 72%]
> tests/test_minimizers.py F......                                         [ 78%]
> tests/test_model.py ............                                         [ 87%]
> tests/test_objectives.py .....                                           [ 91%]
> tests/test_ode.py ........                                               [ 98%]
> tests/test_support.py ..                                                 [100%]
> 
> =================================== FAILURES ===================================
> ____________________________ test_custom_objective _____________________________
> 
> recwarn = WarningsRecorder(record=True)
> 
>     def test_custom_objective(recwarn):
>         """
>         Compare the result of a custom objective with the symbolic result.
>         :return:
>         """
>         # Create test data
>         xdata = np.linspace(0, 100, 25)  # From 0 to 100 in 100 steps
>         a_vec = np.random.normal(15.0, scale=2.0, size=xdata.shape)
>         b_vec = np.random.normal(100, scale=2.0, size=xdata.shape)
>         ydata = a_vec * xdata + b_vec  # Point scattered around the line 5 * x + 105
>     
>         # Normal symbolic fit
>         a = Parameter('a', value=0, min=0.0, max=1000)
>         b = Parameter('b', value=0, min=0.0, max=1000)
>         x = Variable('x')
>         y = Variable('y')
>         model = {y: a * x + b}
>     
>         fit = Fit(model, xdata, ydata, minimizer=BFGS)
>         fit_result = fit.execute()
>     
>         def f(x, a, b):
>             return a * x + b
>     
>         def chi_squared(a, b):
>             return np.sum((ydata - f(xdata, a, b))**2)
>     
>         # Should no longer raise warnings, because internally we practice
>         # what we preach.
>         fit_custom = BFGS(chi_squared, [a, b])
> >       assert len(recwarn) == 0
> E       assert 1 == 0
> E        +  where 1 = len(WarningsRecorder(record=True))
> 
> tests/test_minimizers.py:120: AssertionError
> =============================== warnings summary ===============================
> symfit/core/operators.py:48
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/operators.py:48: SyntaxWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/support.py:296
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/support.py:296: SyntaxWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/printing.py:13
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/printing.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/dist-packages/pkg_resources/__init__.py:2871
>   /usr/lib/python3/dist-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
>   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)
> 
> symfit/core/fit.py:32
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/fit.py:32: SyntaxWarning: invalid escape sequence '\_'
>     """
> 
> symfit/core/minimizers.py:211
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/minimizers.py:211: SyntaxWarning: invalid escape sequence '\*'
>     '''
> 
> symfit/core/minimizers.py:327
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/minimizers.py:327: SyntaxWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/minimizers.py:793
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/minimizers.py:793: SyntaxWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/fit_results.py:29
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/fit_results.py:29: SyntaxWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/objectives.py:389
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/objectives.py:389: SyntaxWarning: invalid escape sequence '\c'
>     """
> 
> tests/test_auto_fit.py: 3 warnings
> tests/test_constrained.py: 14 warnings
> tests/test_finite_difference.py: 1 warning
> tests/test_fit_result.py: 5 warnings
> tests/test_general.py: 16 warnings
> tests/test_minimizers.py: 2 warnings
> tests/test_objectives.py: 1 warning
> tests/test_ode.py: 1 warning
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/fit.py:278: DeprecationWarning: `product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
>     cov_matrix = self._covariance_matrix(best_fit_params,
> 
> tests/test_auto_fit.py: 2 warnings
> tests/test_constrained.py: 13 warnings
> tests/test_finite_difference.py: 2 warnings
> tests/test_fit_result.py: 1 warning
> tests/test_general.py: 12 warnings
> tests/test_global_opt.py: 3 warnings
> tests/test_ode.py: 7 warnings
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build/symfit/core/fit.py:301: DeprecationWarning: `product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
>     cov_matrix = self._covariance_matrix(best_fit_params,
> 
> tests/test_general.py::test_likelihood_fitting_exponential
>   /usr/lib/python3/dist-packages/_pytest/python.py:195: DeprecationWarning: `product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
>     result = testfunction(**testargs)
> 
> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
> =========================== short test summary info ============================
> FAILED tests/test_minimizers.py::test_custom_objective - assert 1 == 0
> ====== 1 failed, 119 passed, 3 skipped, 94 warnings in 102.13s (0:01:42) =======
> E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build; python3.12 -m pytest tests
> I: pybuild base:305: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build; python3.11 -m pytest tests
> ============================= test session starts ==============================
> platform linux -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.0
> rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build
> configfile: pytest.ini
> collected 123 items
> 
> tests/test_argument.py ....                                              [  3%]
> tests/test_auto_fit.py ......                                            [  8%]
> tests/test_constrained.py .....s............                             [ 22%]
> tests/test_distributions.py ..                                           [ 24%]
> tests/test_finite_difference.py ........                                 [ 30%]
> tests/test_fit_result.py ..........                                      [ 39%]
> tests/test_general.py .........s..............s......                    [ 64%]
> tests/test_global_opt.py ....                                            [ 67%]
> tests/test_minimize.py ......                                            [ 72%]
> tests/test_minimizers.py F......                                         [ 78%]
> tests/test_model.py ............                                         [ 87%]
> tests/test_objectives.py .....                                           [ 91%]
> tests/test_ode.py ........                                               [ 98%]
> tests/test_support.py ..                                                 [100%]
> 
> =================================== FAILURES ===================================
> ____________________________ test_custom_objective _____________________________
> 
> recwarn = WarningsRecorder(record=True)
> 
>     def test_custom_objective(recwarn):
>         """
>         Compare the result of a custom objective with the symbolic result.
>         :return:
>         """
>         # Create test data
>         xdata = np.linspace(0, 100, 25)  # From 0 to 100 in 100 steps
>         a_vec = np.random.normal(15.0, scale=2.0, size=xdata.shape)
>         b_vec = np.random.normal(100, scale=2.0, size=xdata.shape)
>         ydata = a_vec * xdata + b_vec  # Point scattered around the line 5 * x + 105
>     
>         # Normal symbolic fit
>         a = Parameter('a', value=0, min=0.0, max=1000)
>         b = Parameter('b', value=0, min=0.0, max=1000)
>         x = Variable('x')
>         y = Variable('y')
>         model = {y: a * x + b}
>     
>         fit = Fit(model, xdata, ydata, minimizer=BFGS)
>         fit_result = fit.execute()
>     
>         def f(x, a, b):
>             return a * x + b
>     
>         def chi_squared(a, b):
>             return np.sum((ydata - f(xdata, a, b))**2)
>     
>         # Should no longer raise warnings, because internally we practice
>         # what we preach.
>         fit_custom = BFGS(chi_squared, [a, b])
> >       assert len(recwarn) == 0
> E       assert 1 == 0
> E        +  where 1 = len(WarningsRecorder(record=True))
> 
> tests/test_minimizers.py:120: AssertionError
> =============================== warnings summary ===============================
> symfit/core/operators.py:48
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/operators.py:48: DeprecationWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/support.py:296
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/support.py:296: DeprecationWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/printing.py:13
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/printing.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/dist-packages/pkg_resources/__init__.py:2871
>   /usr/lib/python3/dist-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
>   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)
> 
> symfit/core/fit.py:32
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/fit.py:32: DeprecationWarning: invalid escape sequence '\_'
>     """
> 
> symfit/core/minimizers.py:211
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/minimizers.py:211: DeprecationWarning: invalid escape sequence '\*'
>     '''
> 
> symfit/core/minimizers.py:327
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/minimizers.py:327: DeprecationWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/minimizers.py:793
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/minimizers.py:793: DeprecationWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/fit_results.py:29
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/fit_results.py:29: DeprecationWarning: invalid escape sequence '\*'
>     """
> 
> symfit/core/objectives.py:389
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/objectives.py:389: DeprecationWarning: invalid escape sequence '\c'
>     """
> 
> tests/test_auto_fit.py: 5 warnings
> tests/test_constrained.py: 27 warnings
> tests/test_finite_difference.py: 3 warnings
> tests/test_fit_result.py: 6 warnings
> tests/test_general.py: 28 warnings
> tests/test_global_opt.py: 3 warnings
> tests/test_minimizers.py: 2 warnings
> tests/test_objectives.py: 1 warning
> tests/test_ode.py: 8 warnings
>   /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/symfit/core/fit.py:256: DeprecationWarning: `product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
>     raw_dof = np.sum([np.product(shape) for shape in self.data_shapes[1]])
> 
> tests/test_general.py::test_likelihood_fitting_exponential
>   /usr/lib/python3/dist-packages/_pytest/python.py:195: DeprecationWarning: `product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead.
>     result = testfunction(**testargs)
> 
> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
> =========================== short test summary info ============================
> FAILED tests/test_minimizers.py::test_custom_objective - assert 1 == 0
> ====== 1 failed, 119 passed, 3 skipped, 94 warnings in 102.07s (0:01:42) =======
> E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build; python3.11 -m pytest tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.12 3.11" returned exit code 13


The full build log is available from:
http://qa-logs.debian.net/2024/03/19/symfit_0.5.6-2_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240319;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240319&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.



More information about the debian-science-maintainers mailing list