Bug#889539: pandas FTBFS: test failures

2018-02-22 Thread Lumin
Yaroslav has just uploaded pandas 0.22.0, let's see if this problem
still exists.

On 7 February 2018 at 14:57, Andreas Tille  wrote:
> On Tue, Feb 06, 2018 at 03:51:27PM +, Lumin wrote:
>> Apart from that, the pandas packaging needs a patch [2] to reduce
>> autopkgtest failures.
>
> As always:  Please push your patches. :-)
> You and I are in the same position: We are team members of the maintainer
> team.  I even have the strong impression, that you are the more competent
> team member than me in terms of pandas.  So please do not be shy. ;-)
>
> Thanks a lot and feel to keep on pushing promising patches
>
> Andreas.
>
>> [2]
>> diff --git a/debian/tests/control b/debian/tests/control
>> index 38521c8..ab54101 100644
>> --- a/debian/tests/control
>> +++ b/debian/tests/control
>> @@ -15,6 +15,7 @@ Depends: python-all,
>>   python-xlwt,
>>   python-bs4,
>>   python-html5lib,
>> + python-pytest,
>>   xauth,
>>   xvfb
>>
>> @@ -29,5 +30,6 @@ Depends: python3-all,
>>   python3-tk,
>>   python3-tz,
>>   python3-bs4,
>> + python3-pytest,
>>   xauth,
>>   xvfb
>
> --
> http://fam-tille.de



-- 
Best,

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#889539: pandas FTBFS: test failures

2018-02-07 Thread Andreas Tille
On Tue, Feb 06, 2018 at 03:51:27PM +, Lumin wrote:
> Apart from that, the pandas packaging needs a patch [2] to reduce
> autopkgtest failures.

As always:  Please push your patches. :-)
You and I are in the same position: We are team members of the maintainer
team.  I even have the strong impression, that you are the more competent
team member than me in terms of pandas.  So please do not be shy. ;-)

Thanks a lot and feel to keep on pushing promising patches

Andreas. 
 
> [2]
> diff --git a/debian/tests/control b/debian/tests/control
> index 38521c8..ab54101 100644
> --- a/debian/tests/control
> +++ b/debian/tests/control
> @@ -15,6 +15,7 @@ Depends: python-all,
>   python-xlwt,
>   python-bs4,
>   python-html5lib,
> + python-pytest,
>   xauth,
>   xvfb
> 
> @@ -29,5 +30,6 @@ Depends: python3-all,
>   python3-tk,
>   python3-tz,
>   python3-bs4,
> + python3-pytest,
>   xauth,
>   xvfb

-- 
http://fam-tille.de

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#889539: pandas FTBFS: test failures

2018-02-06 Thread Lumin
Hi Andreas,

On 6 February 2018 at 11:10, Andreas Tille  wrote:

> you did a really good job on latest pandas issues.  Do you think you can
> have a look at this problem as well?

I found no related upsteam issue about the failed tests. However there are
some links that might be useful:

https://stackoverflow.com/questions/40659212/futurewarning-elementwise-comparison-failed-returning-scalar-but-in-the-futur
https://stackoverflow.com/questions/15777951/how-to-suppress-pandas-future-warning

I noticed these lines [1] in the test log. The failures seem to be
numpy issues again
according to the stackoverflow answers.

Apart from that, the pandas packaging needs a patch [2] to reduce
autopkgtest failures.


> BTW, to upgrade pandas to the latest upstream version python-moto is
> needed.  I prepared the packaging (#777089) and may be there is only a
> minor issue to finalise this (see [1]).  It might be a sensible strategy
> To upgrade to latest pandas upstream to not spent to much time on the
> old code - however, I have no idea about compatibility issues of all of
> its rdepends.

I checked and tried to build that package. Feedbacks were sent in
another mail. I think the 0.20.3-12 upload is not necessary as long as
we manage to build the new pandas before the removal, because
there is no obvious bug in pandas itself -- the patch for -12 will be
workarounds to those external problems.


[1] 
debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/dtypes/test_missing.py::test_array_equivalent_compat
  /usr/lib/python2.7/dist-packages/numpy/core/numeric.py:2604:
FutureWarning: elementwise == comparison failed and returning scalar
instead; this will raise an error or perform elementwise comparison in
the future.
return bool(asarray(a1 == a2).all())

debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/frame/test_analytics.py::TestDataFrameAnalytics::()::test_corr_int_and_boolean
  /usr/lib/python2.7/dist-packages/scipy/stats/stats.py:3577:
RuntimeWarning: invalid value encountered in double_scalars
size * (size - 1) * (size - 2))

debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_boxplot_method.py::TestDataFramePlots::()::test_boxplot_legacy
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57:
FutureWarning: reshape is deprecated and will raise in a subsequent
release. Please use .values.reshape(...) instead
return getattr(obj, method)(*args, **kwds)
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57:
FutureWarning: reshape is deprecated and will raise in a subsequent
release. Please use .values.reshape(...) instead
return getattr(obj, method)(*args, **kwds)
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57:
FutureWarning: reshape is deprecated and will raise in a subsequent
release. Please use .values.reshape(...) instead
return getattr(obj, method)(*args, **kwds)
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57:
FutureWarning: reshape is deprecated and will raise in a subsequent
release. Please use .values.reshape(...) instead
return getattr(obj, method)(*args, **kwds)
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57:
FutureWarning: reshape is deprecated and will raise in a subsequent
release. Please use .values.reshape(...) instead
return getattr(obj, method)(*args, **kwds)
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57:
FutureWarning: reshape is deprecated and will raise in a subsequent
release. Please use .values.reshape(...) instead
return getattr(obj, method)(*args, **kwds)
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57:
FutureWarning: reshape is deprecated and will raise in a subsequent
release. Please use .values.reshape(...) instead
return getattr(obj, method)(*args, **kwds)
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57:
FutureWarning: reshape is deprecated and will raise in a subsequent
release. Please use .values.reshape(...) instead
return getattr(obj, method)(*args, **kwds)

debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_boxplot_method.py::TestDataFramePlots::()::test_boxplot_axis_limits
  /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57:
FutureWarning: reshape is deprecated and will raise in a subsequent
release. Please use .values.reshape(...) instead
return getattr(obj, method)(*args, **kwds)

debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_datetimelike.py::TestTSPlot::()::test_irreg_hf
  /usr/lib/python2.7/dist-packages/matplotlib/cbook/deprecation.py:106:
MatplotlibDeprecationWarning: Adding an axes using the same arguments
as a previous axes currently reuses the earlier instance.  In a future
version, a new instance will always be created and returned.
Meanwhile, this warning can be suppressed, and the future behavior
ensured, by passing a unique label to each axes instance.
warnings.warn(message, mplDeprecation, stacklevel=1)
  

Bug#889539: pandas FTBFS: test failures

2018-02-06 Thread Andreas Tille
Hi Lumin,

you did a really good job on latest pandas issues.  Do you think you can
have a look at this problem as well?

BTW, to upgrade pandas to the latest upstream version python-moto is
needed.  I prepared the packaging (#777089) and may be there is only a
minor issue to finalise this (see [1]).  It might be a sensible strategy
To upgrade to latest pandas upstream to not spent to much time on the
old code - however, I have no idea about compatibility issues of all of
its rdepends.

Kind regards

Andreas.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777089#129

-- 
http://fam-tille.de

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#889539: pandas FTBFS: test failures

2018-02-04 Thread Adrian Bunk
Source: pandas
Version: 0.20.3-11
Severity: serious

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/pandas.html

...
=== FAILURES ===
 TestDataFramePlots.test_boxplot_legacy 

self = 

@slow
def test_boxplot_legacy(self):
df = DataFrame(randn(6, 4),
   index=list(string.ascii_letters[:6]),
   columns=['one', 'two', 'three', 'four'])
df['indic'] = ['foo', 'bar'] * 3
df['indic2'] = ['foo', 'bar', 'foo'] * 2

_check_plot_works(df.boxplot, return_type='dict')
_check_plot_works(df.boxplot, column=[
  'one', 'two'], return_type='dict')
# _check_plot_works adds an ax so catch warning. see GH #13188
with tm.assert_produces_warning(UserWarning):
_check_plot_works(df.boxplot, column=['one', 'two'],
  by='indic')
_check_plot_works(df.boxplot, column='one', by=['indic', 'indic2'])
with tm.assert_produces_warning(UserWarning):
_check_plot_works(df.boxplot, by='indic')
with tm.assert_produces_warning(UserWarning):
>   _check_plot_works(df.boxplot, by=['indic', 'indic2'])

../debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_boxplot_method.py:57:
 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/contextlib.py:24: in __exit__
self.gen.next()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected_warning = , filter_level = 'always'
clear = None, check_stacklevel = True

@contextmanager
def assert_produces_warning(expected_warning=Warning, filter_level="always",
clear=None, check_stacklevel=True):
"""
Context manager for running code that expects to raise (or not raise)
warnings.  Checks that code raises the expected warning and only the
expected warning. Pass ``False`` or ``None`` to check that it does *not*
raise a warning. Defaults to ``exception.Warning``, baseclass of all
Warnings. (basically a wrapper around ``warnings.catch_warnings``).

>>> import warnings
>>> with assert_produces_warning():
... warnings.warn(UserWarning())
...
>>> with assert_produces_warning(False):
... warnings.warn(RuntimeWarning())
...
Traceback (most recent call last):
...
AssertionError: Caused unexpected warning(s): ['RuntimeWarning'].
>>> with assert_produces_warning(UserWarning):
... warnings.warn(RuntimeWarning())
Traceback (most recent call last):
...
AssertionError: Did not see expected warning of class 'UserWarning'.

..warn:: This is *not* thread-safe.
"""
with warnings.catch_warnings(record=True) as w:

if clear is not None:
# make sure that we are clearning these warnings
# if they have happened before
# to guarantee that we will catch them
if not is_list_like(clear):
clear = [clear]
for m in clear:
try:
m.__warningregistry__.clear()
except:
pass

saw_warning = False
warnings.simplefilter(filter_level)
yield w
extra_warnings = []

for actual_warning in w:
if (expected_warning and issubclass(actual_warning.category,
expected_warning)):
saw_warning = True

if check_stacklevel and issubclass(actual_warning.category,
   (FutureWarning,
DeprecationWarning)):
from inspect import getframeinfo, stack
caller = getframeinfo(stack()[2][0])
msg = ("Warning not set with correct stacklevel. "
   "File where warning is raised: {0} != {1}. "
   "Warning message: {2}".format(
   actual_warning.filename, caller.filename,
   actual_warning.message))
assert actual_warning.filename == caller.filename, msg
else:
extra_warnings.append(actual_warning.category.__name__)
if expected_warning:
assert saw_warning, ("Did not see expected warning of class %r."
 % expected_warning.__name__)
assert not extra_warnings, ("Caused unexpected warning(s): %r."
>