[Debian-astro-maintainers] Bug#1082319: stsci.tools FTBFS with Python 3.13
Stefano Rivera
stefanor at debian.org
Thu Sep 19 21:22:05 BST 2024
Source: stsci.tools
Version: 4.1.1-1
Severity: normal
User: debian-python at lists.debian.org
Usertags: python3.13
Forwarded: https://github.com/spacetelescope/stsci.tools/issues/163
This package failed build from source when test-built against a version of
python3-defaults that includes 3.13 as a supported version.
To reproduce this issue, build against python3-defaults (python3-all-dev etc.)
from Debian experimental.
What's new in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html
Log snippet:
stsci/tools/convertgeis.py . [ 6%]
stsci/tools/convertlog.py . [ 7%]
stsci/tools/convertwaiveredfits.py . [ 7%]
stsci/tools/fileutil.py s. [ 8%]
stsci/tools/gfit.py . [ 9%]
stsci/tools/irafutils.py . [ 9%]
stsci/tools/linefit.py . [ 10%]
stsci/tools/logutil.py . [ 10%]
stsci/tools/readgeis.py . [ 11%]
stsci/tools/swapgeis.py . [ 11%]
stsci/tools/tests/test_bitmask.py ...................................... [ 29%]
.............................. [ 44%]
stsci/tools/tests/test_breadcrumb.py . [ 44%]
stsci/tools/tests/test_cfgobj.py . [ 45%]
stsci/tools/tests/test_check_files.py .... [ 47%]
stsci/tools/tests/test_compmixin.py .F.. [ 49%]
stsci/tools/tests/test_irafutils.py ............. [ 55%]
stsci/tools/tests/test_isfits.py .. [ 56%]
stsci/tools/tests/test_minmatch.py ................... [ 65%]
stsci/tools/tests/test_mputil.py ....... [ 69%]
stsci/tools/tests/test_stpyfits.py .................... [ 78%]
stsci/tools/tests/test_tkrotext.py x [ 79%]
stsci/tools/tests/test_xyinterp.py ....... [ 82%]
stsci/tools/textutil.py . [ 83%]
stsci/tools/validate.py s....ssssssss..................... [ 99%]
stsci/tools/wcsutil.py s [100%]
=================================== FAILURES ===================================
_________________________________ test_AnyType _________________________________
def test_AnyType():
x = AnyType('x')
y = AnyType('yyy')
z = AnyType(0)
nn = AnyType(None)
# compare two AnyType objects
assert str(x > y) == "False"
assert str(x < y) == "True"
assert str(x <= y) == "True"
assert str(x == y) == "False"
assert str(y == y) == "True"
assert str(x < z) == "False"
assert str(x <= z) == "False"
assert str(x > z) == "True"
assert str(x != z) == "True"
assert str(z != z) == "False"
assert str(z == z) == "True"
assert str(y < nn) == "False"
assert str(y >= nn) == "True"
assert str(y == nn) == "False"
assert str(nn == nn) == "True"
> assert str([str(jj) for jj in sorted([y, x, nn, z])]
) == "['None', '0', 'x', 'yyy']"
stsci/tools/tests/test_compmixin.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stsci/tools/compmixin.py:33: in __lt__
return self._compare(other, lambda s,o: s < o)
stsci/tools/tests/test_compmixin.py:30: in _compare
return self._compare(other.val, method)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <stsci.tools.tests.test_compmixin.AnyType object at 0xffffb2dd8fc0>
other = 0
method = <function ComparableMixin.__lt__.<locals>.<lambda> at 0xffffb2830040>
def _compare(self, other, method):
if isinstance(other, self.__class__):
# recurse, get 2 logic below
return self._compare(other.val, method)
if isinstance(other, str):
return method(str(self.val), other)
elif other is None and self.val is None:
return method(0, 0)
elif other is None:
# coerce to str compare
return method(str(self.val), '')
elif isinstance(other, int):
# handle ONLY case where self.val is a single char or an int
if isinstance(self.val, str) and len(self.val) == 1:
return method(ord(self.val), other)
else:
# assume we are int-like
> return method(int(self.val), other)
E TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
stsci/tools/tests/test_compmixin.py:44: TypeError
=========================== short test summary info ============================
FAILED stsci/tools/tests/test_compmixin.py::test_AnyType - TypeError: int() a...
============= 1 failed, 191 passed, 14 skipped, 1 xfailed in 5.64s =============
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_stsci.tools/build; python3.13 -m pytest --doctest-modules .
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_stsci.tools/build; python3.12 -m pytest --doctest-modules .
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
Running tests in ..
Date: 2024-09-19T13:52:34
Platform: Linux-6.1.0-25-cloud-arm64-aarch64-with-glibc2.40
Executable: /usr/bin/python3.12
Full Python Version:
3.12.6 (main, Sep 7 2024, 14:20:15) [GCC 14.2.0]
encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15
Package versions:
Numpy: 1.26.4
Scipy: not available
Matplotlib: not available
h5py: not available
Pandas: not available
Using Astropy options: remote_data: none.
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_stsci.tools/build
configfile: pyproject.toml
plugins: typeguard-4.3.0, arraydiff-0.6.1, cov-5.0.0, astropy-header-0.2.2, filter-subpackage-0.2.0, mock-3.14.0, hypothesis-6.112.0, remotedata-0.4.1, doctestplus-1.2.1, astropy-0.11.0
collected 207 items
stsci/tools/asnutil.py s.. [ 1%]
stsci/tools/bitmask.py .. [ 2%]
stsci/tools/configobj.py s....s.. [ 6%]
stsci/tools/convertgeis.py . [ 6%]
stsci/tools/convertlog.py . [ 7%]
stsci/tools/convertwaiveredfits.py . [ 7%]
stsci/tools/fileutil.py s. [ 8%]
stsci/tools/gfit.py . [ 9%]
stsci/tools/irafutils.py . [ 9%]
stsci/tools/linefit.py . [ 10%]
stsci/tools/logutil.py . [ 10%]
stsci/tools/readgeis.py . [ 11%]
stsci/tools/swapgeis.py . [ 11%]
stsci/tools/tests/test_bitmask.py ...................................... [ 29%]
.............................. [ 44%]
stsci/tools/tests/test_breadcrumb.py . [ 44%]
stsci/tools/tests/test_cfgobj.py . [ 45%]
stsci/tools/tests/test_check_files.py .... [ 47%]
stsci/tools/tests/test_compmixin.py .... [ 49%]
stsci/tools/tests/test_irafutils.py ............. [ 55%]
stsci/tools/tests/test_isfits.py .. [ 56%]
stsci/tools/tests/test_minmatch.py ................... [ 65%]
stsci/tools/tests/test_mputil.py ....... [ 69%]
stsci/tools/tests/test_stpyfits.py .................... [ 78%]
stsci/tools/tests/test_tkrotext.py x [ 79%]
stsci/tools/tests/test_xyinterp.py ....... [ 82%]
stsci/tools/textutil.py . [ 83%]
stsci/tools/validate.py s....ssssssss..................... [ 99%]
stsci/tools/wcsutil.py s [100%]
================== 192 passed, 14 skipped, 1 xfailed in 5.61s ==================
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 3.12" returned exit code 13
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-19T13:52:39Z
If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/794481/
This bug has been filed at "normal" severity, as we haven't started the
transition to add 3.13 as a supported version, yet. This will be raised to RC
as soon as that happens, hopefully well before trixie.
Thanks,
Stefano
More information about the Debian-astro-maintainers
mailing list