Your message dated Wed, 20 Nov 2024 11:51:31 +0000
with message-id <[email protected]>
and subject line Bug#1087901: fixed in pyscreeze 0.0~git20240820225245.93f2775-5
has caused the Debian Bug report #1087901,
regarding pyscreeze: FTBFS: E OSError: unsupported bit depth: 16
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1087901: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1087901
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:pyscreeze
Version: 0.0~git20240820225245.93f2775-4
Severity: important
Tags: ftbfs

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

--------------------------------------------------------------------------------
[...]
 debian/rules build
dh build --with python3 --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:311: python3.12 setup.py config
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: 
Unknown distribution option: 'test_suite'
  warnings.warn(msg)
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: 
Unknown distribution option: 'requires_python'
  warnings.warn(msg)
running config
   dh_auto_build -O--buildsystem=pybuild
I: pybuild base:311: /usr/bin/python3 setup.py build
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: 
Unknown distribution option: 'test_suite'
  warnings.warn(msg)
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: 
Unknown distribution option: 'requires_python'
  warnings.warn(msg)
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyscreeze/build/pyscreeze
copying pyscreeze/__init__.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyscreeze/build/pyscreeze
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
'/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyscreeze/build'; python3.12 -m pytest 
tests
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyscreeze/build
configfile: pyproject.toml
plugins: typeguard-4.3.0, xvfb-3.0.0
collected 12 items

tests/test_pyscreeze.py .........FF.                                     [100%]

=================================== FAILURES ===================================
_________________________ TestGeneral.test_screenshot __________________________

bbox = None, include_layered_windows = False, all_screens = False
xdisplay = None

    def grab(
        bbox: tuple[int, int, int, int] | None = None,
        include_layered_windows: bool = False,
        all_screens: bool = False,
        xdisplay: str | None = None,
    ) -> Image.Image:
        im: Image.Image
        if xdisplay is None:
            if sys.platform == "darwin":
                fh, filepath = tempfile.mkstemp(".png")
                os.close(fh)
                args = ["screencapture"]
                if bbox:
                    left, top, right, bottom = bbox
                    args += ["-R", f"{left},{top},{right-left},{bottom-top}"]
                subprocess.call(args + ["-x", filepath])
                im = Image.open(filepath)
                im.load()
                os.unlink(filepath)
                if bbox:
                    im_resized = im.resize((right - left, bottom - top))
                    im.close()
                    return im_resized
                return im
            elif sys.platform == "win32":
                offset, size, data = Image.core.grabscreen_win32(
                    include_layered_windows, all_screens
                )
                im = Image.frombytes(
                    "RGB",
                    size,
                    data,
                    # RGB, 32-bit line padding, origin lower left corner
                    "raw",
                    "BGR",
                    (size[0] * 3 + 3) & -4,
                    -1,
                )
                if bbox:
                    x0, y0 = offset
                    left, top, right, bottom = bbox
                    im = im.crop((left - x0, top - y0, right - x0, bottom - y0))
                return im
        # Cast to Optional[str] needed for Windows and macOS.
        display_name: str | None = xdisplay
        try:
            if not Image.core.HAVE_XCB:
                msg = "Pillow was built without XCB support"
                raise OSError(msg)
          size, data = Image.core.grabscreen_x11(display_name)
E           OSError: unsupported bit depth: 16

/usr/lib/python3/dist-packages/PIL/ImageGrab.py:78: OSError

During handling of the above exception, another exception occurred:

self = <test_pyscreeze.TestGeneral testMethod=test_screenshot>

    def test_screenshot(self):
      im = pyscreeze.screenshot(TEMP_FILENAME)

/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyscreeze/build/tests/test_pyscreeze.py:144:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyscreeze/build/pyscreeze/__init__.py:603:
 in _screenshot_linux
    im = ImageGrab.grab()  # use Pillow's grab() for Pillow 9.2.0 and later.
/usr/lib/python3/dist-packages/PIL/ImageGrab.py:88: in grab
    im = Image.open(filepath)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

