# Bug#873366: marked as done (python-xarray: Please don't autopkgtest non-default pydap backend)

Your message dated Sun, 04 Feb 2018 12:36:18 +0000
with message-id <e1eijws-0000jc...@fasolo.debian.org>
and subject line Bug#873366: fixed in python-xarray 0.9.6-1
has caused the Debian Bug report #873366,
regarding python-xarray: Please don't autopkgtest non-default pydap backend
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
immediately.)

--
873366: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=873366
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

--- Begin Message ---
Package: python-xarray
Version: 0.9.2-1
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu artful ubuntu-patch autopkgtest

Hi Ghislain,

The autopkgtests for python-xarray have been failing in both Debian and
Ubuntu since the upload of 0.9.2-1.  While the test failure is
(unfortunately) not considered a blocker for Debian testing, autopkgtest
regressions are blockers for Ubuntu releases.

The failures in Debian and Ubuntu are different from one another.  In
Debian, the tests fail because the pydap backend appears to be broken:

=================================== FAILURES ===================================
________________________ PydapTest.test_cmp_local_file _________________________

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross',
'i', 'j', 'l'>
attr = 'iteritems'

def __getattr__(self, attr):
"""Lazy shortcut return children."""
try:
>           return self[attr]

/usr/lib/python3/dist-packages/pydap/model.py:382:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <DatasetType with children 'bears', 'order', 'shot', 'aloan', 'cross',
'i', 'j', 'l'>
key = 'iteritems'

def __getitem__(self, key):
if isinstance(key, string_types):
>           return self._getitem_string(key)

(https://ci.debian.net/packages/p/python-xarray/unstable/amd64/)

Whereas in Ubuntu, the tests fail because pydap as a whole is broken with
respect to autodetection of proxies through the http_proxy variable, so it
fails messily with a network timeout and is basically untestable on Ubuntu
infrastructure:

=================================== FAILURES ===================================
________________________ PydapTest.test_cmp_local_file _________________________

self = <xarray.tests.test_backends.PydapTest testMethod=test_cmp_local_file>

def test_cmp_local_file(self):
>       with self.create_datasets() as (actual, expected):

/usr/lib/python3/dist-packages/xarray/tests/test_backends.py:1341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.6/contextlib.py:81: in __enter__
return next(self.gen)
/usr/lib/python3/dist-packages/xarray/tests/test_backends.py:1331: in
create_datasets
actual = open_dataset(url, engine='pydap', **kwargs)
/usr/lib/python3/dist-packages/xarray/backends/api.py:296: in open_dataset
store = backends.PydapDataStore(filename_or_obj)
/usr/lib/python3/dist-packages/xarray/backends/pydap_.py:65: in __init__
self.ds = pydap.client.open_url(url)
/usr/lib/python3/dist-packages/pydap/client.py:67: in open_url
timeout).dataset
/usr/lib/python3/dist-packages/pydap/handlers/dap.py:54: in __init__
raise_for_status(r)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

response = <Response at 0x7fb355e301d0 504 Gateway Timeout>

Investigating this a bit more, I found that the pydap backend is not the
default in the upstream codebase; instead, the netcdf backend is preferred,
and this backend passes its tests fine.

So I think the best solution here is to not run tests for a backend we
shouldn't care about given that netcdf4 is available in Debian.  I've
therefore dropped the test dependency on python3-pydap in Ubuntu, which
should allow python-xarray to be updated for the next release.

I think it would be a good idea for the Debian package to make this change
as well, and also to move python3-netcdf4 from Suggests to Recommends to
make it clear that this is the preferred backend (and possibly drop
python3-pydap from the suggests completely).  It's not particularly useful
to have automated testing of the pydap backend if that backend is going to
be perpetually broken.

Cheers,
--
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org

diff -Nru python-xarray-0.9.2/debian/tests/control
python-xarray-0.9.2/debian/tests/control
--- python-xarray-0.9.2/debian/tests/control    2017-04-15 13:28:16.000000000
-0700
+++ python-xarray-0.9.2/debian/tests/control    2017-08-26 16:40:53.000000000
-0700
@@ -12,7 +12,6 @@
python3-h5py,
python3-matplotlib,
python3-netcdf4,
-         python3-pydap,
python3-pytest (>= 2.7.1),
python3-scipy,
python3-seaborn,


--- End Message ---
--- Begin Message ---
Source: python-xarray
Source-Version: 0.9.6-1

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
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ghislain Antony Vaillant <ghisv...@gmail.com> (supplier of updated
python-xarray package)

