#1149373 heudiconv: FTBFS against python 3.15rc2 (pydicom imports deprecated collections.abc.ByteString)

Package:
src:heudiconv
Source:
src:heudiconv
Submitter:
Margarita Manterola
Date:
2026-10-23 20:25:03 UTC
Severity:
normal
Tags:
#1149373#5
Date:
2026-09-29 17:47:22 UTC
From:
To:
Hi!

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

The log includes errors like this one, over and over:
__ ERROR collecting 
.pybuild/cpython3_3.15_heudiconv/build/heudiconv/bids.py ___
heudiconv/bids.py:21: in <module>
     import pydicom as dcm
/usr/lib/python3/dist-packages/pydicom/__init__.py:31: in <module>
     from pydicom.dataelem import DataElement
/usr/lib/python3/dist-packages/pydicom/dataelem.py:17: in <module>
     from pydicom import config  # don't import datetime_conversion
directly
     ^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/pydicom/config.py:407: in <module>
     import pydicom.pixel_data_handlers.numpy_handler as np_handler  #
noqa
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/pydicom/pixel_data_handlers/__init__.py:6:
in <module>
     from pydicom.pixels.processing import (
/usr/lib/python3/dist-packages/pydicom/pixels/__init__.py:3: in <module>
     from pydicom.pixels.decoders.base import get_decoder
/usr/lib/python3/dist-packages/pydicom/pixels/decoders/__init__.py:3: in
<module>
     from pydicom.pixels.decoders.base import (
/usr/lib/python3/dist-packages/pydicom/pixels/decoders/base.py:21: in
<module>
     from pydicom.pixels.common import (
/usr/lib/python3/dist-packages/pydicom/pixels/common.py:9: in <module>
     from pydicom.pixels.utils import as_pixel_options
/usr/lib/python3/dist-packages/pydicom/pixels/utils.py:4: in <module>
     from collections.abc import Iterable, Iterator, ByteString
<frozen _collections_abc>:1180: in __getattr__
     ???
/usr/lib/python3.15/_py_warnings.py:892: in _deprecated
     _wm.warn(msg, DeprecationWarning, stacklevel=3)
E   DeprecationWarning: 'collections.abc.ByteString' is deprecated and
slated for removal in Python 3.17

This is caused by pydicom trying to import the deprecated module, and
heudicom setting to fail on  warnings.

Setting the severity to important for now. Once Python 3.15 is released
and later added to python3-defaults, this bug will become release
critical.

#1149373#10
Date:
2026-10-23 17:04:42 UTC
From:
To:
Hello,

Bug #1149373 in heudiconv reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/med-team/heudiconv/-/commit/c5402e99211840b5634e0774a46bb6bb842f56c4
------------------------------------------------------------------------
tolerate pydicom importing the deprecated collections.abc.ByteString, which raises a DeprecationWarning on Python 3.15 and now fails the warnings-as-errors test collection.  Closes: #1149373
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1149373

#1149373#17
Date:
2026-10-23 20:23:36 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
heudiconv, 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 1149373@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Tille <tille@debian.org> (supplier of updated heudiconv 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 ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 23 Oct 2026 21:08:18 +0200
Source: heudiconv
Architecture: source
Version: 1.4.0-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Changed-By: Andreas Tille <tille@debian.org>
Closes: 1149373
Changes:
 heudiconv (1.4.0-3) unstable; urgency=medium
 .
   * Team upload.
   * ignore-pydicom-bytestring-warning: new: tolerate pydicom importing the
     deprecated collections.abc.ByteString,
   * Exclude Python 3.15 from build
     Closes: #1149373
Checksums-Sha1:
 ed28154213c4092eec88726cd363f03096fbdce6 2321 heudiconv_1.4.0-3.dsc
 77f628da70b7a3491fe4090c9046fd0ec1b51126 5980 heudiconv_1.4.0-3.debian.tar.xz
 6e8f87a5b47da69b4ece3a65bd4e7fc43882c310 13022 heudiconv_1.4.0-3_amd64.buildinfo
Checksums-Sha256:
 9f33a507f610983dd1cbf2e53f942a14e6d67882e65a3cb227528059dffbb5f2 2321 heudiconv_1.4.0-3.dsc
 2adc006496771bbae8a30b786a3bfa32268fd43da4cd8fe81d5112402402bdec 5980 heudiconv_1.4.0-3.debian.tar.xz
 8127b651a7d18f09292ce37a62508050cf89a11fb6871fb1d4ca6b4cb12f6b54 13022 heudiconv_1.4.0-3_amd64.buildinfo
Files:
 49f5faf4e82c6fe120aa4caef53bd081 2321 science optional heudiconv_1.4.0-3.dsc
 dc4db3dddf01a588f6d0df2dd91876d0 5980 science optional heudiconv_1.4.0-3.debian.tar.xz
 0be3b9fe074d21062bcb66ce7b21bcac 13022 science optional heudiconv_1.4.0-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmrbvu8RHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtHzpQ//Vg8CQHtVEUsXRm/eH9yROwt1icDgrhiY
IPWuTJXmXUxrireOiaqqTnpeLmkOKAfJE0i7W1KNtGXc12e+G5SwTzJ0r278xiGv
s7yNE8tsPGbgT2Ckt46IctGQ/R6IHq/gTRZ8uoqjkFTgDJ3xrgBPGzXQs6frG/6k
8w32ro7+M/kKQZYnOZh4xwJvheB0KMCrzRCQUpvc0Eo1rTimJrnLhE7wA+p6BNYc
atI5WcR8qoOx2aee81oGVotIZU2Cs9aoc6s15l8W/kztQ2HjiOeMB+l7rPqD1dfX
BdNJqYAF0Bx6m7Vq+LwLbTSgCNcHdwQnz7rMgZBA6lKcfV5PFAEAeteLC1k/zVaM
JO33c4EWP7rmCBta9qa2m00Z0ubVLGAHB657vDoc2BFs1884A8o/PC8gfktU2iNn
/sPw3Mw1KGrZwS4G47XG29TUfXc+8Wm49yX9Hvx9/G8folRnRyCQOh02ADpN+MpH
3MHgXoRwCrFHp552E7uKQ6z0otPs1wiuE6efjPHhvs3yRblTW+fFfGMraz/0qWs2
00jRQ3oYlJ5qDMC7AnZQvhI2vsJXJjznKgjj4gVjh0wJl6Xw9+8wYsxncb0lkX+Q
BeCAYSHgVioYBZmgpMKyGlKwsJbYtYLkWhk/y9FdkILrXcxfCpA0FgvvpgKxnVFS
sOeFvIWUxNo=
=ScjD
-----END PGP SIGNATURE-----