fp = <_io.BufferedReader name='/tmp/tmp_u3jlalf.png'>, mode = 'r'
formats = ['BMP', 'DIB', 'GIF', 'JPEG', 'PPM', 'PNG', ...]

    def open(
        fp: StrOrBytesPath | IO[bytes],
        mode: Literal["r"] = "r",
        formats: list[str] | tuple[str, ...] | None = None,
    ) -> ImageFile.ImageFile:
        """
        Opens and identifies the given image file.
This is a lazy operation; this function identifies the file, but
        the file remains open and the actual image data is not read from
        the file until you try to process the data (or call the
        :py:meth:`~PIL.Image.Image.load` method).  See
        :py:func:`~PIL.Image.new`. See :ref:`file-handling`.
:param fp: A filename (string), os.PathLike object or a file object.
           The file object must implement ``file.read``,
           ``file.seek``, and ``file.tell`` methods,
           and be opened in binary mode. The file object will also seek to zero
           before reading.
        :param mode: The mode.  If given, this argument must be "r".
        :param formats: A list or tuple of formats to attempt to load the file 
in.
           This can be used to restrict the set of formats checked.
           Pass ``None`` to try all supported formats. You can print the set of
           available formats by running ``python3 -m PIL`` or using
           the :py:func:`PIL.features.pilinfo` function.
        :returns: An :py:class:`~PIL.Image.Image` object.
        :exception FileNotFoundError: If the file cannot be found.
        :exception PIL.UnidentifiedImageError: If the image cannot be opened and
           identified.
        :exception ValueError: If the ``mode`` is not "r", or if a ``StringIO``
           instance is used for ``fp``.
        :exception TypeError: If ``formats`` is not ``None``, a list or a tuple.
        """
if mode != "r":
            msg = f"bad mode {repr(mode)}"  # type: ignore[unreachable]
            raise ValueError(msg)
        elif isinstance(fp, io.StringIO):
            msg = (  # type: ignore[unreachable]
                "StringIO cannot be used to open an image. "
                "Binary data must be used instead."
            )
            raise ValueError(msg)
if formats is None:
            formats = ID
        elif not isinstance(formats, (list, tuple)):
            msg = "formats must be a list or tuple"  # type: ignore[unreachable]
            raise TypeError(msg)
exclusive_fp = False
        filename: str | bytes = ""
        if is_path(fp):
            filename = os.path.realpath(os.fspath(fp))
if filename:
            fp = builtins.open(filename, "rb")
            exclusive_fp = True
        else:
            fp = cast(IO[bytes], fp)
try:
            fp.seek(0)
        except (AttributeError, io.UnsupportedOperation):
            fp = io.BytesIO(fp.read())
            exclusive_fp = True
prefix = fp.read(16) preinit() warning_messages: list[str] = [] def _open_core(
            fp: IO[bytes],
            filename: str | bytes,
            prefix: bytes,
            formats: list[str] | tuple[str, ...],
        ) -> ImageFile.ImageFile | None:
            for i in formats:
                i = i.upper()
                if i not in OPEN:
                    init()
                try:
                    factory, accept = OPEN[i]
                    result = not accept or accept(prefix)
                    if isinstance(result, str):
                        warning_messages.append(result)
                    elif result:
                        fp.seek(0)
                        im = factory(fp, filename)
                        _decompression_bomb_check(im.size)
                        return im
                except (SyntaxError, IndexError, TypeError, struct.error) as e:
                    if WARN_POSSIBLE_FORMATS:
                        warning_messages.append(i + " opening failed. " + 
str(e))
                except BaseException:
                    if exclusive_fp:
                        fp.close()
                    raise
            return None
im = _open_core(fp, filename, prefix, formats) if im is None and formats is ID:
            checked_formats = ID.copy()
            if init():
                im = _open_core(
                    fp,
                    filename,
                    prefix,
                    tuple(format for format in formats if format not in 
checked_formats),
                )
if im:
            im._exclusive_fp = exclusive_fp
            return im
if exclusive_fp:
            fp.close()
        for message in warning_messages:
            warnings.warn(message)
        msg = "cannot identify image file %r" % (filename if filename else fp)
      raise UnidentifiedImageError(msg)
