qemu-cr16/python/qemu/qmp
John Snow fd0ed46d4e python: backport 'qmp-tui: Do not crash if optional dependencies are not met'
Based on the discussion at https://github.com/pypa/pip/issues/9726 -
even though the setuptools documentation implies that it is possible to
guard script execution with optional dependency groups, this is not true
in practice with the scripts generated by pip.

Just do the simple thing and guard the import statements.

Signed-off-by: John Snow <jsnow@redhat.com>
cherry picked from commit python-qemu-qmp@df520dcacf9a75dd4c82ab1129768de4128b554c
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-09-15 14:36:01 -04:00
..
__init__.py python: rename qemu.aqmp to qemu.qmp 2022-04-21 11:01:00 -04:00
error.py python: backport 'Change error classes to have better repr methods' 2025-09-15 14:36:01 -04:00
events.py python: backport 'EventListener: add __repr__ method' 2025-09-15 14:36:01 -04:00
legacy.py python: backport 'kick event queue on legacy event_pull()' 2025-09-15 14:36:01 -04:00
message.py python: backport 'Change error classes to have better repr methods' 2025-09-15 14:36:01 -04:00
models.py docs/interop: Convert qmp-spec.txt to rST 2023-05-22 10:21:01 +02:00
protocol.py python: backport 'make require() preserve async-ness' 2025-09-15 14:36:01 -04:00
py.typed python: rename qemu.aqmp to qemu.qmp 2022-04-21 11:01:00 -04:00
qmp_client.py python: backport 'feat: allow setting read buffer limit' 2025-09-15 14:36:01 -04:00
qmp_shell.py python: backport 'qmp-shell-wrap: handle missing binary gracefully' 2025-09-15 14:36:01 -04:00
qmp_tui.py python: backport 'qmp-tui: Do not crash if optional dependencies are not met' 2025-09-15 14:36:01 -04:00
util.py python: backport 'drop Python3.6 workarounds' 2025-09-15 14:36:01 -04:00