Package: src:app-model
Version: 0.3.0-4
Severity: serious
Tags: ftbfs

Dear maintainer:

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

--------------------------------------------------------------------------------
[...]
 debian/rules binary
dh binary --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:129: Building wheel for python3.12 with "build" 
module
I: pybuild base:311: python3.12 -m build --skip-dependency-check --no-isolation --wheel 
--outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_app-model
* Building wheel...
Successfully built app_model-0.3.0-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with 
"installer" module
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_app-model/build; python3.12 -m pytest 
tests
============================= test session starts ==============================

[... snipped ...]

except OSError as e:
          raise NewConnectionError(
                self, f"Failed to establish a new connection: {e}"
            ) from e
E           urllib3.exceptions.NewConnectionError: 
<urllib3.connection.HTTPSConnection object at 0x7fbf83059100>: Failed to 
establish a new connection: [Errno 111] Connection refused

/usr/lib/python3/dist-packages/urllib3/connection.py:218: NewConnectionError

The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 203, in 
_new_conn
    sock = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 85, in 
create_connection
    raise err
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in 
create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 777, in 
urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1046, 
in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 611, in 
connect
    self.sock = sock = self._new_conn()
                       ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 218, in 
_new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object 
at 0x7fbf83059100>: Failed to establish a new connection: [Errno 111] Connection 
refused

The above exception was the direct cause of the following exception:

urllib3.exceptions.ProxyError: ('Unable to connect to proxy', 
NewConnectionError('<urllib3.connection.HTTPSConnection object at 
0x7fbf83059100>: Failed to establish a new connection: [Errno 111] Connection 
refused'))

The above exception was the direct cause of the following exception:

self = <requests.adapters.HTTPAdapter object at 0x7fbf83058890>
request = <PreparedRequest [GET]>, stream = False
timeout = Timeout(connect=None, read=None, total=None), verify = True
cert = None
proxies = OrderedDict({'no': 'localhost', 'https': 'https://127.0.0.1:9/', 
'http': 'http://127.0.0.1:9/'})

    def send(
        self, request, stream=False, timeout=None, verify=True, cert=None, 
proxies=None
    ):
        """Sends PreparedRequest object. Returns Response object.
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls 
whether
            we verify the server's TLS certificate, or a string, in which case 
it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the 
request.
        :rtype: requests.Response
        """
try:
            conn = self.get_connection_with_tls_context(
                request, verify, proxies=proxies, cert=cert
            )
        except LocationValueError as e:
            raise InvalidURL(e, request=request)
self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(
            request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies,
        )
chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError:
                raise ValueError(
                    f"Invalid timeout {timeout}. Pass a (connect, read) timeout 
tuple, "
                    f"or a single float to set both timeouts to the same value."
                )
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)
try:
          resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked,
            )

