Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-statsmodels for openSUSE:Factory checked in at 2021-09-27 20:08:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-statsmodels (Old) and /work/SRC/openSUSE:Factory/.python-statsmodels.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-statsmodels" Mon Sep 27 20:08:44 2021 rev:10 rq:920821 version:0.12.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-statsmodels/python-statsmodels.changes 2021-02-20 22:12:19.451041237 +0100 +++ /work/SRC/openSUSE:Factory/.python-statsmodels.new.1899/python-statsmodels.changes 2021-09-27 20:08:47.110453981 +0200 @@ -1,0 +2,14 @@ +Tue Sep 21 13:00:56 UTC 2021 - Ben Greiner <c...@bnavigator.de> + +- Fix 32-bit test failures + * Add statsmodels-pr7737-32bit-iloc-dtype.patch + * gh#statsmodels/statsmodels#7736 + +------------------------------------------------------------------- +Mon Sep 20 16:32:48 UTC 2021 - Ben Greiner <c...@bnavigator.de> + +- Fix rpmlint: executable bits and script interpreter lines +- Add statsmodels-pr7373-future-sp-pd-mpl.patch for test errors due + to updated dependencies. + +------------------------------------------------------------------- New: ---- statsmodels-pr7373-future-sp-pd-mpl.patch statsmodels-pr7737-32bit-iloc-dtype.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-statsmodels.spec ++++++ --- /var/tmp/diff_new_pack.fqW4zV/_old 2021-09-27 20:08:48.698455730 +0200 +++ /var/tmp/diff_new_pack.fqW4zV/_new 2021-09-27 20:08:48.698455730 +0200 @@ -1,5 +1,5 @@ # -# spec file for package python-statsmodels +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -34,6 +34,10 @@ License: BSD-3-Clause URL: https://github.com/statsmodels/statsmodels Source: https://files.pythonhosted.org/packages/source/s/statsmodels/statsmodels-%{version}.tar.gz +# PATCH-FIX-UPSTREAM statsmodels-pr7373-future-sp-pd-mpl.patch -- gh#statsmodels/statsmodels#7373 +Patch1: https://github.com/statsmodels/statsmodels/pull/7373.patch#/statsmodels-pr7373-future-sp-pd-mpl.patch +# PATCH-FiX-UPSTREAM statsmodels-pr7737-32bit-iloc-dtype.patch gh#statsmodels/statsmodels#7737 +Patch2: https://github.com/statsmodels/statsmodels/pull/7737.patch#/statsmodels-pr7737-32bit-iloc-dtype.patch BuildRequires: %{python_module Cython >= 0.29} BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel >= 1.15} @@ -49,7 +53,8 @@ Recommends: python-matplotlib >= 2.2 %if %{with test} BuildRequires: %{python_module matplotlib >= 2.2} -BuildRequires: %{python_module pandas >= 0.21} +# https://github.com/pandas-dev/pandas/issues/42626 +BuildRequires: %{python_module pandas >= 0.23 without (%python-pandas >= 1.3 with %python-pandas < 1.3.2)} BuildRequires: %{python_module patsy >= 0.5.1} BuildRequires: %{python_module statsmodels >= %{version}} %endif @@ -69,26 +74,16 @@ and data analysis in Python. %prep -%setup -q -n statsmodels-%{version} +%autosetup -p1 -n statsmodels-%{version} rm -rf statsmodels/.pytest_cache -find . -type f -name "*.py" -exec sed -i 's/\r$//' {} \; -find statsmodels -type f -name "*.py" -exec sed -i "/#! \/usr\/bin\/env python/d" {} \; -find statsmodels -type f -name "*.py" -exec sed -i "/#!\/usr\/bin\/env python/d" {} \; -find statsmodels -type f -name "*.py" -exec sed -i "/#! \/usr\/bin\/env python3/d" {} \; -find statsmodels -type f -name "*.py" -exec sed -i "/#!\/usr\/bin\/env python3/d" {} \; +find . -type f -name "*.py" -exec sed -i -e '1{/env python/ d}' -e 's/\r$//' {} \; +find . -type f -exec chmod a-x {} \; find . -type f -name "*.ipynb" -exec sed -i 's/\r$//' {} \; +find . -type f -name "*.csv" -exec sed -i 's/\r$//' {} \; sed -i 's/\r$//' COPYRIGHTS.txt sed -i 's/\r$//' LICENSE.txt sed -i 's/\r$//' README.rst sed -i 's/\r$//' README_l1.txt -sed -i 's/\r$//' statsmodels/tsa/statespace/tests/results/results_wpi1_ar3_stata.csv -sed -i 's/\r$//' statsmodels/tsa/regime_switching/tests/results/mar_filardo.csv -sed -i 's/\r$//' statsmodels/tsa/statespace/tests/results/results_wpi1_ar3_stata.csv -sed -i 's/\r$//' statsmodels/tsa/regime_switching/tests/results/mar_filardo.csv -chmod a-x COPYRIGHTS.txt -chmod a-x LICENSE.txt -chmod a-x README.rst -chmod a-x README_l1.txt %build %if !%{with test} @@ -103,7 +98,6 @@ # Remove unwanted setup files %python_expand find %{buildroot}%{$python_sitearch} -name 'setup.py*' -exec rm {} \; -%python_expand find %{buildroot}%{$python_sitearch} -type f -exec chmod a-x {} \; rm -f %{buildroot}%{_prefix}/LICENSE.txt rm -f %{buildroot}%{_prefix}/setup.cfg %endif @@ -113,6 +107,7 @@ # The tests expect an in-place built source tree. Work around conftest import conflicts # by directly discovering tests in installed sitearch. testdir=/tmp/%{name}-testdir +rm -rf $testdir mkdir $testdir cp setup.cfg $testdir pushd $testdir @@ -128,7 +123,7 @@ %doc examples/ %license COPYRIGHTS.txt LICENSE.txt %{python_sitearch}/statsmodels/ -%{python_sitearch}/statsmodels-%{version}-py*.egg-info +%{python_sitearch}/statsmodels-%{version}*-info %endif %changelog ++++++ statsmodels-pr7373-future-sp-pd-mpl.patch ++++++ >From 4f32f3990fbba0ee440af47e23a9354fdb7a0285 Mon Sep 17 00:00:00 2001 From: Kevin Sheppard <kevin.shepp...@gmail.com> Date: Fri, 12 Mar 2021 10:52:38 +0000 Subject: [PATCH] MAINT: Fix issues arising from future changes Fix issues due to changes in SciPy and pandas --- statsmodels/regression/tests/test_rolling.py | 6 ++++-- statsmodels/stats/descriptivestats.py | 8 +++++++- statsmodels/stats/stattools.py | 4 +++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/statsmodels/regression/tests/test_rolling.py b/statsmodels/regression/tests/test_rolling.py index 050de605f0e..f02e076d60a 100644 --- a/statsmodels/regression/tests/test_rolling.py +++ b/statsmodels/regression/tests/test_rolling.py @@ -1,5 +1,6 @@ from io import BytesIO from itertools import product +import warnings import numpy as np import pandas as pd @@ -261,8 +262,9 @@ def test_plot(): res.plot_recursive_coefficient(variables="x4") fig = plt.Figure() - with pytest.warns(Warning): - # Just silence the warning + # Just silence the warning + with warnings.catch_warnings(): + warnings.simplefilter("ignore") out = res.plot_recursive_coefficient(fig=fig) assert out is fig res.plot_recursive_coefficient(alpha=None, figsize=(30, 7)) diff --git a/statsmodels/stats/descriptivestats.py b/statsmodels/stats/descriptivestats.py index 96d455ca182..d5ad2f2a545 100644 --- a/statsmodels/stats/descriptivestats.py +++ b/statsmodels/stats/descriptivestats.py @@ -446,8 +446,14 @@ def _mode(ser): else: iqr = mean + def _safe_jarque_bera(c): + a = np.asarray(c) + if a.shape[0] < 2: + return (np.nan,) * 4 + return jarque_bera(a) + jb = df.apply( - lambda x: list(jarque_bera(x.dropna())), result_type="expand" + lambda x: list(_safe_jarque_bera(x.dropna())), result_type="expand" ).T nan_mean = mean.copy() nan_mean.loc[nan_mean == 0] = np.nan diff --git a/statsmodels/stats/stattools.py b/statsmodels/stats/stattools.py index d349c472da0..2ee1a6e0b49 100644 --- a/statsmodels/stats/stattools.py +++ b/statsmodels/stats/stattools.py @@ -118,7 +118,9 @@ def jarque_bera(resids, axis=0): where n is the number of data points, S is the sample skewness, and K is the sample kurtosis of the data. """ - resids = np.asarray(resids) + resids = np.atleast_1d(np.asarray(resids, dtype=float)) + if resids.size < 2: + raise ValueError("resids must contain at least 2 elements") # Calculate residual skewness and kurtosis skew = stats.skew(resids, axis=axis) kurtosis = 3 + stats.kurtosis(resids, axis=axis) ++++++ statsmodels-pr7737-32bit-iloc-dtype.patch ++++++ >From 0fa59b93a21faf88561f34e02cbc6d5fa2569ea9 Mon Sep 17 00:00:00 2001 From: Ben Greiner <c...@bnavigator.de> Date: Tue, 21 Sep 2021 14:48:06 +0200 Subject: [PATCH] TST: Assert correct iloc dtypes --- statsmodels/tsa/statespace/tests/test_news.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/statsmodels/tsa/statespace/tests/test_news.py b/statsmodels/tsa/statespace/tests/test_news.py index 1397236032b..b4a875ebcc9 100644 --- a/statsmodels/tsa/statespace/tests/test_news.py +++ b/statsmodels/tsa/statespace/tests/test_news.py @@ -63,7 +63,8 @@ def check_revision_indices(news, revisions_index): endog_names.index(name) for name in desired_ix['revised variable']] - assert_(news.revisions_iloc.equals(desired_iloc)) + assert_(news.revisions_iloc.equals( + desired_iloc.astype(news.revisions_iloc.dtypes))) assert_(news.revisions_ix.equals(desired_ix)) @@ -91,7 +92,8 @@ def check_update_indices(news, updates_index): endog_names.index(name) for name in desired_ix['updated variable']] - assert_(news.updates_iloc.equals(desired_iloc)) + assert_(news.updates_iloc.equals( + desired_iloc.astype(news.updates_iloc.dtypes))) assert_(news.updates_ix.equals(desired_ix))