(This message was generated automatically at their request; if you

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

Format: 1.8
Date: Sat, 03 Feb 2018 13:49:07 +0000
Source: python-xarray
Binary: python3-xarray python-xarray-doc
Architecture: source all
Version: 0.9.6-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers
<debian-science-maintain...@lists.alioth.debian.org>
Changed-By: Ghislain Antony Vaillant <ghisv...@gmail.com>
Description:
python-xarray-doc - documentation for xarray
python3-xarray - N-D labeled arrays and datasets in Python 3
Closes: 871208 873366 882559
Changes:
python-xarray (0.9.6-1) unstable; urgency=medium
.
* Source future releases from GitHub
* Use the recommended gbp configuration
* New upstream version 0.9.6 (Closes: #882559)
* Rebase the patch queue
- Drop Fix-missing-config-errors-when-running-test-suite.patch,
no longer required
- Refresh Use-packaged-docs.patch, Use-packaged-MathJax.patch
and No-privacy-breach.patch
* Update the dependencies
- Drop distributed, h5netcdf, h5py, pydap and toolz from Build-Depends
- Add rasterio and sphinx-gallery to Build-Depends
- Move bottleneck, dask and netcdf4 from Suggests to Recommends
- Add cartopy and rasterio to Suggests
- Drop distributed, h5netcdf and h5py from Suggests
* Fix autopkgtest failures.
Thanks to Steve Langasek (Closes: #873366)
* Drop superfluous nocheck guards
* Ignore the autogenerated version file
* Fix whitespacing in rules file
* Bump the debhelper version to 11
* Bump the standards version to 4.1.3
* Point the VCS metadata to salsa.d.o
* Disable Sphinx gallery generation
- New patch No-sphinx-gallery.patch
* Cherry-pick upstream fix for a failing test
- New patch Fix-test-suite-failure.patch
Thanks to Rebecca N. Plamer (Closes: #871208)
Checksums-Sha1:
cbdfb3df7de34f9ed07000fca77c86dd3336ce4c 2837 python-xarray_0.9.6-1.dsc
f49c7e9f5c2cf42a3c3427815c0bd08dcaefa135 1771069
python-xarray_0.9.6.orig.tar.gz
python-xarray_0.9.6-1.debian.tar.xz
d7a93bbf983af117af2a87a484670d1dee5b392d 1410092
python-xarray-doc_0.9.6-1_all.deb
e2fa0937d2681fcb3b523c902c3c2149c7c2a2a5 11627
python-xarray_0.9.6-1_amd64.buildinfo
cfc215d6dab692df47de31cc602e49651252f013 215288 python3-xarray_0.9.6-1_all.deb
Checksums-Sha256:
python-xarray_0.9.6-1.dsc
4b68f2fa5158123f87b158015374e035471dbe00d10e445cb43a5e4ab11045e1 1771069
python-xarray_0.9.6.orig.tar.gz
a50f13621c698ddc6e475ec6f9da2fb5109eaab8080f4d6b7206a70341fdcdd3 8120
python-xarray_0.9.6-1.debian.tar.xz
57bac812433fbeba0e0bacd6f085532afc5b033c6d04839f20c52651218a23b2 1410092
python-xarray-doc_0.9.6-1_all.deb
8a24a256c095c208a6ce0b890f6e5c80d6f0a82e50610615b1c5d3b566615324 11627
python-xarray_0.9.6-1_amd64.buildinfo
python3-xarray_0.9.6-1_all.deb
Files:
aa154cbb5e5b7439daf158ecb9175a81 2837 python optional python-xarray_0.9.6-1.dsc
980aa689524338de077d8f889e901327 1771069 python optional
python-xarray_0.9.6.orig.tar.gz
152a6052daf6b7cc535ab8e228aab7b7 8120 python optional
python-xarray_0.9.6-1.debian.tar.xz
6a5d17f53e15252e16c93ab202999182 1410092 doc optional
python-xarray-doc_0.9.6-1_all.deb
32edca5f6b791457b667e7709787c293 11627 python optional
python-xarray_0.9.6-1_amd64.buildinfo
09615b663bae66a8dcf8c5352814e46a 215288 python optional
python3-xarray_0.9.6-1_all.deb

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

06VeDQ//eYjsdshd9/79ksjm+daO5UEeoOBo2kMDLCxMUXEK/JPwtgUgm2Wcffd4
9mc4heXC4teuRO9onZtQi560zj5xll+3vVFjeWLS7dL2lHiuj+7qXFsb8Gztg/f4
nNkd/HSiHXPLIN+urBs6W7bKQ8mu4GmXMNt/j4bH2Umk21w8vXBw7MB17jaZ0o75
rT8umRCMLV42xRtQovhMZsOqcEDqWbIJTBY3YQuNNFuJuB0MYl11T/O+ktEZNRQX
02u62N2bFvYRmErNMCJ089Ja2DOkYiMM9T3BW6vki8GaVITDFApNSMPDYZz8qT6E
PYgho1u3BOtEHlafdvz5dsBd66Ms5qyoK+ZMyFVzw8OV8QuHPTvCIYGI4yXvOm87
Hb57mpYj/72zlcJ8nEznB051TILjbThT6YYSDVjfRhJyZQURS+4eQY8+wbwYHgDe
gIvmHCIQXJT071Zs638O/eLwvBhNCS7B6T8Y5wTrz4zTKGNiIHUMZ6o92Q5GZxnN
iCdDxE7VVumJXpEDFvMChmNWZrFL4Qd0JPoNNssyB8KnHPxTHhQn4F8aMw60JW7K
+d/pyFdvqEAb5tYTXnuBB0DELgWTEyZibgzh1Cm7hkUSnPqrl3iLC5VMbbi0byab
fkbPK6+yBdZIM2XVDqQA8rGrRu3CXtgo94EWpIJOLZtdJ1AnTLo=
=JLfQ
-----END PGP SIGNATURE-----

--- End Message ---