E       PIL.UnidentifiedImageError: cannot identify image file 
'/tmp/tmp_u3jlalf.png'

/usr/lib/python3/dist-packages/PIL/Image.py:3498: UnidentifiedImageError
----------------------------- Captured stderr call -----------------------------

(gnome-screenshot:45457): GLib-GIO-CRITICAL **: 05:17:55.263: 
g_dbus_connection_call_sync_internal: assertion 'G_IS_DBUS_CONNECTION 
(connection)' failed
** Message: 05:17:55.263: Unable to use GNOME Shell's builtin screenshot 
interface, resorting to fallback X11.
_____________________ TestGeneral.test_screenshot_regions ______________________

bbox = None, include_layered_windows = False, all_screens = False
xdisplay = None

    def grab(
        bbox: tuple[int, int, int, int] | None = None,
        include_layered_windows: bool = False,
        all_screens: bool = False,
        xdisplay: str | None = None,
    ) -> Image.Image:
        im: Image.Image
        if xdisplay is None:
            if sys.platform == "darwin":
                fh, filepath = tempfile.mkstemp(".png")
                os.close(fh)
                args = ["screencapture"]
                if bbox:
                    left, top, right, bottom = bbox
                    args += ["-R", f"{left},{top},{right-left},{bottom-top}"]
                subprocess.call(args + ["-x", filepath])
                im = Image.open(filepath)
                im.load()
                os.unlink(filepath)
                if bbox:
                    im_resized = im.resize((right - left, bottom - top))
                    im.close()
                    return im_resized
                return im
            elif sys.platform == "win32":
                offset, size, data = Image.core.grabscreen_win32(
                    include_layered_windows, all_screens
                )
                im = Image.frombytes(
                    "RGB",
                    size,
                    data,
                    # RGB, 32-bit line padding, origin lower left corner
                    "raw",
                    "BGR",
                    (size[0] * 3 + 3) & -4,
                    -1,
                )
                if bbox:
                    x0, y0 = offset
                    left, top, right, bottom = bbox
                    im = im.crop((left - x0, top - y0, right - x0, bottom - y0))
                return im
        # Cast to Optional[str] needed for Windows and macOS.
        display_name: str | None = xdisplay
        try:
            if not Image.core.HAVE_XCB:
                msg = "Pillow was built without XCB support"
                raise OSError(msg)
          size, data = Image.core.grabscreen_x11(display_name)
E           OSError: unsupported bit depth: 16

/usr/lib/python3/dist-packages/PIL/ImageGrab.py:78: OSError

During handling of the above exception, another exception occurred:

self = <test_pyscreeze.TestGeneral testMethod=test_screenshot_regions>

    def test_screenshot_regions(self):
      im = pyscreeze.screenshot(TEMP_FILENAME, region=(0, 0, 100, 150))

/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyscreeze/build/tests/test_pyscreeze.py:151:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyscreeze/build/pyscreeze/__init__.py:603:
 in _screenshot_linux
    im = ImageGrab.grab()  # use Pillow's grab() for Pillow 9.2.0 and later.
/usr/lib/python3/dist-packages/PIL/ImageGrab.py:88: in grab
    im = Image.open(filepath)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

fp = <_io.BufferedReader name='/tmp/tmpx_2kn5bg.png'>, mode = 'r'
formats = ['BMP', 'DIB', 'GIF', 'JPEG', 'PPM', 'PNG', ...]

    def open(
        fp: StrOrBytesPath | IO[bytes],
        mode: Literal["r"] = "r",
        formats: list[str] | tuple[str, ...] | None = None,
    ) -> ImageFile.ImageFile:
        """
        Opens and identifies the given image file.
This is a lazy operation; this function identifies the file, but
        the file remains open and the actual image data is not read from
        the file until you try to process the data (or call the
        :py:meth:`~PIL.Image.Image.load` method).  See
        :py:func:`~PIL.Image.new`. See :ref:`file-handling`.
:param fp: A filename (string), os.PathLike object or a file object.
           The file object must implement ``file.read``,
           ``file.seek``, and ``file.tell`` methods,
           and be opened in binary mode. The file object will also seek to zero
           before reading.
        :param mode: The mode.  If given, this argument must be "r".
        :param formats: A list or tuple of formats to attempt to load the file 
in.
           This can be used to restrict the set of formats checked.
           Pass ``None`` to try all supported formats. You can print the set of
           available formats by running ``python3 -m PIL`` or using
           the :py:func:`PIL.features.pilinfo` function.
        :returns: An :py:class:`~PIL.Image.Image` object.
        :exception FileNotFoundError: If the file cannot be found.
        :exception PIL.UnidentifiedImageError: If the image cannot be opened and
           identified.
        :exception ValueError: If the ``mode`` is not "r", or if a ``StringIO``
           instance is used for ``fp``.
        :exception TypeError: If ``formats`` is not ``None``, a list or a tuple.
        """
