c1408345 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: Add logging utility helpers
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-8-jsnow@redhat.com Signed-off-by: J
python/aqmp: Add logging utility helpers
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-8-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
c58b42e0 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add runstate state machine to AsyncProtocol
This serves a few purposes:
1. Protect interfaces when it's not safe to call them (via @require)
2. Add an interface by which an async clie
python/aqmp: add runstate state machine to AsyncProtocol
This serves a few purposes:
1. Protect interfaces when it's not safe to call them (via @require)
2. Add an interface by which an async client can determine if the state has changed, for the purposes of connection management.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-7-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
4ccaab03 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add generic async message-based protocol support
This is the bare minimum that you need to establish a full-duplex async message-based protocol with Python's asyncio.
The features to b
python/aqmp: add generic async message-based protocol support
This is the bare minimum that you need to establish a full-duplex async message-based protocol with Python's asyncio.
The features to be added in forthcoming commits are:
- Runstate tracking - Logging - Support for incoming connections via accept() - _cb_outbound, _cb_inbound message hooks - _readline() method
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-6-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
a07616d6 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add asyncio compatibility wrappers
Python 3.6 does not have all of the goodies that Python 3.7 does, and we need to support both. Add some compatibility wrappers needed for this purpose
python/aqmp: add asyncio compatibility wrappers
Python 3.6 does not have all of the goodies that Python 3.7 does, and we need to support both. Add some compatibility wrappers needed for this purpose.
(Note: Python 3.6 is EOL December 2021.)
Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 20210915162955.333025-5-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
35b9a85a | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/pylint: Add exception for TypeVar names ('T')
'T' is a common TypeVar name, allow its use.
See also https://github.com/PyCQA/pylint/issues/3401 -- In the future, we might be able to have a s
python/pylint: Add exception for TypeVar names ('T')
'T' is a common TypeVar name, allow its use.
See also https://github.com/PyCQA/pylint/issues/3401 -- In the future, we might be able to have a separate list of acceptable names for TypeVars exclusively.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-4-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
fbfb6a37 | 15-Sep-2021 |
John Snow <jsnow@redhat.com> |
python/aqmp: add error classes
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-3-jsnow@redhat.com Signed-off-by: John Snow <
python/aqmp: add error classes
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20210915162955.333025-3-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
eb8033f6 | 16-Sep-2021 |
John Snow <jsnow@redhat.com> |
python: pylint 2.11 support
We're not ready to enforce f-strings everywhere, so just silence this new warning.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@red
python: pylint 2.11 support
We're not ready to enforce f-strings everywhere, so just silence this new warning.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Message-id: 20210916182248.721529-3-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
15c3b863 | 24-Aug-2021 |
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> |
python:QEMUMachine: template typing for self returning methods
mypy thinks that return value of these methods in subclusses is QEMUMachine, which is wrong. So, make typing smarter.
Suggested-by: Jo
python:QEMUMachine: template typing for self returning methods
mypy thinks that return value of these methods in subclusses is QEMUMachine, which is wrong. So, make typing smarter.
Suggested-by: John Snow <jsnow@redhat.com> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210824083856.17408-26-vsementsov@virtuozzo.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
3f3c9b4c | 24-Aug-2021 |
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> |
python/qemu/machine: QEMUMachine: improve qmp() method
We often call qmp() with unpacking dict, like qmp('foo', **{...}). mypy don't really like it, it thinks that passed unpacked dict is a position
python/qemu/machine: QEMUMachine: improve qmp() method
We often call qmp() with unpacking dict, like qmp('foo', **{...}). mypy don't really like it, it thinks that passed unpacked dict is a positional argument and complains that it type should be bool (because second argument of qmp() is conv_keys: bool).
Allow passing dict directly, simplifying interface, and giving a way to satisfy mypy.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-Id: <20210824083856.17408-25-vsementsov@virtuozzo.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
eb7a91d0 | 09-Aug-2021 |
Emanuele Giuseppe Esposito <eesposit@redhat.com> |
qemu-iotests: add option to show qemu binary logs on stdout
Using the flag -p, allow the qemu binary to print to stdout.
Also create the common function _close_qemu_log_file() to avoid accessing ma
qemu-iotests: add option to show qemu binary logs on stdout
Using the flag -p, allow the qemu binary to print to stdout.
Also create the common function _close_qemu_log_file() to avoid accessing machine.py private fields directly and have duplicate code.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210809090114.64834-16-eesposit@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
804f7695 | 09-Aug-2021 |
Emanuele Giuseppe Esposito <eesposit@redhat.com> |
python: qemu: pass the wrapper field from QEMUQtestmachine to QEMUMachine
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuo
python: qemu: pass the wrapper field from QEMUQtestmachine to QEMUMachine
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Acked-by: John Snow <jsnow@redhat.com> Message-Id: <20210809090114.64834-4-eesposit@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
22305c2a | 09-Aug-2021 |
John Snow <jsnow@redhat.com> |
python: Reduce strictness of pylint's duplicate-code check
Pylint prior to 2.8.3 (We pin at >= 2.8.0) includes function and method signatures as part of its duplicate checking algorithm. This check
python: Reduce strictness of pylint's duplicate-code check
Pylint prior to 2.8.3 (We pin at >= 2.8.0) includes function and method signatures as part of its duplicate checking algorithm. This check does not listen to pragmas, so the only way to disable it is to turn it off completely or increase the minimum duplicate lines so that it doesn't trigger for functions with long, multi-line signatures.
When we decide to upgrade to pylint 2.8.3 or greater, we will be able to use 'ignore-signatures = true' to the config instead.
I'd prefer not to keep us on the very bleeding edge of pylint if I can help it -- 2.8.3 came out only three days ago at time of writing.
See: https://github.com/PyCQA/pylint/pull/4474 Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Acked-by: John Snow <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210809090114.64834-3-eesposit@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
show more ...
|
6f651a6d | 30-Jun-2021 |
Wainer dos Santos Moschetta <wainersm@redhat.com> |
python: Configure tox to skip missing interpreters
Currently tox tests against the installed interpreters, however if any supported interpreter is absent then it will return fail. It seems not reaso
python: Configure tox to skip missing interpreters
Currently tox tests against the installed interpreters, however if any supported interpreter is absent then it will return fail. It seems not reasonable to expect developers to have all supported interpreters installed on their systems. Luckily tox can be configured to skip missing interpreters.
This changed the tox setup so that missing interpreters are skipped by default. On the CI, however, we still want to enforce it tests against all supported. This way on CI the --skip-missing-interpreters=false option is passed to tox.
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210630184546.456582-1-wainersm@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
show more ...
|
5c02c865 | 29-Jun-2021 |
John Snow <jsnow@redhat.com> |
python: Fix broken ReST docstrings
This patch *doesn't* update all of the docstring standards across the QEMU package directory to make our docstring usage consistent. It *doesn't* fix the formattin
python: Fix broken ReST docstrings
This patch *doesn't* update all of the docstring standards across the QEMU package directory to make our docstring usage consistent. It *doesn't* fix the formatting to make it look pretty or reasonable in generated output. It *does* fix a few small instances where Sphinx would emit a build warning because of malformed ReST -- If we built our Python docs with Sphinx.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-id: 20210629214323.1329806-16-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
19cf0031 | 29-Jun-2021 |
John Snow <jsnow@redhat.com> |
python: remove auto-generated pyproject.toml file
For reasons that at-present escape me, pipenv insists on creating a stub pyproject.toml file. This file is a nuisance, because its mere presence cha
python: remove auto-generated pyproject.toml file
For reasons that at-present escape me, pipenv insists on creating a stub pyproject.toml file. This file is a nuisance, because its mere presence changes the behavior of various tools.
For instance, this stub file will cause "pip install --user -e ." to fail in spectacular fashion with misleading errors. "pip install -e ." works okay, but for some reason pip does not support editable installs to the user directory when using PEP517.
References: https://github.com/pypa/pip/pull/9990 https://github.com/pypa/pip/issues/7953
As outlined in ea1213b7ccc, it is still too early for us to consider moving to a PEP-517 exclusive package. We must support older distributions, so squash the annoyance for now. (Python 3.6 shipped Dec 2016, PEP517 support showed up in pip sometime in 2019 or so.)
Add 'pyproject.toml' to the 'make clean' target, and also delete it after every pipenv invocation issued by the Makefile.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-id: 20210629214323.1329806-15-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
50d0fba8 | 29-Jun-2021 |
John Snow <jsnow@redhat.com> |
python: Update help text on 'make clean', 'make distclean'
Update for visual parity with all the remaining targets.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Willian Rampazzo <willia
python: Update help text on 'make clean', 'make distclean'
Update for visual parity with all the remaining targets.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-id: 20210629214323.1329806-14-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
28cd32fb | 29-Jun-2021 |
John Snow <jsnow@redhat.com> |
python: Update help text on 'make check', 'make develop'
Update for visual parity with the other targets.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.
python: Update help text on 'make check', 'make develop'
Update for visual parity with the other targets.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-id: 20210629214323.1329806-13-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
2c24d52d | 29-Jun-2021 |
John Snow <jsnow@redhat.com> |
python: add 'make check-dev' invocation
This is a *third* way to run the Python tests. Unlike the first two (check-pipenv, check-tox), this version does not require any specific interpreter version
python: add 'make check-dev' invocation
This is a *third* way to run the Python tests. Unlike the first two (check-pipenv, check-tox), this version does not require any specific interpreter version -- making it a lot easier to tell people to run it as a quick smoketest prior to submission to GitLab CI.
Summary:
Checked via GitLab CI: - check-pipenv: tests our oldest python & dependencies - check-tox: tests newest dependencies on all non-EOL python versions Executed only incidentally: - check-dev: tests newest dependencies on whichever python version
('make check' does not set up any environment at all, it just runs the tests in your current environment. All four invocations perform the exact same tests, just in different execution environments.)
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Tested-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-id: 20210629214323.1329806-12-jsnow@redhat.com [Maintainer edit: added .dev-venv/ to .gitignore. --js] Acked-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Acked-by: Willian Rampazzo <willianr@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|
0d52c19a | 29-Jun-2021 |
John Snow <jsnow@redhat.com> |
python: only check qemu/ subdir with flake8
flake8 is a little eager to check everything it can. Limit it to checking inside the qemu namespace directory only. Update setup.cfg now that the exclude
python: only check qemu/ subdir with flake8
flake8 is a little eager to check everything it can. Limit it to checking inside the qemu namespace directory only. Update setup.cfg now that the exclude patterns are no longer necessary.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Tested-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-id: 20210629214323.1329806-11-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
show more ...
|