| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Follow the same procedure as we do with specfiles in the main library
where we distribute libvirt.spec.in along with the generated
libvirt.spec inside the tarball.
Fixes: https://gitlab.com/libvirt/libvirt-python/-/issues/5
Signed-off-by: Erik Skultety <eskultet@redhat.com>
|
|
|
|
|
|
|
|
| |
Both APIs work with string lists (the getter returns it, the
setter gets keys to set from it) -> represent that as a python
list. The rest is kept as is in C.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
The former is deprecated since Python 3.9, and the latter has existed
for all 3.x and probably before.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
This ensures we pick up warnings from new python headers or other
problems.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
The current code assumes the version number string will be only three
characters long, which fails with "3.10".
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
PyEval_ThreadsInitialized was deprecated in 3.9, with deletion targetted
for 3.11. Furthermore since 3.7 it is guaranteed that threads are always
initialized by Py_Initialize(), so checking it is redundant.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
| |
Validate that the type hinting is working as expected
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
|
|
|
| |
Allow more parallelization by giving explicit dependencies between jobs.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
To prevent regressions, especially with generated code, we need to have
test coverage of more APIs. This starts off with coverage for object
creation for all object types supported by the test driver
currently. This exercises constructors which have been broken several
times in the past.
Related https://gitlab.com/libvirt/libvirt-python/-/issues/4
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
| |
Fixes 7f021c21d6a091ca33615852d6061e75b2500f3f
Resolves https://gitlab.com/libvirt/libvirt-python/-/issues/4
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
|
|
|
|
| |
a variable should not change its type.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
|
| |
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
| |
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
| |
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
Assign tuple to multiple loop variables for better readability
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
|
| |
to be closes to pep8 which makes reading the generated code easier and
reduces the number of issues found by flake8.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
for better type checking: both are bool()==False, but None is not str.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
|
|
| |
for nested dictionaries allows to remove the case distinction for
"first" from "all other" cases.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
|
|
|
| |
The variables are local to that funcion
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
|
| |
tuple() and list() are sequences, while dict() and set() are hash-based,
which is more efficient for contains().
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
Python has a native type for set()s.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
no need to compare with None or empty string.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
| |
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
Use sorted(..., key=...) instead of using explicit list.sort()
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
| |
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
instead of list.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
Assign tuple to multiple loop variables for better readability
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
instead of using None as this has a different type.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use attr.get(key, default) instead.
Also use the empty sting "" as the default value instead of "None": Both
are "False" when used as a bool()ean, but "None" would require an
explicit check for "not None" in many places as str() and None have
different types.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
|
| |
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
instead of sting concatenating.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
|
| |
directly instead of using legacy method names from xmllib.
Depends: 3740a5e4c701281ac76a55e3f02b1d4221f1f9f0
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
|
|
| |
getmethodname()
close()
cdata()
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
to use closing context manager.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
| |
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
instead of hand-coded implementation.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
instead of generating a list first.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
instead of generating a list and then counting the elements.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
instead of the keys and then doing a lookup.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
which saves a lookup of each key.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
|
|
|
|
|
| |
directly instead of explicitly requesting only the keys as a list and
converting that list to another list.
Checking directly for an element to be contained in a hash is much more
efficient as this is done using hashing O(1) instead of walking the list
in half on average O(n).
Signed-off-by: Philipp Hahn <hahn@univention.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
|
| |
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
for variables with are not assigned.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
:%s,\(\w\+\)\s*=\s*\1\s*+,\1 +=,
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
:%s,\(\w\+\)\s*=\s*\1\s*+,\1 +=,
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
|
|
|
|
| |
instead of manual iteration counting.
Signed-off-by: Philipp Hahn <hahn@univention.de>
|