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=-7.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 7B4BFC07E95 for ; Tue, 20 Jul 2021 18:03:28 +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 0FE5460FE4 for ; Tue, 20 Jul 2021 18:03:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FE5460FE4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5u5X-0003Z6-6z for qemu-devel@archiver.kernel.org; Tue, 20 Jul 2021 14:03:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5u4S-0001hT-9U for qemu-devel@nongnu.org; Tue, 20 Jul 2021 14:02:20 -0400 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]:34520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5u4Q-0007Vz-AU for qemu-devel@nongnu.org; Tue, 20 Jul 2021 14:02:20 -0400 Received: by mail-io1-xd2a.google.com with SMTP id g22so25007664iom.1 for ; Tue, 20 Jul 2021 11:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lmzfQfJMjjD+gdFOX7Otl3JCUiM/oTfjSkiwPqY+v4w=; b=s6PS+WsE1r+2fkV0iKyNFVsTlX1s23jKPn6bJwMzy+jG5aX9Gss/PzSNLdt5T9aoI0 d7yk0YoqxffADas8S5U3ueiFkfZ6oYym6j3ImfotC345yzMnVDnlNsDNnVKX8LZaS7F2 qZx4/Yuy6KFE/2Dmx0T5ipvfMKybFSyD/WEJ4G6qPgup5ILM1AoaFp58SX+o6B3PU/Ue PPz4djg6n+cgbIG5ocSrSP5PyvC4oMv8rtds2L5M60RgihuIiZ25OQQNz2XEJEnh1YCL OuJurFt1rvB7Im8TFpc8/Lo8TGiQl7ufMcdMzAPCfY6YOVUzG6Cw5OkYD27CliWio5p9 Rp1w== 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=lmzfQfJMjjD+gdFOX7Otl3JCUiM/oTfjSkiwPqY+v4w=; b=Ees9cDEFDAZqhTyAbSr2VGzYU4tmkFD4LaPynrS7A2kJO3somM5H+quMl5GX6uY3oW SNZZSeKNwtKdMnsuvqrtLyOvrOQG4SAtf6FMIATBVN4U9UP3Y/4n7u5X4X/Rh8u/GjFy XLxAzjArdWMlFwp0SRT2/u1nKANWuiT9/LIVQKYlIchDwClahpQxfOnRSCSwwdfrVoy2 9lhnS3Qu1n1+oqWWKfsUnn5NU3g6RQ54i5ItXHCRIW65YmfGLabraBNwPQ8FBFznGmFu /K4FFChoXx3g+gQC3b11+F/K2nrk2FJ0VAQHD/V0mOFZjPI7oSlD+IVHhG3IA07JIOcA Q7wQ== X-Gm-Message-State: AOAM533PBjG8ip9IFEnUcx6cPAPiS7nCQmG+2YvjaQ1WrGrxd0SMMyyp 0IfSvUQzJs50zpkyKSVSPDLOfYQXlQytFnA7CUs= X-Google-Smtp-Source: ABdhPJx5B+suYoSAn9li2lhnFiQRsxxOm8TA/Ut46duhTZk0TMoIfHAZiG/dex8ytgmd73hzmgP27kkUDLZLECmvWOY= X-Received: by 2002:a6b:1406:: with SMTP id 6mr23998987iou.25.1626804134686; Tue, 20 Jul 2021 11:02:14 -0700 (PDT) MIME-Version: 1.0 References: <20210713220734.26302-1-niteesh.gs@gmail.com> <20210713220734.26302-4-niteesh.gs@gmail.com> In-Reply-To: From: "Niteesh G. S." Date: Tue, 20 Jul 2021 23:31:48 +0530 Message-ID: Subject: Re: [PATCH v2 3/6] python/aqmp-tui: Add AQMP TUI draft To: John Snow Content-Type: multipart/alternative; boundary="00000000000091342105c791da7d" Received-SPF: pass client-ip=2607:f8b0:4864:20::d2a; envelope-from=niteesh.gs@gmail.com; helo=mail-io1-xd2a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" --00000000000091342105c791da7d Content-Type: text/plain; charset="UTF-8" On Tue, Jul 20, 2021 at 11:27 PM John Snow wrote: > > > 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. > Ah sorry, messed up while rebasing. I'll send a v3 fixing this(and other upcoming comments) and will also rebase on top of AQMP v2. > > --00000000000091342105c791da7d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Jul 20, 2021 at 11:27 PM John Snow <jsnow@redhat.com> = wrote:


On Tue, Jul 13, 2021 at 6:07 PM G S Niteesh B= abu <niteesh.g= s@gmail.com> 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.
Ah sorry, messed up while = rebasing. I'll send a v3 fixing this(and other upcoming comments)
and wil= l also rebase on top of=C2=A0AQMP v2. = =C2=A0
=C2=A0
--00000000000091342105c791da7d--