Bug#1055158: python-imageio's autopkg tests fails with pillow 10.1.0

Matthias Klose doko at debian.org
Wed Nov 1 11:57:03 GMT 2023


Package: src:python-imageio
Version:
Severity: serious
Tags: sid trixie

python-imageio's autopkg tests fails with pillow 10.1.0.
See
https://ci.debian.net/data/autopkgtest/testing/amd64/p/python-imageio/39404026/log.gz

[...]
22s =================================== FAILURES ===================================
  22s ___________________________________ test_gif 
___________________________________
  22s
  22s self = <PIL.GifImagePlugin.GifImageFile image mode= size=32x42 at 
0x7FCA3DE332D0>
  22s fp = <_io.BufferedReader 
name='/tmp/pytest-of-debci/pytest-0/test_gif0/test0.0.0.gif'>
  22s filename = ''
  22s
  22s     def __init__(self, fp=None, filename=None):
  22s         super().__init__()
  22s
  22s         self._min_frame = 0
  22s
  22s         self.custom_mimetype = None
  22s
  22s         self.tile = None
  22s         """ A list of tile descriptors, or ``None`` """
  22s
  22s         self.readonly = 1  # until we know better
  22s
  22s         self.decoderconfig = ()
  22s         self.decodermaxblock = MAXBLOCK
  22s
  22s         if is_path(fp):
  22s             # filename
  22s             self.fp = open(fp, "rb")
  22s             self.filename = fp
  22s             self._exclusive_fp = True
  22s         else:
  22s             # stream
  22s             self.fp = fp
  22s             self.filename = filename
  22s             # can be overridden
  22s             self._exclusive_fp = None
  22s
  22s         try:
  22s             try:
  22s >               self._open()
  22s
  22s /usr/lib/python3/dist-packages/PIL/ImageFile.py:117:
  22s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _
  22s /usr/lib/python3/dist-packages/PIL/GifImagePlugin.py:108: in _open
  22s     self._seek(0)  # get ready to read first frame
  22s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _
  22s
  22s self = <PIL.GifImagePlugin.GifImageFile image mode= size=32x42 at 
0x7FCA3DE332D0>
  22s frame = 0, update_image = True
  22s
  22s     def _seek(self, frame, update_image=True):
  22s         if frame == 0:
  22s             # rewind
  22s             self.__offset = 0
  22s             self.dispose = None
  22s             self.__frame = -1
  22s             self._fp.seek(self.__rewind)
  22s             self.disposal_method = 0
  22s             if "comment" in self.info:
  22s                 del self.info["comment"]
  22s         else:
  22s             # ensure that the previous frame was loaded
  22s             if self.tile and update_image:
  22s                 self.load()
  22s
  22s         if frame != self.__frame + 1:
  22s             msg = f"cannot seek to frame {frame}"
  22s             raise ValueError(msg)
  22s
  22s         self.fp = self._fp
  22s         if self.__offset:
  22s             # backup to last frame
  22s             self.fp.seek(self.__offset)
  22s             while self.data():
  22s                 pass
  22s             self.__offset = 0
  22s
  22s         s = self.fp.read(1)
  22s         if not s or s == b";":
  22s >           raise EOFError
  22s E           EOFError
  22s
  22s /usr/lib/python3/dist-packages/PIL/GifImagePlugin.py:186: EOFError
  22s
  22s The above exception was the direct cause of the following exception:
  22s
  22s tmp_path = PosixPath('/tmp/pytest-of-debci/pytest-0/test_gif0')
  22s
  22s     @deprecated_test
  22s     def test_gif(tmp_path):
  22s         fnamebase = str(tmp_path / "test")
  22s
  22s         # The not-animated gif
  22s
  22s         for isfloat in (False, True):
  22s             for crop in (0, 1, 2):
  22s                 for colors in (0, 3, 4):
  22s                     if colors > 1 and sys.platform.startswith("darwin"):
  22s                         continue  # quantize fails, see also png
  22s                     fname = fnamebase + "%i.%i.%i.gif" % (isfloat, crop, 
colors)
  22s                     rim = get_ref_im(colors, crop, isfloat)
  22s                     imageio.imsave(fname, rim, format="GIF-PIL")
  22s >                   im = imageio.imread(fname, format="GIF-PIL")
  22s
  22s test_pillow_legacy.py:281:
  22s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _
  22s /usr/lib/python3/dist-packages/imageio/__init__.py:97: in imread
  22s     return imread_v2(uri, format=format, **kwargs)
  22s /usr/lib/python3/dist-packages/imageio/v2.py:360: in imread
  22s     result = file.read(index=0, **kwargs)
  22s /usr/lib/python3/dist-packages/imageio/core/legacy_plugin_wrapper.py:147: 
