Source: cfgrib
Version: 0.9.8.4-1
Severity: serious
Justification: FTBFS on amd64
Tags: bullseye sid ftbfs
Usertags: ftbfs-20201027 ftbfs-bullseye
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> make[1]: Entering directory '/<>'
> for p in python3.9 python3.8; do \
> PY3VERNUM=`echo $p | sed -e 's/python//' `; \
> pybuild --test --test-pytest -i $p -p $PY3VERNUM ; \
> done
> I: pybuild base:217: cd /<>/.pybuild/cpython3_3.9_cfgrib/build;
> python3.9 -m pytest tests
> = test session starts
> ==
> platform linux -- Python 3.9.0+, pytest-4.6.11, py-1.9.0, pluggy-0.13.0
> rootdir: /<>, inifile: setup.cfg
> collected 122 items / 1 skipped / 121 selected
>
> tests/test_10_bindings.py [
> 19%]
> tests/test_10_cfunits.py . [
> 20%]
> tests/test_20_cfcoords.py .. [
> 25%]
> tests/test_20_main.py . [
> 26%]
> tests/test_20_messages.py . [
> 33%]
> tests/test_25_cfmessage.py . [
> 37%]
> tests/test_30_dataset.py ... [
> 53%]
> tests/test_40_xarray_store.py ...[
> 59%]
> tests/test_40_xarray_to_grib_regular_ll.py FF.FF [
> 63%]
> tests/test_50_datamodels.py .. [
> 64%]
> tests/test_50_sample_data.py FFxxFFFxF [
> 91%]
> tests/test_50_xarray_getitem.py ..
> [100%]
>
> === FAILURES
> ===
> ___ test_canonical_dataarray_to_grib_with_grib_keys
>
>
> canonic_da = 5, longitude: 6)>
> array([0., 0., 0., 0., 0., 0.],... (latitude) float64 90.0 45.0 0.0
> -45.0 -90.0
> * longitude (longitude) float64 0.0 60.0 120.0 180.0 240.0 300.0
> tmpdir =
> local('/tmp/pytest-of-user42/pytest-5/test_canonical_dataarray_to_gr0')
>
> def test_canonical_dataarray_to_grib_with_grib_keys(canonic_da, tmpdir):
> out_path = tmpdir.join('res.grib')
> grib_keys = {'gridType': 'regular_ll'}
> with open(str(out_path), 'wb') as file:
> > xarray_to_grib.canonical_dataarray_to_grib(canonic_da, file,
> > grib_keys=grib_keys)
>
> tests/test_40_xarray_to_grib_regular_ll.py:30:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> cfgrib/xarray_to_grib.py:224: in canonical_dataarray_to_grib
> field_values = data_var.sel(**select).values.flat[:]
> /usr/lib/python3/dist-packages/xarray/core/dataarray.py:1143: in sel
> ds = self._to_temp_dataset().sel(
> /usr/lib/python3/dist-packages/xarray/core/dataset.py:2105: in sel
> pos_indexers, new_indexes = remap_label_indexers(
> /usr/lib/python3/dist-packages/xarray/core/coordinates.py:397: in
> remap_label_indexers
> pos_indexers, new_indexes = indexing.remap_label_indexers(
> /usr/lib/python3/dist-packages/xarray/core/indexing.py:275: in
> remap_label_indexers
> idxr, new_idx = convert_label_indexer(index, label, dim, method,
> tolerance)
> /usr/lib/python3/dist-packages/xarray/core/indexing.py:196: in
> convert_label_indexer
> indexer = index.get_loc(label_value, method=method, tolerance=tolerance)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = DatetimeIndex(['2018-01-01 00:00:00', '2018-01-01 12:00:00',
>'2018-01-02 00:00:00', '2018-01-02 12:00:00'],
> dtype='datetime64[ns]', name='time', freq=None)
> key = 15147648000, method = None, tolerance = None
>
> def get_loc(self, key, method=None, tolerance=None):
> """
> Get integer location for requested label
>
> Returns
> ---
> loc : int
> """
> if not is_scalar(key):
> raise InvalidIndexError(key)
>
> orig_key = key
> if is_valid_nat_for_dtype(key, self.dtype):
> key = NaT
>
> if isinstance(key, self._data._recognized_scalars):
> # needed to localize naive datetimes
> key = self._maybe_cast_for_get_loc(key)
>
> elif isinstance(key, str):
> try:
> return self._get_string_slice(key)
> except (TypeError, KeyError, ValueError, OverflowError):
> pass
>
> try:
> key = self._maybe_cast_for_get_loc(key)
> except ValueError as err:
> raise KeyError(key) from err
>
> elif isinstance(key, timedelta):
> # GH#20464
>