#1149264 satpy: FTBFS against python 3.15rc2 (cannot import calibrate_solar or calibrate_thermal)

Package:
src:satpy
Source:
src:satpy
Submitter:
Margarita Manterola
Date:
2026-09-28 21:03:02 UTC
Severity:
normal
Tags:
#1149264#5
Date:
2026-09-28 21:01:08 UTC
From:
To:
Hi!

While rebuilding the python related packages against the Python 3.15rc2
version we found that satpy fails to build from source:
https://debusine.debian.net/debian/r-python-python3.15/artifact/4857690/

 From the log, these are some of the encountered errors:

=================================== FAILURES
===================================
____ 
TestHRPTGetCalibratedReflectances.test_calibrated_reflectances_values
_____

self =
<satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTGetCalibratedReflectances
object at 0x7f0b0cd7d590>
hrpt_fh = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_reflectances_v0/20250609094500_noaa19.hmf'>

     def test_calibrated_reflectances_values(self, hrpt_fh):
         """Test the calibrated reflectance values."""

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

hrpt_fh    = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_reflectances_v0/20250609094500_noaa19.hmf'>
self       =
<satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTGetCalibratedReflectances
object at 0x7f0b0cd7d590>

satpy/tests/reader_tests/test_avhrr_l0_hrpt.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
satpy/readers/hrpt.py:168: in get_dataset
     data = self._get_channel_data(key)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
         attrs      = {'platform_name': 'NOAA 19'}
         info       = {}
         key        = DataID(name='1', calibration=<1>, modifiers=())
         self       = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_reflectances_v0/20250609094500_noaa19.hmf'>
satpy/readers/hrpt.py:179: in _get_channel_data
     data = self.calibrate_solar_channel(data, key)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         data       = dask.array<array, shape=(10, 2048), dtype=>u2,
chunksize=(10, 2048), chunktype=numpy.ndarray>
         key        = DataID(name='1', calibration=<1>, modifiers=())
         self       = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_reflectances_v0/20250609094500_noaa19.hmf'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

self = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_reflectances_v0/20250609094500_noaa19.hmf'>
data = dask.array<array, shape=(10, 2048), dtype=>u2, chunksize=(10,
2048), chunktype=numpy.ndarray>
key = DataID(name='1', calibration=<1>, modifiers=())

     def calibrate_solar_channel(self, data, key):
         """Calibrate a solar channel."""

data       = dask.array<array, shape=(10, 2048), dtype=>u2,
chunksize=(10, 2048), chunktype=numpy.ndarray>
key        = DataID(name='1', calibration=<1>, modifiers=())
self       = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_reflectances_v0/20250609094500_noaa19.hmf'>

satpy/readers/hrpt.py:222: ImportError

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

hrpt_fh    = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_bt_values0/20250609094500_noaa19.hmf'>
self       =
<satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTGetCalibratedBT
object at 0x7f0b0cd7d6d0>

satpy/tests/reader_tests/test_avhrr_l0_hrpt.py:119:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
satpy/readers/hrpt.py:168: in get_dataset
     data = self._get_channel_data(key)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
         attrs      = {'platform_name': 'NOAA 19'}
         info       = {}
         key        = DataID(name='4', calibration=<2>, modifiers=())
         self       = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_bt_values0/20250609094500_noaa19.hmf'>
satpy/readers/hrpt.py:182: in _get_channel_data
     data = self.calibrate_thermal_channel(data, key)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         data       = dask.array<array, shape=(10, 2048), dtype=>u2,
chunksize=(10, 2048), chunktype=numpy.ndarray>
         key        = DataID(name='4', calibration=<2>, modifiers=())
         self       = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_bt_values0/20250609094500_noaa19.hmf'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

self = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_bt_values0/20250609094500_noaa19.hmf'>
data = dask.array<array, shape=(10, 2048), dtype=>u2, chunksize=(10,
2048), chunktype=numpy.ndarray>
key = DataID(name='4', calibration=<2>, modifiers=())

     def calibrate_thermal_channel(self, data, key):
         """Calibrate a thermal channel."""

data       = dask.array<array, shape=(10, 2048), dtype=>u2,
chunksize=(10, 2048), chunktype=numpy.ndarray>
key        = DataID(name='4', calibration=<2>, modifiers=())
self       = <HRPTFile:
'/tmp/pytest-of-sbuild/pytest-0/test_calibrated_bt_values0/20250609094500_noaa19.hmf'>

satpy/readers/hrpt.py:208: ImportError

While we ran into this error during the rebuild against Python 3.15, the
reproducible builds infrastructure is also running into this issue:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/satpy.html

Thus, this is not a new problem and it should be solved right away.
Setting the severity to Serious.