Bug#1123151: metpy: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14 3.13" returned exit code 13

Santiago Vila sanvila at debian.org
Tue Dec 16 19:43:55 GMT 2025


Package: src:metpy
Version: 1.7.1+ds-1
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202512/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:metpy, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:131: Building wheel for python3.14 with "build" module
I: pybuild base:317: python3.14 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_metpy  
* Building wheel...
/usr/lib/python3/dist-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated

[... snipped ...]


    def test_absolute_momentum_given_xy(test_cross_xy):
        """Test absolute momentum calculation."""
        momentum = absolute_momentum(test_cross_xy['u_wind'], test_cross_xy['v_wind'])
        true_momentum_values = np.array([[[169.22222693, 146.36354006, 145.75559124, 171.8710635,
                                           215.04876817, 265.73797007, 318.34138347],
                                          [156.27520858, 133.32107346, 132.62636169, 158.66828331,
                                           201.78218117, 252.41370282, 304.96242462],
                                          [143.32819023, 120.27860686, 119.49713214, 145.46550311,
                                           188.51559418, 239.08943557, 291.58346576],
                                          [130.38117188, 107.23614026, 106.36790259, 132.26272292,
                                           175.24900718, 225.76516831, 278.20450691],
                                          [117.43415353, 94.19367366, 93.23867305, 119.05994273,
                                           161.98242018, 212.44090106, 264.82554806]]])
        true_momentum = xr.DataArray(true_momentum_values * units('m/s'),
                                     coords=test_cross_xy['u_wind'].coords,
                                     dims=test_cross_xy['u_wind'].dims)
>       assert_xarray_allclose(momentum, true_momentum)

tests/calc/test_cross_sections.py:323: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

