Your message dated Tue, 12 May 2020 19:04:09 +0000
with message-id <[email protected]>
and subject line Bug#960380: fixed in python-xarray 0.15.1-3
has caused the Debian Bug report #960380,
regarding python3-xarray: Import fails if python3-sparse is also installed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
960380: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960380
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python3-xarray
Version: 0.15.1-2
Severity: normal

Hi,

if python3-xarray and python3-sparse are both installed, importing xarray fails 
with
an AttributeError, because xarray uses an unqualified "import sparse" trying to
import an internal package. The internal package is shadowed by python3-sparse,
which does not have the same API as xarray's internal package.

The full backtrace in ipython3 is:

22:09:205:~> ipython3
Python 3.8.3rc1 (default, Apr 30 2020, 07:33:30) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.14.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import xarray as xr                                                     
           
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-b027d314c3e9> in <module>
----> 1 import xarray as xr

/usr/lib/python3/dist-packages/xarray/__init__.py in <module>
      1 import pkg_resources
      2 
----> 3 from . import testing, tutorial, ufuncs
      4 from .backends.api import (
      5     load_dataarray,

/usr/lib/python3/dist-packages/xarray/testing.py in <module>
      5 import pandas as pd
      6 
----> 7 from xarray.core import duck_array_ops, formatting
      8 from xarray.core.dataarray import DataArray
      9 from xarray.core.dataset import Dataset

/usr/lib/python3/dist-packages/xarray/core/duck_array_ops.py in <module>
     12 import pandas as pd
     13 
---> 14 from . import dask_array_compat, dask_array_ops, dtypes, npcompat, 
nputils
     15 from .nputils import nanfirst, nanlast
     16 from .pycompat import dask_array_type

/usr/lib/python3/dist-packages/xarray/core/dask_array_compat.py in <module>
      5 import numpy as np
      6 
----> 7 from .pycompat import dask_array_type
      8 
      9 try:

/usr/lib/python3/dist-packages/xarray/core/pycompat.py in <module>
     15     import sparse
     16 
---> 17     sparse_array_type = (sparse.SparseArray,)
     18 except ImportError:  # pragma: no cover
     19     sparse_array_type = ()

AttributeError: module 'sparse' has no attribute 'SparseArray'


Cheers,

Mika


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (650, 'testing'), (450, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.6.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-xarray depends on:
ii  python3                3.8.2-3
ii  python3-numpy          1:1.17.4-5
ii  python3-pandas         0.25.3+dfsg2-2
ii  python3-pkg-resources  46.1.3-1

Versions of packages python3-xarray recommends:
ii  python3-bottleneck  1.2.1+ds1-2+b2
ii  python3-dask        2.11.0+dfsg-1
ii  python3-h5netcdf    0.8.0-1
ii  python3-netcdf4     1.5.3-1+b5
ii  python3-zarr        2.4.0+ds-1

Versions of packages python3-xarray suggests:
pn  python-xarray-doc   <none>
pn  python3-cartopy     <none>
ii  python3-matplotlib  3.2.1-1+b1
pn  python3-pydap       <none>
pn  python3-rasterio    <none>
ii  python3-scipy       1.4.1-2
ii  python3-seaborn     0.10.1-1
ii  python3-toolz       0.9.0-1.1

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: python-xarray
Source-Version: 0.15.1-3
Done: Alastair McKinstry <[email protected]>

We believe that the bug you reported is fixed in the latest version of
python-xarray, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alastair McKinstry <[email protected]> (supplier of updated python-xarray 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 12 May 2020 17:04:22 +0100
Source: python-xarray
Architecture: source
Version: 0.15.1-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers 
<[email protected]>
Changed-By: Alastair McKinstry <[email protected]>
Closes: 960380
Changes:
 python-xarray (0.15.1-3) unstable; urgency=medium
 .
   * patch: Use sparse.COO or scipy.sparse.coo_matrix for sparse
     matrices, not sparse.SparseArray, which doesn't exist.
     Closes: #960380.
Checksums-Sha1:
 8837b0bf2540863440998d4b153cd1d38ae6161a 3289 python-xarray_0.15.1-3.dsc
 fd4224995c8fe80122d0c2448dfd5524d60f033a 13624 
python-xarray_0.15.1-3.debian.tar.xz
Checksums-Sha256:
 fa7bbea09822de43fdffa407319699876fd9e5407339f96016526420dd96985b 3289 
python-xarray_0.15.1-3.dsc
 856b69536696c6011c3ef952f089a70a01406719294a11f3f7a22d2a1dc9e213 13624 
python-xarray_0.15.1-3.debian.tar.xz
Files:
 c18ab8c5a2cab60b19465027c6404702 3289 python optional 
python-xarray_0.15.1-3.dsc
 7a011403195ca09fc5baeaa89dd86968 13624 python optional 
python-xarray_0.15.1-3.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEgjg86RZbNHx4cIGiy+a7Tl2a06UFAl666ykACgkQy+a7Tl2a
06VrcBAArJ2iCZF6WhRB99PPmZZi7yLu/D/V1xv4PXq3+JkX1eBx+DCMiTiNWv9e
CcK2SsvuVTz8QUa+HyxRZA33MJCIECxHqUxZ7UutOrdzrUGa6IWt/ho6ZRQkL41F
07WWO/FA0XL8c2w96X/JxSwIg8pStgZEKkjG/g7AKPausuUEF+hn9DoVR11r4zdY
tAyZ11kEaDjzPSvkYwxXzE+NP/oh+OLQtQF0lG82qId/YD4iFFtO6Ha1hG8D9qnI
nSrVGJATLAzbVCfsZ00CtByJdXIBdJSFAa3DN9qx7mwMx6KRGXYFRwRp4JQhMDq5
E5J2MTr15BQAcZqIKC7nIC9o/8e4RiPmmZm/tCDahMgi/RIjPp27rAXD6Jy4v72P
6dC8KeIOMV6hjtX04GHdoPvcySh34CZAtUTsrIck8cF5PGF4nP4rzq3waR2LQU9g
FMqTRekVcdtBhDnn+1J2Rl2HgFaHDL662331up5KaBDUw7BX8MLc5JG9PGqWFqyP
px8D57szudk8mkVDKywj+U+tydI/TRnM69OngC+xsp32WcrydGcheOup5xqTiGbt
MQlui0/KtOSUmBUJwvMq0CkNFa5RQ8gFTj6XgNYM3J2xtPB5qq31Ue10TdfCxk5E
FXfL5cFskeVv8dRN10Oor9e/QNu4//znYZoocwGb2SZszKFA5Ag=
=erqx
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to