From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F63FC636C8 for ; Tue, 20 Jul 2021 17:58:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C97CA61029 for ; Tue, 20 Jul 2021 17:58:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C97CA61029 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5u1A-0004M5-10 for qemu-devel@archiver.kernel.org; Tue, 20 Jul 2021 13:58:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5tzh-0001z5-M0 for qemu-devel@nongnu.org; Tue, 20 Jul 2021 13:57:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5tzf-0004F0-KY for qemu-devel@nongnu.org; Tue, 20 Jul 2021 13:57:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626803842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QxggCNDmv+kFwKeXlEIxk9JE5ThZEbzVMW9mmrKjRHY=; b=I1JOcjeQkA3LOLQZOo1RKhxZA2OoURAnogaB7wKc3HLsds8CSlNZVprtt70iY8H53KyPPj N0wD1pJOHba3sIKgeJHq7o0SCGy4b/DIknhHoeDQFq2+mUscEmht3rl4aaabnjhFLbbYt8 xYar1uV2R8PaGnk5r+YYdym+H0dFYRg= Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-530-2E8sK7syNNOcHbSm9gnnTg-1; Tue, 20 Jul 2021 13:57:17 -0400 X-MC-Unique: 2E8sK7syNNOcHbSm9gnnTg-1 Received: by mail-oi1-f197.google.com with SMTP id 11-20020aca0d0b0000b029025c8b99a102so20128oin.12 for ; Tue, 20 Jul 2021 10:57:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QxggCNDmv+kFwKeXlEIxk9JE5ThZEbzVMW9mmrKjRHY=; b=XsbhG9j5EY3t9gZoEUaBzu01uhBFy/apu3ZE1Gvsn7LO04jnataZYvSAc2KPtvGGqX hMs96Pu8z2Q7JVApPKmWxa7hy5K0YGN9sWlZ/lv/DkiiyqdDkkHLbnrHROp5WS1cBfMo ujUu586iSdZ232wLaBMWATPiwFfBtCN7l0PVieS0fuQNJmRlEeg1zuBgVHlV9Hq3eO0g C+K8zeL3Q+8UL1kh6YdbyeXs4ygACLMN3tddCTD6vnE/LBs9Lxqz+D1E22L2vBXBG7Mx 2F+3l8T8oY1SpTcR4x284LVlcAHXgAp1SjcpNrPKjqblWkCR++k6QxQ3IjKlyI0GKaeH PEcg== X-Gm-Message-State: AOAM531BgYHr0tW12hdUpQmrzU5Jj0ReylRhbMX6mxSM08UD+3BZr1Fg Oz5eBCaTRpiHuGqL+aEqc17U7yPwQ76GCGo0D6dG6ssSNWZsBXCGNj2W6549J+weNkPRJbLTE6Z HoEumkyjhTkPjj/iTDPt+7eSjh+xYV24= X-Received: by 2002:a9d:86d:: with SMTP id 100mr23747604oty.45.1626803837286; Tue, 20 Jul 2021 10:57:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoB0xeqrKnrwofeHYCXOqWj4Pp/gDrgEchZ9xv/NILC7+zjlMtqwIlQ1yWwZblXK/Pkc3mHXL8sY3oP4cCRoA= X-Received: by 2002:a9d:86d:: with SMTP id 100mr23747592oty.45.1626803837115; Tue, 20 Jul 2021 10:57:17 -0700 (PDT) MIME-Version: 1.0 References: <20210713220734.26302-1-niteesh.gs@gmail.com> <20210713220734.26302-4-niteesh.gs@gmail.com> In-Reply-To: <20210713220734.26302-4-niteesh.gs@gmail.com> From: John Snow Date: Tue, 20 Jul 2021 13:57:06 -0400 Message-ID: Subject: Re: [PATCH v2 3/6] python/aqmp-tui: Add AQMP TUI draft To: G S Niteesh Babu Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000d4b21105c791c8f9" Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) DKIMWL_WL_HIGH=-1.474, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cleber Rosa , qemu-devel , Eduardo Habkost Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000d4b21105c791c8f9 Content-Type: text/plain; charset="UTF-8" On Tue, Jul 13, 2021 at 6:07 PM G S Niteesh Babu wrote: > Added a draft of AQMP TUI. > > Implements the follwing basic features: > 1) Command transmission/reception. > 2) Shows events asynchronously. > 3) Shows server status in the bottom status bar. > > Also added necessary pylint, mypy configurations > > Signed-off-by: G S Niteesh Babu > --- > python/qemu/aqmp/aqmp_tui.py | 332 +++++++++++++++++++++++++++++++++++ > python/setup.cfg | 21 ++- > 2 files changed, 352 insertions(+), 1 deletion(-) > create mode 100644 python/qemu/aqmp/aqmp_tui.py > > diff --git a/python/qemu/aqmp/aqmp_tui.py b/python/qemu/aqmp/aqmp_tui.py > new file mode 100644 > index 0000000000..f853efc1f5 > --- /dev/null > +++ b/python/qemu/aqmp/aqmp_tui.py > @@ -0,0 +1,332 @@ > +# Copyright (c) 2021 > +# > +# Authors: > +# Niteesh Babu G S > +# > +# This work is licensed under the terms of the GNU GPL, version 2 or > +# later. See the COPYING file in the top-level directory. > + > +import argparse > +import asyncio > +import logging > +from logging import Handler > +import signal > + > +import urwid > +import urwid_readline > + > +from .error import MultiException > +from .protocol import ConnectError > +from .qmp_protocol import QMP, ExecInterruptedError, ExecuteError > +from .util import create_task, pretty_traceback > + > + > +UPDATE_MSG = 'UPDATE_MSG' > + > +# Using root logger to enable all loggers under qemu and asyncio > +LOGGER = logging.getLogger() > + > +palette = [ > + (Token.Punctuation, '', '', '', 'h15,bold', 'g7'), > + (Token.Text, '', '', '', '', 'g7'), > + (Token.Name.Tag, '', '', '', 'bold,#f88', 'g7'), > + (Token.Literal.Number.Integer, '', '', '', '#fa0', 'g7'), > + (Token.Literal.String.Double, '', '', '', '#6f6', 'g7'), > + (Token.Keyword.Constant, '', '', '', '#6af', 'g7'), > + ('background', '', 'black', '', '', 'g7'), > +] > + > It looks like this bled forward, this part belongs in the next patch. Can you fix this and re-send? jsnow@scv ~/s/q/python (review)> make check-dev ACTIVATE .dev-venv make[1]: Entering directory '/home/jsnow/src/qemu/python' JOB ID : f766a463cfc6bd3f0d6286e0653752bb8bc5ea6f JOB LOG : /home/jsnow/avocado/job-results/job-2021-07-20T13.55-f766a46/job.log (1/4) tests/flake8.sh: FAIL: Exited with status: '1' (0.36 s) (2/4) tests/isort.sh: PASS (0.11 s) (3/4) tests/mypy.sh: FAIL: Exited with status: '1' (0.36 s) (4/4) tests/pylint.sh: FAIL: Exited with status: '2' (6.62 s) RESULTS : PASS 1 | ERROR 0 | FAIL 3 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 7.80 s Log file "stdout" content for test "1-tests/flake8.sh" (FAIL): qemu/aqmp/aqmp_tui.py:30:6: F821 undefined name 'Token' qemu/aqmp/aqmp_tui.py:31:6: F821 undefined name 'Token' qemu/aqmp/aqmp_tui.py:32:6: F821 undefined name 'Token' qemu/aqmp/aqmp_tui.py:33:6: F821 undefined name 'Token' qemu/aqmp/aqmp_tui.py:34:6: F821 undefined name 'Token' qemu/aqmp/aqmp_tui.py:35:6: F821 undefined name 'Token' qemu/aqmp/aqmp_tui.py:138:21: F821 undefined name 'lexers' While you're at it, you might as well rebase on top of AQMP v2. --000000000000d4b21105c791c8f9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Jul 13, 2021 at 6:07 PM G S N= iteesh Babu <niteesh.gs@gmail.co= m> wrote:
Added a draft of AQMP TUI.

