Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #11361

Re: python-scipy: autopkgtest fails (Re: bug#919929)

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Drew Parsons <dparsons@debian.org>
Newsgroups linux.debian.maint.python, linux.debian.devel.release, linux.debian.bugs.dist
Subject Re: python-scipy: autopkgtest fails (Re: bug#919929)
Date Mon, 11 Mar 2019 07:50:02 +0100
Message-ID <xAmV3-4Jm-1@gated-at.bofh.it> (permalink)
References <xyg7o-6lM-3@gated-at.bofh.it> <xyWgh-7Dy-1@gated-at.bofh.it> <xyZ4t-XP-1@gated-at.bofh.it> <xz0ad-1Bh-1@gated-at.bofh.it> <xz0Dg-1LB-5@gated-at.bofh.it> <xzd7r-1sE-1@gated-at.bofh.it> <xzQit-M1-5@gated-at.bofh.it> <xA1nz-7Vg-1@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Mon Mar 11 06:40:03 2019
Old-Return-Path <dparsons@debian.org>
X-Amavis-Spam-Status No, score=-7.68 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, LDO_WHITELIST=-5, MD5_SHA1_SUM=-1, MURPHY_DRUGS_REL8=0.02, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -3.5
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII; format=flowed
Content-Transfer-Encoding 7bit
Organization The Debian Project
Reply-To dparsons@debian.org
Mail-Reply-To dparsons@debian.org
X-Sender dparsons@debian.org
User-Agent Roundcube Webmail/1.3.8
X-Mailing-List <debian-python@lists.debian.org> archive/latest/16822
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/53779be5e21cda7673a199fcace8f24b@debian.org
Approved robomod@news.nic.it
Lines 108
Sender robomod@news.nic.it
X-Original-Cc Andreas Tille <tille@debian.org>, debian-python@lists.debian.org, jtaylor.debian@googlemail.com, debian-release@lists.debian.org, 919929@bugs.debian.org
X-Original-Date Mon, 11 Mar 2019 14:39:48 +0800
X-Original-Message-ID <53779be5e21cda7673a199fcace8f24b@debian.org>
X-Original-References <3e555bf95e5228d291a7fe94beaa4ada@emerall.com> <20190307080302.zc6q5ljr6vyd2yqf@an3as.eu> <61c0d630-7a1a-aa31-d6c6-062b3747b735@debian.org> <eab9ee92f6de31ed552316ae31440390@debian.org> <387d0b8f-0cf2-2edf-62fe-8ee63c86dcd3@debian.org> <b1ef96aac29d69edfc433ba509353b75@debian.org> <72d2e7a8-3661-6ba1-cd65-df81a3bf07d6@debian.org> <63b8454b2bc9c694793eba48f8cb1138@debian.org>
Xref csiph.com linux.debian.maint.python:11361 linux.debian.devel.release:85134 linux.debian.bugs.dist:949396

Cross-posted to 3 groups.

Show key headers only | View raw


On 2019-03-10 15:46, Drew Parsons wrote:
> On 2019-03-10 03:51, Paul Gevers wrote:
>> Hi Drew,
>> 
> 
>>> To remove the deprecation warnings we'd need to deal with them at the
>>> source. Upstream has patches
>>> https://github.com/scipy/scipy/commit/614847c5fc8d5f8a618980df3c1b93540428ae46
>>> 
>>> https://github.com/scipy/scipy/commit/e0cfa29e2fbe86f994924c0c7514ff5bbfffd514
>>> 
>>> and for completeness
>>> https://github.com/scipy/scipy/commit/87e48c3c54d7a85bc6628c88c1de98ac0469b6fa
...
>>> Can you authorise an unblock to apply these 3 upstream patches to
>>> python-scipy 1.1.0 ?
>>> That won't necessarily fix the debci failure, but it will make it a 
>>> lot
>>> easier to see what's actually failing.
>> 
>> I am slightly unhappy with the second patch, as it seems to be doing
>> more than you describe above in a few places. This may be correct but
>> that is difficult to quickly judge.

I've adapted the 3 patches and pushed to salsa,
    matrix_API_614847c5.patch
    matrix_API_more_e0cfa29e2.patch
    matrix_API_filter_check_87e48c3c5.patch
https://salsa.debian.org/python-team/modules/python-scipy/tree/master/debian/patches

The other behaviour that you saw in the second patch I think might be 
replacement of "D*diag(v)" with "D@diag(v)". That's matrix 
multiplication, so still relevent to the matrix API patch. @ is not 
available in python2 so I changed it to numpy.matmul, which does the 
same thing.

The numpy.sparse tests pass with this patch, and most of the matrix 
PendingDeprecationWarnings are gone (the upstream patch missed 
integrate/tests/test_ivp.py, but the remaining warnings are few enough 
to not need to worry about).


>> Also, what is the general documented way that these wrappers can be
>> used? scipy is sort of taking over the maintenanceship of these
>> functions in this way if we're not careful.
> 
...
> There is discussion of the distinction between numpy.matrix and
> numpy.ndarray (which is at the heart of the deeprecation warning) at
> https://docs.scipy.org/doc/scipy/reference/tutorial/linalg.html#numpy-matrix-vs-2d-numpy-ndarray
> 
> The utility class scipy.sparse.sputils itself is apparently
> undocumented, by which I infer it's intended for internal use only,
> not a public API. I guess it's reasonable for a package to be testing
> it's own internal functions.  Strange thing is,
> scipy.sparse.sputils.matrix is not actually defined in
> scipy/sparse/sputils.py. Must be inherited or defined in some deep
> pythonfu that I haven't mastered yet.


Actually scipy.sparse.sputils.matrix was defined in these patches.  It 
is a bit odd that upstream is wrapping numpy.matrix just to avoid 
deprecation warnings, rather than following their own advice and using 
numpy.ndarray instead.


With these patches, the sparse matrix tests pass. There remain three 
errors unrelated to sparse matrix:
   spatial/tests/test__plotutils.py::TestPlotting::test_delaunay FAILED   
   [ 76%]
   spatial/tests/test__plotutils.py::TestPlotting::test_voronoi FAILED    
   [ 76%]
   spatial/tests/test__plotutils.py::TestPlotting::test_convex_hull 
FAILED  [ 76%]
   __________________________ TestPlotting.test_delaunay 
__________________________

   self = <scipy.spatial.tests.test__plotutils.TestPlotting object at 
0x7f0f31156eb8>

       def test_delaunay(self):
           # Smoke test
           fig = plt.figure()
           obj = Delaunay(self.points)
           s_before = obj.simplices.copy()
   >       with suppress_warnings as sup:
   E       AttributeError: __enter__

   fig        = <Figure size 640x480 with 0 Axes>
   obj        = <scipy.spatial.qhull.Delaunay object at 0x7f0f31163400>
   s_before   = array([[3, 1, 0],
          [2, 3, 0]], dtype=int32)
   self       = <scipy.spatial.tests.test__plotutils.TestPlotting object 
at 0x7f0f31156eb8>

   
/usr/lib/python3/dist-packages/scipy/spatial/tests/test__plotutils.py:31: 
AttributeError

(likewise for the other 2)
These AttributeErrors are mentioned at 
https://github.com/scipy/scipy/issues/9491. Upstream doesn't seem too 
concerned about them.

Apart from that, I'm happy to upload the sparse matrix patches once the 
s390x update reaches testing.

Drew

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

python-scipy: autopkgtest fails (Re:bug#919929) Drew Parsons <dparsons@debian.org> - 2019-03-05 12:10 +0100
  Re: python-scipy: autopkgtest fails (Re: bug#919929) Andreas Tille <tille@debian.org> - 2019-03-07 09:10 +0100
    Re: python-scipy: autopkgtest fails (Re: bug#919929) Paul Gevers <elbrus@debian.org> - 2019-03-07 12:10 +0100
      Re: python-scipy: autopkgtest fails (Re: bug#919929) Drew Parsons <dparsons@debian.org> - 2019-03-07 13:20 +0100
        Re: python-scipy: autopkgtest fails (Re: bug#919929) Paul Gevers <elbrus@debian.org> - 2019-03-07 13:50 +0100
          Re: python-scipy: autopkgtest fails (Re: bug#919929) Drew Parsons <dparsons@debian.org> - 2019-03-07 15:00 +0100
            Re: python-scipy: autopkgtest fails (Re: bug#919929) Paul Gevers <elbrus@debian.org> - 2019-03-07 15:10 +0100
              Re: python-scipy: autopkgtest fails (Re: bug#919929) Drew Parsons <dparsons@debian.org> - 2019-03-07 15:30 +0100
          Re: python-scipy: autopkgtest fails (Re: bug#919929) Drew Parsons <dparsons@debian.org> - 2019-03-08 03:10 +0100
            Re: python-scipy: autopkgtest fails (Re: bug#919929) Paul Gevers <elbrus@debian.org> - 2019-03-09 21:00 +0100
              Re: python-scipy: autopkgtest fails (Re: bug#919929) Drew Parsons <dparsons@debian.org> - 2019-03-10 08:50 +0100
                Re: python-scipy: autopkgtest fails (Re: bug#919929) Drew Parsons <dparsons@debian.org> - 2019-03-11 07:50 +0100
                unblock request: python-scipy/1.1.0-4 skimage/0.14.2-2: autopkgtest  passes (Re: bug#919929) Drew Parsons <dparsons@debian.org> - 2019-03-16 13:50 +0100
                Re: unblock request: python-scipy/1.1.0-4 skimage/0.14.2-2:  autopkgtest passes (Re: bug#919929) Paul Gevers <elbrus@debian.org> - 2019-03-16 15:10 +0100
                Re: unblock request: python-scipy/1.1.0-4 skimage/0.14.2-2:  autopkgtest passes (Re: bug#919929) Drew Parsons <dparsons@debian.org> - 2019-03-16 17:00 +0100

csiph-web