Bug#959138: nipy: resolve nipy autopkgtest failure due to numpy testing decorators

2020-05-29 Thread Andreas Tille
On Fri, May 29, 2020 at 12:50:07AM -0400, Sandro Tosi wrote:
> On Wed, 20 May 2020 15:22:37 -0500 Matthieu Clemenceau
>  wrote:
> > Source: nipy
> > Followup-For: Bug #959138
> > User: ubuntu-de...@lists.ubuntu.com
> > Usertags: origin-ubuntu groovy ubuntu-patch
> >
> > Dear Maintainer,
> >
> > While working on numpy proposed-migration for groovy, I realize nipy
> > autopkgtest was failing. It appears that numpy changed the pass to the
> > module decorators from numpy.testing.decorators to
> > numpy.testing._private.decorators.
> 
> OMG NO! how can you think that importing from a _private submodule is
> the right approach?!
> 
> There's a PR open upstream since more than a month on how to
> *properly* address this in nipy:
> https://github.com/nipy/nipy/pull/458/files
> 
> Can someone from the Med team apply that PR to the packaging and upload?

I've imported the PR as quilt patch but it does not apply cleanly and
does not solve the issue completely.  There are several build time
issues.  I have no time to track this down further in the next couple of
days.  Yaroslav, can you have a look?

Kind regards

Andreas.

-- 
http://fam-tille.de



Bug#959138: nipy: resolve nipy autopkgtest failure due to numpy testing decorators

2020-05-28 Thread Sandro Tosi
On Wed, 20 May 2020 15:22:37 -0500 Matthieu Clemenceau
 wrote:
> Source: nipy
> Followup-For: Bug #959138
> User: ubuntu-de...@lists.ubuntu.com
> Usertags: origin-ubuntu groovy ubuntu-patch
>
> Dear Maintainer,
>
> While working on numpy proposed-migration for groovy, I realize nipy
> autopkgtest was failing. It appears that numpy changed the pass to the
> module decorators from numpy.testing.decorators to
> numpy.testing._private.decorators.

OMG NO! how can you think that importing from a _private submodule is
the right approach?!

There's a PR open upstream since more than a month on how to
*properly* address this in nipy:
https://github.com/nipy/nipy/pull/458/files

Can someone from the Med team apply that PR to the packaging and upload?

Thanks,
-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
Twitter: https://twitter.com/sandrotosi



Bug#959138: nipy: resolve nipy autopkgtest failure due to numpy testing decorators

2020-05-20 Thread Matthieu Clemenceau
Source: nipy
Followup-For: Bug #959138
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu groovy ubuntu-patch

Dear Maintainer,

While working on numpy proposed-migration for groovy, I realize nipy
autopkgtest was failing. It appears that numpy changed the pass to the
module decorators from numpy.testing.decorators to
numpy.testing._private.decorators.

In Ubuntu, the attached patch was applied allowing nipy to pass autopkg
test and migrate from groovy-proposed to groovy.

The Changelog below was added to nipy-0.4.2-3ubuntu1
  * Resolved test failure due to numpy 1:1.18.4-1. (Closes: #959138)


Thanks for considering the patch.


-- System Information:
Debian Release: bullseye/sid
  APT prefers focal-updates
  APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500, 'focal'), 
(100, 'focal-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-29-generic (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Description: Fix Autopkgtest failure caused by the new numpy 1:1.18.4-1
Author: Matthieu Clemenceau 
Origin: vendor
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959138#5
Forwarded: yes
Last-Update: 2020-05-15
--- a/nipy/algorithms/clustering/tests/test_vmm.py
+++ b/nipy/algorithms/clustering/tests/test_vmm.py
@@ -13,7 +13,7 @@
 select_vmm_cv)
 
 from nose.tools import assert_true, assert_equal
-from numpy.testing import decorators
+from numpy.testing._private import decorators
 
 from nibabel.optpkg import optional_package
 
--- a/nipy/algorithms/diagnostics/tests/test_screen.py
+++ b/nipy/algorithms/diagnostics/tests/test_screen.py
@@ -23,7 +23,8 @@
 from nose.tools import (assert_true, assert_false, assert_equal, assert_raises)
 
 from numpy.testing import (assert_array_equal, assert_array_almost_equal,
-   assert_almost_equal, decorators)
+   assert_almost_equal)
+from numpy.testing._private import decorators
 
 from nipy.testing import funcfile
 from nipy.testing.decorators import needs_mpl_agg
--- a/nipy/fixes/numpy/testing/nosetester.py
+++ b/nipy/fixes/numpy/testing/nosetester.py
@@ -21,7 +21,7 @@
 
 Examples
 
->>> from numpy.testing import nosetester
+>>> from numpy.testing._private import nosetester
 >>> nosetester.get_package_name('nonsense')
 'numpy'
 
--- a/nipy/testing/decorators.py
+++ b/nipy/testing/decorators.py
@@ -8,7 +8,7 @@
 from __future__ import print_function
 from __future__ import absolute_import
 
-from numpy.testing.decorators import *
+from numpy.testing._private.decorators import *
 
 from nipy.utils import templates, example_data, DataError
 
--- a/nipy/tests/test_scripts.py
+++ b/nipy/tests/test_scripts.py
@@ -19,7 +19,9 @@
 from nose.tools import assert_true, assert_false, assert_equal, assert_raises
 
 from ..testing import funcfile
-from numpy.testing import decorators, assert_almost_equal
+
+from numpy.testing._private import decorators
+from numpy.testing import assert_almost_equal
 
 from nipy.testing.decorators import make_label_dec