qemu-e2k/python/qemu/aqmp
John Snow b0b662bb2b python/aqmp: add socket bind step to legacy.py
The synchronous QMP library would bind to the server address during
__init__(). The new library delays this to the accept() call, because
binding occurs inside of the call to start_[unix_]server(), which is an
async method -- so it cannot happen during __init__ anymore.

Python 3.7+ adds the ability to create the server (and thus the bind()
call) and begin the active listening in separate steps, but we don't
have that functionality in 3.6, our current minimum.

Therefore ... Add a temporary workaround that allows the synchronous
version of the client to bind the socket in advance, guaranteeing that
there will be a UNIX socket in the filesystem ready for the QEMU client
to connect to without a race condition.

(Yes, it's a bit ugly. Fixing it more nicely will have to wait until our
minimum Python version is 3.7+.)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 20220201041134.1237016-5-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2022-02-02 14:12:22 -05:00
..
__init__.py python/aqmp: rename AQMPError to QMPError 2022-01-21 16:01:31 -05:00
aqmp_tui.py python/aqmp: use absolute import statement 2022-01-10 18:22:33 -05:00
error.py python/aqmp: rename AQMPError to QMPError 2022-01-21 16:01:31 -05:00
events.py python/aqmp: rename AQMPError to QMPError 2022-01-21 16:01:31 -05:00
legacy.py python/aqmp: add socket bind step to legacy.py 2022-02-02 14:12:22 -05:00
message.py python/aqmp: add QMP Message format 2021-09-27 12:10:29 -04:00
models.py python/aqmp: Add dict conversion method to Greeting object 2021-10-12 12:22:10 -04:00
protocol.py python/aqmp: add socket bind step to legacy.py 2022-02-02 14:12:22 -05:00
py.typed python/aqmp: add asynchronous QMP (AQMP) subpackage 2021-09-27 12:10:27 -04:00
qmp_client.py python/aqmp: Fix negotiation with pre-"oob" QEMU 2022-02-02 14:12:22 -05:00
qmp_shell.py python: move qmp-shell under the AQMP package 2022-01-21 16:01:31 -05:00
util.py python/aqmp: add asyncio_run compatibility wrapper 2021-09-27 12:10:29 -04:00