in read
  22s     reader = self.legacy_get_reader(**kwargs)
  22s /usr/lib/python3/dist-packages/imageio/core/legacy_plugin_wrapper.py:116: 
in legacy_get_reader
  22s     return self._format.get_reader(self._request)
  22s /usr/lib/python3/dist-packages/imageio/core/format.py:221: in get_reader
  22s     return self.Reader(self, request)
  22s /usr/lib/python3/dist-packages/imageio/core/format.py:312: in __init__
  22s     self._open(**self.request.kwargs.copy())
  22s /usr/lib/python3/dist-packages/imageio/plugins/pillow_legacy.py:287: in _open
  22s     self._im = factory(self._fp, "")
  22s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _
  22s
  22s self = <PIL.GifImagePlugin.GifImageFile image mode= size=32x42 at 
0x7FCA3DE332D0>
  22s fp = <_io.BufferedReader 
name='/tmp/pytest-of-debci/pytest-0/test_gif0/test0.0.0.gif'>
  22s filename = ''
  22s
  22s     def __init__(self, fp=None, filename=None):
  22s         super().__init__()
  22s
  22s         self._min_frame = 0
  22s
  22s         self.custom_mimetype = None
  22s
  22s         self.tile = None
  22s         """ A list of tile descriptors, or ``None`` """
  22s
  22s         self.readonly = 1  # until we know better
  22s
  22s         self.decoderconfig = ()
  22s         self.decodermaxblock = MAXBLOCK
  22s
  22s         if is_path(fp):
  22s             # filename
  22s             self.fp = open(fp, "rb")
  22s             self.filename = fp
  22s             self._exclusive_fp = True
  22s         else:
  22s             # stream
  22s             self.fp = fp
  22s             self.filename = filename
  22s             # can be overridden
  22s             self._exclusive_fp = None
  22s
  22s         try:
  22s             try:
  22s                 self._open()
  22s             except (
  22s                 IndexError,  # end of data
  22s                 TypeError,  # end of data (ord)
  22s                 KeyError,  # unsupported mode
  22s                 EOFError,  # got header but not the first frame
  22s                 struct.error,
  22s             ) as v:
  22s >               raise SyntaxError(v) from v
  22s E               SyntaxError:
  22s
  22s /usr/lib/python3/dist-packages/PIL/ImageFile.py:125: SyntaxError
  22s =============================== warnings summary 
===============================
  22s test_fei_tiff.py::test_fei_file_fail
  22s   /usr/lib/python3/dist-packages/imageio/plugins/tifffile.py:189: 
DeprecationWarning: ImageIO's vendored tifffile backend is deprecated and will 
be removed in ImageIO v3. Install the tifffile directly: `pip install 
imageio[tifffile]`
  22s     warnings.warn(
  22s
  22s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
  22s =========================== short test summary info 
============================
  22s FAILED test_pillow_legacy.py::test_gif - SyntaxError:
  22s = 1 failed, 80 passed, 11 skipped, 123 deselected, 1 xpassed, 1 warning in 
1.71s =



More information about the debian-science-maintainers mailing list