actual = <xarray.DataArray (time: 1, isobaric: 5, index: 7)> Size: 280B
<Quantity([[[169.22221086 146.36352646 145.75557749 171...t64 56B -1.5e+06 -1.269e+06 ... -2.677e+05 -939.1
Attributes:
    grid_mapping:  lambert_conformal
    _metpy_axis:   x
desired = <xarray.DataArray (time: 1, isobaric: 5, index: 7)> Size: 280B
<Quantity([[[169.22222693 146.36354006 145.75559124 171...6B -4.995e+05 9.84e+04 ... 2.428e+06 3e+06
    y          (index) float64 56B -1.5e+06 -1.269e+06 ... -2.677e+05 -939.1

    def assert_xarray_allclose(actual, desired):
        """Check that the xarrays are almost equal, including coordinates and attributes."""
        xr.testing.assert_allclose(actual, desired)
        assert desired.metpy.coordinates_identical(actual)
>       assert desired.attrs == actual.attrs
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       AssertionError

metpy/testing.py:328: AssertionError
_______________________ test_update_attribute_dictionary _______________________

test_ds_generic = <xarray.Dataset> Size: 2kB
Dimensions:  (a: 1, b: 3, c: 3, d: 5, e: 5)
Coordinates:
  * a        (a) int64 8B 0
  * b ...e) int64 40B 0 1 2 3 4
Data variables:
    test     (a, b, c, d, e) float64 2kB 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0

    def test_update_attribute_dictionary(test_ds_generic):
        """Test update_attribute using dictionary."""
        descriptions = {
            'test': 'Filler data',
            'c': 'The third coordinate'
        }
        test_ds_generic.c.attrs['units'] = 'K'
        test_ds_generic.a.attrs['standard_name'] = 'air_temperature'
        result = test_ds_generic.metpy.update_attribute('description', descriptions)
    
        # Test attribute updates
        assert 'description' not in result['a'].attrs
        assert 'description' not in result['b'].attrs
        assert result['c'].attrs['description'] == 'The third coordinate'
        assert 'description' not in result['d'].attrs
        assert 'description' not in result['e'].attrs
>       assert result['test'].attrs['description'] == 'Filler data'
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       KeyError: 'description'

tests/test_xarray.py:1116: KeyError
________________________ test_update_attribute_callable ________________________

test_ds_generic = <xarray.Dataset> Size: 2kB
Dimensions:  (a: 1, b: 3, c: 3, d: 5, e: 5)
Coordinates:
  * a        (a) int64 8B 0
  * b ...e) int64 40B 0 1 2 3 4
Data variables:
    test     (a, b, c, d, e) float64 2kB 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0

    def test_update_attribute_callable(test_ds_generic):
        """Test update_attribute using callable."""
        def even_ascii(varname, **kwargs):
            return 'yes' if ord(varname[0]) % 2 == 0 else None
    
        result = test_ds_generic.metpy.update_attribute('even', even_ascii)
    
        # Test attribute updates
        assert 'even' not in result['a'].attrs
        assert result['b'].attrs['even'] == 'yes'
        assert 'even' not in result['c'].attrs
        assert result['d'].attrs['even'] == 'yes'
        assert 'even' not in result['e'].attrs
>       assert result['test'].attrs['even'] == 'yes'
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       KeyError: 'even'

tests/test_xarray.py:1140: KeyError
=========================== short test summary info ============================
FAILED tests/calc/test_cross_sections.py::test_absolute_momentum_given_xy - A...
FAILED tests/test_xarray.py::test_update_attribute_dictionary - KeyError: 'de...
FAILED tests/test_xarray.py::test_update_attribute_callable - KeyError: 'even'
================ 3 failed, 1030 passed, 321 deselected in 7.83s ================
E: pybuild pybuild:389: test: plugin pyproject failed with:  [too-long-redacted]  --ignore=tests/io/test_text.py
I: pybuild pybuild:308: ln -s /<<PKGBUILDDIR>>/conftest.py /<<PKGBUILDDIR>>/tests 2>/dev/null || true; ln -s /<<PKGBUILDDIR>>/src/metpy/*.txt /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_metpy/build/metpy 2>/dev/null || true; ln -s /<<PKGBUILDDIR>>/src/metpy/plots/_static /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_metpy/build/metpy/plots 2>/dev/null || true; ln -s /<<PKGBUILDDIR>>/src/metpy/plots/colortable_files /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_metpy/build/metpy/plots 2>/dev/null || true; ln -s /<<PKGBUILDDIR>>/src/metpy/plots/nexrad_tables /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_metpy/build/metpy/plots 2>/dev/null || true
I: pybuild base:317: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3 [too-long-redacted]  --ignore=tests/io/test_text.py
============================= test session starts ==============================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
Matplotlib: 3.10.7+dfsg1
Freetype: 2.13.3
Dep Versions: Cartopy: 0.25.0, Dask: 2024.12.1+dfsg, Matplotlib: 3.10.7+dfsg1,
	Numpy: 2.3.5, Pandas: 2.3.3, Pint: 0.25.2, Pooch: v1.8.2, Pyproj: 3.7.2,
	Scipy: 1.16.3, Shapely: 2.1.2, Traitlets: 5.14.3, Xarray: 2025.12.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_metpy/build
configfile: pyproject.toml
plugins: mpl-0.17.0, typeguard-4.4.4
collected 1354 items / 321 deselected / 1033 selected

tests/calc/test_basic.py ............................................... [  4%]
........................................................................ [ 11%]
......................                                                   [ 13%]
tests/calc/test_calc_tools.py .......................................... [ 17%]
........................................................................ [ 24%]
...............................                                          [ 27%]
tests/calc/test_cross_sections.py ...........F                           [ 28%]
tests/calc/test_indices.py ....                                          [ 29%]
tests/calc/test_kinematics.py .......................................... [ 33%]
...........................                                              [ 35%]
tests/calc/test_thermo.py .............................................. [ 40%]
........................................................................ [ 47%]
........................................................................ [ 54%]
....................................                                     [ 57%]
tests/calc/test_turbulence.py ..............................             [ 60%]
tests/interpolate/test_geometry.py ............                          [ 61%]
tests/interpolate/test_grid.py .......                                   [ 62%]
tests/interpolate/test_interpolate_tools.py ......                       [ 63%]
tests/interpolate/test_one_dimension.py ..................               [ 64%]
tests/interpolate/test_points.py ...                                     [ 65%]
tests/interpolate/test_slices.py ........                                [ 65%]
tests/io/test_tools.py ..                                                [ 66%]
tests/plots/test_cartopy_utils.py .......                                [ 66%]
tests/plots/test_ctables.py ..........                                   [ 67%]
tests/plots/test_declarative.py ...........                              [ 68%]
tests/plots/test_mapping.py ......................                       [ 70%]
tests/plots/test_patheffects.py ........                                 [ 71%]
tests/plots/test_plot_areas.py .....                                     [ 72%]
tests/plots/test_plot_text.py ...                                        [ 72%]
tests/plots/test_skewt.py .............................................. [ 76%]
............                                                             [ 78%]
tests/plots/test_station_plot.py ..........................              [ 80%]
tests/plots/test_util.py .............                                   [ 81%]
tests/plots/test_wx_symbols.py ....                                      [ 82%]
tests/test_cbook.py ...                                                  [ 82%]
tests/test_deprecation.py .                                              [ 82%]
tests/test_packaging.py .                                                [ 82%]
tests/test_testing.py ........                                           [ 83%]
tests/test_xarray.py ................................................... [ 88%]
........................................................................ [ 95%]
.............FF................................                          [100%]

=================================== FAILURES ===================================
_______________________ test_absolute_momentum_given_xy ________________________

test_cross_xy = <xarray.Dataset> Size: 788B
Dimensions:            (time: 1, isobaric: 5, index: 7)
Coordinates:
  * time             ...4....
    v_wind             (time, isobaric, index) float64 280B <Quantity([[[ 24....
    lambert_conformal  <U1 4B ''

    def test_absolute_momentum_given_xy(test_cross_xy):
        """Test absolute momentum calculation."""
        momentum = absolute_momentum(test_cross_xy['u_wind'], test_cross_xy['v_wind'])
        true_momentum_values = np.array([[[169.22222693, 146.36354006, 145.75559124, 171.8710635,
                                           215.04876817, 265.73797007, 318.34138347],
                                          [156.27520858, 133.32107346, 132.62636169, 158.66828331,
                                           201.78218117, 252.41370282, 304.96242462],
                                          [143.32819023, 120.27860686, 119.49713214, 145.46550311,
                                           188.51559418, 239.08943557, 291.58346576],
                                          [130.38117188, 107.23614026, 106.36790259, 132.26272292,
                                           175.24900718, 225.76516831, 278.20450691],
                                          [117.43415353, 94.19367366, 93.23867305, 119.05994273,
                                           161.98242018, 212.44090106, 264.82554806]]])
        true_momentum = xr.DataArray(true_momentum_values * units('m/s'),
                                     coords=test_cross_xy['u_wind'].coords,
                                     dims=test_cross_xy['u_wind'].dims)
>       assert_xarray_allclose(momentum, true_momentum)

tests/calc/test_cross_sections.py:323: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

actual = <xarray.DataArray (time: 1, isobaric: 5, index: 7)> Size: 280B
<Quantity([[[169.22221086 146.36352646 145.75557749 171...t64 56B -1.5e+06 -1.269e+06 ... -2.677e+05 -939.1
Attributes:
    grid_mapping:  lambert_conformal
    _metpy_axis:   x
desired = <xarray.DataArray (time: 1, isobaric: 5, index: 7)> Size: 280B
<Quantity([[[169.22222693 146.36354006 145.75559124 171...6B -4.995e+05 9.84e+04 ... 2.428e+06 3e+06
    y          (index) float64 56B -1.5e+06 -1.269e+06 ... -2.677e+05 -939.1

    def assert_xarray_allclose(actual, desired):
        """Check that the xarrays are almost equal, including coordinates and attributes."""
        xr.testing.assert_allclose(actual, desired)
        assert desired.metpy.coordinates_identical(actual)
>       assert desired.attrs == actual.attrs
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       AssertionError

metpy/testing.py:328: AssertionError
_______________________ test_update_attribute_dictionary _______________________

test_ds_generic = <xarray.Dataset> Size: 2kB
Dimensions:  (a: 1, b: 3, c: 3, d: 5, e: 5)
Coordinates:
  * a        (a) int64 8B 0
  * b ...e) int64 40B 0 1 2 3 4
Data variables:
    test     (a, b, c, d, e) float64 2kB 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0

    def test_update_attribute_dictionary(test_ds_generic):
        """Test update_attribute using dictionary."""
        descriptions = {
            'test': 'Filler data',
            'c': 'The third coordinate'
        }
        test_ds_generic.c.attrs['units'] = 'K'
        test_ds_generic.a.attrs['standard_name'] = 'air_temperature'
        result = test_ds_generic.metpy.update_attribute('description', descriptions)
    
        # Test attribute updates
        assert 'description' not in result['a'].attrs
        assert 'description' not in result['b'].attrs
        assert result['c'].attrs['description'] == 'The third coordinate'
        assert 'description' not in result['d'].attrs
        assert 'description' not in result['e'].attrs
>       assert result['test'].attrs['description'] == 'Filler data'
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       KeyError: 'description'

tests/test_xarray.py:1116: KeyError
________________________ test_update_attribute_callable ________________________

test_ds_generic = <xarray.Dataset> Size: 2kB
Dimensions:  (a: 1, b: 3, c: 3, d: 5, e: 5)
Coordinates:
  * a        (a) int64 8B 0
  * b ...e) int64 40B 0 1 2 3 4
Data variables:
    test     (a, b, c, d, e) float64 2kB 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0

    def test_update_attribute_callable(test_ds_generic):
        """Test update_attribute using callable."""
        def even_ascii(varname, **kwargs):
            return 'yes' if ord(varname[0]) % 2 == 0 else None
    
        result = test_ds_generic.metpy.update_attribute('even', even_ascii)
    
        # Test attribute updates
        assert 'even' not in result['a'].attrs
        assert result['b'].attrs['even'] == 'yes'
        assert 'even' not in result['c'].attrs
        assert result['d'].attrs['even'] == 'yes'
        assert 'even' not in result['e'].attrs
>       assert result['test'].attrs['even'] == 'yes'
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       KeyError: 'even'

tests/test_xarray.py:1140: KeyError
=========================== short test summary info ============================
FAILED tests/calc/test_cross_sections.py::test_absolute_momentum_given_xy - A...
FAILED tests/test_xarray.py::test_update_attribute_dictionary - KeyError: 'de...
FAILED tests/test_xarray.py::test_update_attribute_callable - KeyError: 'even'
================ 3 failed, 1030 passed, 321 deselected in 7.86s ================
E: pybuild pybuild:389: test: plugin pyproject failed with:  [too-long-redacted]  --ignore=tests/io/test_text.py
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14 3.13" returned exit code 13
make: *** [debian/rules:94: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------



More information about the Pkg-grass-devel mailing list