From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
John Snow <jsnow@redhat.com>,
"Niteesh G . S ." <niteesh.gs@gmail.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Cleber Rosa <crosa@redhat.com>
Subject: [PATCH v3 02/19] python/qmp: Fix type of SocketAddrT
Date: Wed, 2 Jun 2021 20:37:02 -0400 [thread overview]
Message-ID: <20210603003719.1321369-3-jsnow@redhat.com> (raw)
In-Reply-To: <20210603003719.1321369-1-jsnow@redhat.com>
In porting the qom tools, qmp-shell, etc; it becomes evident that this
type is wrong.
This is an integer, not a string. We didn't catch this before because
none of QEMUMonitorProtocol's *users* happen to be checked, and the
internal logic of this class is otherwise self-consistent. Additionally,
mypy was not introspecting into the socket() interface to realize we
were passing a bad type for AF_INET. Fixed now.
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/qmp/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/qemu/qmp/__init__.py b/python/qemu/qmp/__init__.py
index 9606248a3d2..5fb970f8a80 100644
--- a/python/qemu/qmp/__init__.py
+++ b/python/qemu/qmp/__init__.py
@@ -44,7 +44,7 @@
QMPMessage = Dict[str, Any]
QMPReturnValue = Dict[str, Any]
-InternetAddrT = Tuple[str, str]
+InternetAddrT = Tuple[str, int]
UnixAddrT = str
SocketAddrT = Union[InternetAddrT, UnixAddrT]
--
2.31.1
next prev parent reply other threads:[~2021-06-03 0:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 0:37 [PATCH v3 00/19] Python: move /scripts/qmp/qom* to /python/qemu/qmp/qom* John Snow
2021-06-03 0:37 ` [PATCH v3 01/19] python/pipenv: Update Pipfile.lock John Snow
2021-06-03 0:37 ` John Snow [this message]
2021-06-03 7:07 ` [PATCH v3 02/19] python/qmp: Fix type of SocketAddrT Philippe Mathieu-Daudé
2021-06-03 0:37 ` [PATCH v3 03/19] python/qmp: add parse_address classmethod John Snow
2021-06-03 0:37 ` [PATCH v3 04/19] python/qmp: Add qom script rewrites John Snow
2021-06-03 0:37 ` [PATCH v3 05/19] python/qmp: add qom script entry points John Snow
2021-06-03 0:37 ` [PATCH v3 06/19] scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/ John Snow
2021-06-03 0:37 ` [PATCH v3 07/19] scripts/qom-fuse: apply isort rules John Snow
2021-06-03 0:37 ` [PATCH v3 08/19] scripts/qom-fuse: apply flake8 rules John Snow
2021-06-03 7:08 ` Philippe Mathieu-Daudé
2021-06-03 0:37 ` [PATCH v3 09/19] python: Add 'fh' to known-good variable names John Snow
2021-06-03 0:37 ` [PATCH v3 10/19] scripts/qom-fuse: Apply pylint rules John Snow
2021-06-03 0:37 ` [PATCH v3 11/19] scripts/qom-fuse: Add docstrings John Snow
2021-06-03 0:37 ` [PATCH v3 12/19] scripts/qom-fuse: Convert to QOMCommand John Snow
2021-06-03 0:37 ` [PATCH v3 13/19] scripts/qom-fuse: use QOMCommand.qom_list() John Snow
2021-06-03 7:09 ` Philippe Mathieu-Daudé
2021-06-03 0:37 ` [PATCH v3 14/19] scripts/qom-fuse: ensure QOMFuse.read always returns bytes John Snow
2021-06-03 0:37 ` [PATCH v3 15/19] scripts/qom-fuse: add static type hints John Snow
2021-06-03 0:37 ` [PATCH v3 16/19] python: add optional FUSE dependencies John Snow
2021-06-03 0:37 ` [PATCH v3 17/19] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py John Snow
2021-06-03 0:37 ` [PATCH v3 18/19] scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py John Snow
2021-06-03 0:37 ` [PATCH v3 19/19] python/qmp: add fuse command to 'qom' tools John Snow
2021-06-03 7:11 ` Philippe Mathieu-Daudé
2021-06-09 20:32 ` [PATCH v3 00/19] Python: move /scripts/qmp/qom* to /python/qemu/qmp/qom* John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210603003719.1321369-3-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=niteesh.gs@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).