Implements the follwing basic features:
1) Command transmission/reception.
2) Shows events asynchronously.
3) Shows server status in the bottom status bar.

Also added necessary pylint, mypy configurations

Signed-off-by: G S Niteesh Babu <niteesh.gs@gmail.com>
---
=C2=A0python/qemu/aqmp/aqmp_tui.py | 332 ++++++++++++++++++++++++++++++++++= +
=C2=A0python/setup.cfg=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= =A0 21 ++-
=C2=A02 files changed, 352 insertions(+), 1 deletion(-)
=C2=A0create mode 100644 python/qemu/aqmp/aqmp_tui.py

diff --git a/python/qemu/aqmp/aqmp_tui.py b/python/qemu/aqmp/aqmp_tui.py new file mode 100644
index 0000000000..f853efc1f5
--- /dev/null
+++ b/python/qemu/aqmp/aqmp_tui.py
@@ -0,0 +1,332 @@
+# Copyright (c) 2021
+#
+# Authors:
+#=C2=A0 Niteesh Babu G S <niteesh.gs@gmail.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later.=C2=A0 See the COPYING file in the top-level directory.
+
+import argparse
+import asyncio
+import logging
+from logging import Handler
+import signal
+
+import urwid
+import urwid_readline
+
+from .error import MultiException
+from .protocol import ConnectError
+from .qmp_protocol import QMP, ExecInterruptedError, ExecuteError
+from .util import create_task, pretty_traceback
+
+
+UPDATE_MSG =3D 'UPDATE_MSG'
+
+# Using root logger to enable all loggers under qemu and asyncio
+LOGGER =3D logging.getLogger()
+
+palette =3D [
+=C2=A0 =C2=A0 (Token.Punctuation, '', '', '', '= ;h15,bold', 'g7'),
+=C2=A0 =C2=A0 (Token.Text, '', '', '', '',= 'g7'),
+=C2=A0 =C2=A0 (Token.Name.Tag, '', '', '', 'bo= ld,#f88', 'g7'),
+=C2=A0 =C2=A0 (Token.Literal.Number.Integer, '', '', '= ', '#fa0', 'g7'),
+=C2=A0 =C2=A0 (Token.Literal.String.Double, '', '', '&= #39;, '#6f6', 'g7'),
+=C2=A0 =C2=A0 (Token.Keyword.Constant, '', '', '',= '#6af', 'g7'),
+=C2=A0 =C2=A0 ('background', '', 'black', '= 9;, '', 'g7'),
+]
+

It looks like this bled forward,= this part belongs in the next patch. Can you fix this and re-send?

jsnow@scv ~/s/q/python (review)> make check-dev
ACT= IVATE .dev-venv
make[1]: Entering directory '/home/jsnow/src/qemu/py= thon'
JOB ID =C2=A0 =C2=A0 : f766a463cfc6bd3f0d6286e0653752bb8bc5ea6= f
JOB LOG =C2=A0 =C2=A0: /home/jsnow/avocado/job-results/job-2021-07-20T= 13.55-f766a46/job.log
=C2=A0(1/4) tests/flake8.sh: FAIL: Exited with sta= tus: '1' (0.36 s)
=C2=A0(2/4) tests/isort.sh: PASS (0.11 s)
= =C2=A0(3/4) tests/mypy.sh: FAIL: Exited with status: '1' (0.36 s)=C2=A0(4/4) tests/pylint.sh: FAIL: Exited with status: '2' (6.62 = s)
RESULTS =C2=A0 =C2=A0: PASS 1 | ERROR 0 | FAIL 3 | SKIP 0 | WARN 0 | = INTERRUPT 0 | CANCEL 0
JOB TIME =C2=A0 : 7.80 s
Log file "stdout= " content for test "1-tests/flake8.sh" (FAIL):
qemu/aqmp/= aqmp_tui.py:30:6: F821 undefined name 'Token'
qemu/aqmp/aqmp_tui= .py:31:6: F821 undefined name 'Token'
qemu/aqmp/aqmp_tui.py:32:6= : F821 undefined name 'Token'
qemu/aqmp/aqmp_tui.py:33:6: F821 u= ndefined name 'Token'
qemu/aqmp/aqmp_tui.py:34:6: F821 undefined= name 'Token'
qemu/aqmp/aqmp_tui.py:35:6: F821 undefined name &#= 39;Token'
qemu/aqmp/aqmp_tui.py:138:21: F821 undefined name 'lex= ers'

While you're at it, you might as well= rebase on top of AQMP v2.
=C2=A0
--000000000000d4b21105c791c8f9--