if mode != "r":
            msg = f"bad mode {repr(mode)}"  # type: ignore[unreachable]
            raise ValueError(msg)
        elif isinstance(fp, io.StringIO):
            msg = (  # type: ignore[unreachable]
                "StringIO cannot be used to open an image. "
                "Binary data must be used instead."
            )
            raise ValueError(msg)
if formats is None:
            formats = ID
        elif not isinstance(formats, (list, tuple)):
            msg = "formats must be a list or tuple"  # type: ignore[unreachable]
            raise TypeError(msg)
exclusive_fp = False
        filename: str | bytes = ""
        if is_path(fp):
            filename = os.path.realpath(os.fspath(fp))
if filename:
            fp = builtins.open(filename, "rb")
            exclusive_fp = True
        else:
            fp = cast(IO[bytes], fp)
try:
            fp.seek(0)
        except (AttributeError, io.UnsupportedOperation):
            fp = io.BytesIO(fp.read())
            exclusive_fp = True
prefix = fp.read(16) preinit() warning_messages: list[str] = [] def _open_core(
            fp: IO[bytes],
            filename: str | bytes,
            prefix: bytes,
            formats: list[str] | tuple[str, ...],
        ) -> ImageFile.ImageFile | None:
            for i in formats:
                i = i.upper()
                if i not in OPEN:
                    init()
                try:
                    factory, accept = OPEN[i]
                    result = not accept or accept(prefix)
                    if isinstance(result, str):
                        warning_messages.append(result)
                    elif result:
                        fp.seek(0)
                        im = factory(fp, filename)
                        _decompression_bomb_check(im.size)
                        return im
                except (SyntaxError, IndexError, TypeError, struct.error) as e:
                    if WARN_POSSIBLE_FORMATS:
                        warning_messages.append(i + " opening failed. " + 
str(e))
                except BaseException:
                    if exclusive_fp:
                        fp.close()
                    raise
            return None
im = _open_core(fp, filename, prefix, formats) if im is None and formats is ID:
            checked_formats = ID.copy()
            if init():
                im = _open_core(
                    fp,
                    filename,
                    prefix,
                    tuple(format for format in formats if format not in 
checked_formats),
                )
if im:
            im._exclusive_fp = exclusive_fp
            return im
if exclusive_fp:
            fp.close()
        for message in warning_messages:
            warnings.warn(message)
        msg = "cannot identify image file %r" % (filename if filename else fp)
      raise UnidentifiedImageError(msg)
E       PIL.UnidentifiedImageError: cannot identify image file 
'/tmp/tmpx_2kn5bg.png'

/usr/lib/python3/dist-packages/PIL/Image.py:3498: UnidentifiedImageError
----------------------------- Captured stderr call -----------------------------