/usr/lib/python3/dist-packages/requests/adapters.py:667:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:845: in urlopen
    retries = retries.increment(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = Retry(total=0, connect=None, read=False, redirect=None, status=None)
method = 'GET', url = '/fa6-solid/undo.svg', response = None
error = ProxyError('Unable to connect to proxy', 
NewConnectionError('<urllib3.connection.HTTPSConnection object at 
0x7fbf83059100>: Failed to establish a new connection: [Errno 111] Connection 
refused'))
_pool = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fbf83058fb0>
_stacktrace = <traceback object at 0x7fbf82ec0540>

    def increment(
        self,
        method: str | None = None,
        url: str | None = None,
        response: BaseHTTPResponse | None = None,
        error: Exception | None = None,
        _pool: ConnectionPool | None = None,
        _stacktrace: TracebackType | None = None,
    ) -> Retry:
        """Return a new Retry object with incremented retry counters.
:param response: A response object, or None, if the server did not
            return a response.
        :type response: :class:`~urllib3.response.BaseHTTPResponse`
        :param Exception error: An error encountered during the request, or
            None if the response was received successfully.
:return: A new ``Retry`` object.
        """
        if self.total is False and error:
            # Disabled, indicate to re-raise the error.
            raise reraise(type(error), error, _stacktrace)
total = self.total
        if total is not None:
            total -= 1
connect = self.connect
        read = self.read
        redirect = self.redirect
        status_count = self.status
        other = self.other
        cause = "unknown"
        status = None
        redirect_location = None
if error and self._is_connection_error(error):
            # Connect retry?
            if connect is False:
                raise reraise(type(error), error, _stacktrace)
            elif connect is not None:
                connect -= 1
elif error and self._is_read_error(error):
            # Read retry?
            if read is False or method is None or not 
self._is_method_retryable(method):
                raise reraise(type(error), error, _stacktrace)
            elif read is not None:
                read -= 1
elif error:
            # Other retry?
            if other is not None:
                other -= 1
elif response and response.get_redirect_location():
            # Redirect retry?
            if redirect is not None:
                redirect -= 1
            cause = "too many redirects"
            response_redirect_location = response.get_redirect_location()
            if response_redirect_location:
                redirect_location = response_redirect_location
            status = response.status
else:
            # Incrementing because of a server error like a 500 in
            # status_forcelist and the given method is in the allowed_methods
            cause = ResponseError.GENERIC_ERROR
            if response and response.status:
                if status_count is not None:
                    status_count -= 1
                cause = 
ResponseError.SPECIFIC_ERROR.format(status_code=response.status)
                status = response.status
history = self.history + (
            RequestHistory(method, url, error, status, redirect_location),
        )
new_retry = self.new(
            total=total,
            connect=connect,
            read=read,
            redirect=redirect,
            status=status_count,
            other=other,
            history=history,
        )
if new_retry.is_exhausted():
            reason = error or ResponseError(cause)
          raise MaxRetryError(_pool, url, reason) from reason  # type: 
ignore[arg-type]
E           urllib3.exceptions.MaxRetryError: 
HTTPSConnectionPool(host='api.iconify.design', port=443): Max retries exceeded with 
url: /fa6-solid/undo.svg (Caused by ProxyError('Unable to connect to proxy', 
NewConnectionError('<urllib3.connection.HTTPSConnection object at 
0x7fbf83059100>: Failed to establish a new connection: [Errno 111] Connection 
refused')))

/usr/lib/python3/dist-packages/urllib3/util/retry.py:515: MaxRetryError

During handling of the above exception, another exception occurred:

self = <superqt.iconify.QIconifyIcon object at 0x7fbf832b75c0>, color = None
flip = None, rotate = None, dir = None

    def addKey(
        self,
        *key: str,
        color: str | None = None,
        flip: Flip | None = None,
        rotate: Rotation | None = None,
        dir: str | None = None,
        size: QSize | None = None,
        mode: QIcon.Mode = QIcon.Mode.Normal,
        state: QIcon.State = QIcon.State.Off,
    ) -> None:
        """Add an icon to this QIcon.
This is a variant of `QIcon.addFile` that uses an iconify icon keys and
        arguments instead of a file path.
Parameters
        ----------
        *key: str
            Icon set prefix and name. May be passed as a single string in the 
format
            `"prefix:name"` or as two separate strings: `'prefix', 'name'`.
        color : str, optional
            Icon color. If not provided, the icon will appear black (the icon 
fill color
            will be set to the string "currentColor").
        flip : str, optional
            Flip icon.  Must be one of "horizontal", "vertical", 
"horizontal,vertical"
        rotate : str | int, optional
            Rotate icon. Must be one of 0, 90, 180, 270, or 0, 1, 2, 3 
(equivalent to 0,
            90, 180, 270, respectively)
        dir : str, optional
            If 'dir' is not None, the file will be created in that directory, 
otherwise
            a default
            
[directory](https://docs.python.org/3/library/tempfile.html#tempfile.mkstemp)
            is used.
        size : QSize, optional
            Size specified for the icon, passed to `QIcon.addFile`.
        mode : QIcon.Mode, optional
            Mode specified for the icon, passed to `QIcon.addFile`.
        state : QIcon.State, optional
            State specified for the icon, passed to `QIcon.addFile`.
        """
        try:
          path = svg_path(*key, color=color, flip=flip, rotate=rotate, dir=dir)

/usr/lib/python3/dist-packages/superqt/iconify/__init__.py:128:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/pyconify/api.py:297: in svg_path
    svg_bytes = svg(
/usr/lib/python3/dist-packages/pyconify/api.py:202: in svg
    resp = requests.get(f"{ROOT}/{prefix}/{name}.svg", params=query_params)
/usr/lib/python3/dist-packages/requests/api.py:73: in get
    return request("get", url, params=params, **kwargs)
/usr/lib/python3/dist-packages/requests/api.py:59: in request
    return session.request(method=method, url=url, **kwargs)
/usr/lib/python3/dist-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
/usr/lib/python3/dist-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <requests.adapters.HTTPAdapter object at 0x7fbf83058890>
request = <PreparedRequest [GET]>, stream = False
timeout = Timeout(connect=None, read=None, total=None), verify = True
cert = None
proxies = OrderedDict({'no': 'localhost', 'https': 'https://127.0.0.1:9/', 
'http': 'http://127.0.0.1:9/'})

    def send(
        self, request, stream=False, timeout=None, verify=True, cert=None, 
proxies=None
    ):
        """Sends PreparedRequest object. Returns Response object.
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls 
whether
            we verify the server's TLS certificate, or a string, in which case 
it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the 
request.
        :rtype: requests.Response
        """
try:
            conn = self.get_connection_with_tls_context(
                request, verify, proxies=proxies, cert=cert
            )
        except LocationValueError as e:
            raise InvalidURL(e, request=request)
self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(
            request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies,
        )
chunked = not (request.body is None or "Content-Length" in request.headers) if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError:
                raise ValueError(
                    f"Invalid timeout {timeout}. Pass a (connect, read) timeout 
tuple, "
                    f"or a single float to set both timeouts to the same value."
                )
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)
try:
            resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked,
            )
except (ProtocolError, OSError) as err:
            raise ConnectionError(err, request=request)
except MaxRetryError as e:
            if isinstance(e.reason, ConnectTimeoutError):
                # TODO: Remove this in 3.0.0: see #2811
                if not isinstance(e.reason, NewConnectionError):
                    raise ConnectTimeout(e, request=request)
if isinstance(e.reason, ResponseError):
                raise RetryError(e, request=request)
if isinstance(e.reason, _ProxyError):
              raise ProxyError(e, request=request)
E               requests.exceptions.ProxyError: 
HTTPSConnectionPool(host='api.iconify.design', port=443): Max retries exceeded with 
url: /fa6-solid/undo.svg (Caused by ProxyError('Unable to connect to proxy', 
NewConnectionError('<urllib3.connection.HTTPSConnection object at 
0x7fbf83059100>: Failed to establish a new connection: [Errno 111] Connection 
refused')))

/usr/lib/python3/dist-packages/requests/adapters.py:694: ProxyError

During handling of the above exception, another exception occurred:

MenuCls = <class 'app_model.backends.qt._qmenu.QModelToolBar'>
qtbot = <pytestqt.qtbot.QtBot object at 0x7fbf830adc70>
full_app = Application('complete_test_app')

    @pytest.mark.parametrize("MenuCls", [QModelMenu, QModelToolBar])
    def test_menu_events(
        MenuCls: type[QModelMenu] | type[QModelToolBar], qtbot: QtBot, 
full_app: FullApp
    ) -> None:
        app = full_app
      menu = MenuCls(app.Menus.EDIT, app)

tests/test_qt/test_qmenu.py:148:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
app_model/backends/qt/_qmenu.py:193: in __init__
    self.rebuild()
app_model/backends/qt/_qmenu.py:238: in rebuild
    _rebuild(
app_model/backends/qt/_qmenu.py:323: in _rebuild
    action = QMenuItemAction.create(item, app=app, parent=menu)
app_model/backends/qt/_qaction.py:184: in create
    cls._cache[cache_key] = obj = cls(menu_item, app, parent)
app_model/backends/qt/_qaction.py:150: in __init__
    super().__init__(menu_item.command, app, parent)
app_model/backends/qt/_qaction.py:90: in __init__
    self.setIcon(to_qicon(command_rule.icon))
app_model/backends/qt/_util.py:22: in to_qicon
    return QIconifyIcon(icn)
/usr/lib/python3/dist-packages/superqt/iconify/__init__.py:84: in __init__
    self.addKey(*key, color=color, flip=flip, rotate=rotate, dir=dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <superqt.iconify.QIconifyIcon object at 0x7fbf832b75c0>, color = None
flip = None, rotate = None, dir = None

    def addKey(
        self,
        *key: str,
        color: str | None = None,
        flip: Flip | None = None,
        rotate: Rotation | None = None,
        dir: str | None = None,
        size: QSize | None = None,
        mode: QIcon.Mode = QIcon.Mode.Normal,
        state: QIcon.State = QIcon.State.Off,
    ) -> None:
        """Add an icon to this QIcon.
This is a variant of `QIcon.addFile` that uses an iconify icon keys and
        arguments instead of a file path.
Parameters
        ----------
        *key: str
            Icon set prefix and name. May be passed as a single string in the 
format
            `"prefix:name"` or as two separate strings: `'prefix', 'name'`.
        color : str, optional
            Icon color. If not provided, the icon will appear black (the icon 
fill color
            will be set to the string "currentColor").
        flip : str, optional
            Flip icon.  Must be one of "horizontal", "vertical", 
"horizontal,vertical"
        rotate : str | int, optional
            Rotate icon. Must be one of 0, 90, 180, 270, or 0, 1, 2, 3 
(equivalent to 0,
            90, 180, 270, respectively)
        dir : str, optional
            If 'dir' is not None, the file will be created in that directory, 
otherwise
            a default
            
[directory](https://docs.python.org/3/library/tempfile.html#tempfile.mkstemp)
            is used.
        size : QSize, optional
            Size specified for the icon, passed to `QIcon.addFile`.
        mode : QIcon.Mode, optional
            Mode specified for the icon, passed to `QIcon.addFile`.
        state : QIcon.State, optional
            State specified for the icon, passed to `QIcon.addFile`.
        """
        try:
            path = svg_path(*key, color=color, flip=flip, rotate=rotate, 
dir=dir)
        except OSError:
          warnings.warn(
                f"Unable to connect to internet, and icon {key} not cached.",
                stacklevel=2,
            )
E           UserWarning: Unable to connect to internet, and icon 
('fa6-solid:undo',) not cached.

/usr/lib/python3/dist-packages/superqt/iconify/__init__.py:130: UserWarning
=========================== short test summary info ============================
FAILED tests/test_qt/test_demos.py::test_qapp[qapplication.py] - ModuleNotFou...
FAILED tests/test_qt/test_demos.py::test_qapp[model_app.py] - UserWarning: Un...
FAILED tests/test_qt/test_demos.py::test_qapp[multi_file] - UserWarning: Unab...
FAILED tests/test_qt/test_qmainwindow.py::test_qmodel_main_window - KeyError:...
FAILED tests/test_qt/test_qmenu.py::test_menu[QModelMenu] - UserWarning: Unab...
FAILED tests/test_qt/test_qmenu.py::test_menu[QModelToolBar] - UserWarning: U...
FAILED tests/test_qt/test_qmenu.py::test_submenu - KeyError: "No plugin provi...
FAILED tests/test_qt/test_qmenu.py::test_menu_events[QModelMenu] - UserWarnin...
FAILED tests/test_qt/test_qmenu.py::test_menu_events[QModelToolBar] - UserWar...
=================== 9 failed, 881 passed, 1 skipped in 1.25s ===================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_app-model/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:5: binary] Error 25
dpkg-buildpackage: error: debian/rules binary 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/202410/

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.

Thanks.

Reply via email to