(gnome-screenshot:45467): GLib-GIO-CRITICAL **: 05:17:55.437: 
g_dbus_connection_call_sync_internal: assertion 'G_IS_DBUS_CONNECTION 
(connection)' failed
** Message: 05:17:55.437: Unable to use GNOME Shell's builtin screenshot 
interface, resorting to fallback X11.
=========================== short test summary info ============================
FAILED tests/test_pyscreeze.py::TestGeneral::test_screenshot - PIL.Unidentifi...
FAILED tests/test_pyscreeze.py::TestGeneral::test_screenshot_regions - PIL.Un...
========================= 2 failed, 10 passed in 0.44s =========================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd 
'/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyscreeze/build'; python3.12 -m pytest 
tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.12 
returned exit code 13
make: *** [debian/rules:7: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

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

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 could not 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 affects, so that this is still visible in the BTS web
page for this package.


Note: This happens 100% of the time on AWS instances of type m7a.medium
and r7a.medium.

I plan to disable the offending tests, at least until somebody is willing
to debug the failure. Same for #1085110 in pyautogui.

Thanks.

--- End Message ---
--- Begin Message ---
Source: pyscreeze
Source-Version: 0.0~git20240820225245.93f2775-5
Done: Santiago Vila <[email protected]>

We believe that the bug you reported is fixed in the latest version of
pyscreeze, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <[email protected]> (supplier of updated pyscreeze 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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 20 Nov 2024 11:44:00 +0100
Source: pyscreeze
Architecture: source
Version: 0.0~git20240820225245.93f2775-5
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <[email protected]>
Changed-By: Santiago Vila <[email protected]>
Closes: 1087901
Changes:
 pyscreeze (0.0~git20240820225245.93f2775-5) unstable; urgency=medium
 .
   * Team upload.
   * Disable flaky tests. Closes: #1087901.
   * Set upstream metadata fields.
   * Update Standards-Version.
   * Add Vcs-* fields.
Checksums-Sha1:
 ef6d057bf0b200d0dc87a576b6db0ac9bd187f99 1974 
pyscreeze_0.0~git20240820225245.93f2775-5.dsc
 1e61f709a1aeafe96eb7ff229d521733552f2aa8 3608 
pyscreeze_0.0~git20240820225245.93f2775-5.debian.tar.xz
 8d29d02d80c83318b116e9a3fbe84393d5517c74 7246 
pyscreeze_0.0~git20240820225245.93f2775-5_source.buildinfo
Checksums-Sha256:
 c0eddd7866f07d42092ecc6da2b307e761c4ffab92858a87c682e41b2f10457b 1974 
pyscreeze_0.0~git20240820225245.93f2775-5.dsc
 bf80d534e7a89ba6b8c711b3e3b38c5fb8840406d128a28df1e6b00de8c3c960 3608 
pyscreeze_0.0~git20240820225245.93f2775-5.debian.tar.xz
 18ae0804f6640964898647d434824aaeb54f888be242ca86180c577e4d858e4b 7246 
pyscreeze_0.0~git20240820225245.93f2775-5_source.buildinfo
Files:
 412be46ff19af5d3ead09d5a399dcf32 1974 python optional 
pyscreeze_0.0~git20240820225245.93f2775-5.dsc
 a1ba6c323f85b3903426c9dfed226c10 3608 python optional 
pyscreeze_0.0~git20240820225245.93f2775-5.debian.tar.xz
 935ac6ce55d2c85793c1db86ee6b0244 7246 python optional 
pyscreeze_0.0~git20240820225245.93f2775-5_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE1Uw7+v+wQt44LaXXQc5/C58bizIFAmc9waMACgkQQc5/C58b
izI2qAf/cDfw0nEw0MYMNha0aQX/Bv/2Simxo9pSf+EslbyIH2es5pHk9VqP6NFF
Piwm2QRbea3/Dko9hIUK0+KpRpaz/g7aPweYmMJqHWHMihS82Z1S3Lj8gSI5UACs
J0Mcs+223FnyMquxDr+NvDTXU6wU2o6nzSBzrvtf9yK0njY+w/NLSEtRiaes4jlh
vX3o24SAqLsLvWLsqWjczcDdmu2bG0ruP0/3skvLVMT1K2Nupou39p26n2+kh7Yh
ysuhxhjOceG53Ev6LRJJ6JO5LU13Txpfzs34gzMW8ZlFj+W1YT3geZfWzNz3eABU
7UrNLr5ep7JugJKzJHKGqe2R/BqVCg==
=6nEW
-----END PGP SIGNATURE-----

Attachment: pgpaO24P19NWM.pgp
Description: PGP signature


--- End Message ---

Reply via email to