libvirt-python 12.5.0__tar.gz → 12.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/AUTHORS +2 -0
  2. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/ChangeLog +296 -0
  3. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/HACKING +20 -0
  4. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/Makefile +1 -1
  5. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/PKG-INFO +37 -4
  6. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/README +35 -2
  7. libvirt_python-12.7.0/VERSION +1 -0
  8. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/build/libvirt_python.egg-info/SOURCES.txt +3 -0
  9. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/domstart.py +1 -2
  10. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/esxlist.py +2 -2
  11. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/event-test.py +5 -5
  12. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/nodestats.py +2 -2
  13. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/generator.py +46 -35
  14. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-lxc-override.c +8 -0
  15. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override-api.xml +1 -1
  16. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override-virConnect.py +57 -57
  17. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override-virDomain.py +8 -8
  18. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override-virDomainCheckpoint.py +1 -1
  19. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override-virDomainSnapshot.py +1 -1
  20. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override-virNetwork.py +1 -1
  21. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override-virStoragePool.py +1 -1
  22. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override-virStream.py +7 -10
  23. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override.c +11 -0
  24. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-override.py +14 -14
  25. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-python.spec +11 -17
  26. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-qemu-override.c +8 -0
  27. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-qemu-override.py +4 -4
  28. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirtaio.py +8 -8
  29. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/setup.cfg +1 -1
  30. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/setup.py +18 -1
  31. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/test_api_coverage.py +10 -11
  32. libvirt_python-12.7.0/tests/test_conn.py +268 -0
  33. libvirt_python-12.7.0/tests/test_domain_config.py +467 -0
  34. libvirt_python-12.7.0/tests/test_domain_lifecycle.py +421 -0
  35. libvirt_python-12.7.0/tests/test_domain_migration.py +391 -0
  36. libvirt_python-12.7.0/tox.ini +19 -0
  37. libvirt_python-12.5.0/VERSION +0 -1
  38. libvirt_python-12.5.0/tests/test_conn.py +0 -92
  39. libvirt_python-12.5.0/tox.ini +0 -8
  40. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/CONTRIBUTING.rst +0 -0
  41. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/COPYING +0 -0
  42. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/MANIFEST.in +0 -0
  43. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/README +0 -0
  44. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/consolecallback.py +0 -0
  45. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/dhcpleases.py +0 -0
  46. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/dominfo.py +0 -0
  47. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/domipaddrs.py +0 -0
  48. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/domrestore.py +0 -0
  49. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/domsave.py +0 -0
  50. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/guest-vcpus/guest-vcpu-daemon.py +0 -0
  51. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/guest-vcpus/guest-vcpu.py +0 -0
  52. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/sparsestream.py +0 -0
  53. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/examples/topology.py +0 -0
  54. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-lxc-override-api.xml +0 -0
  55. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-qemu-override-api.xml +0 -0
  56. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-utils.c +0 -0
  57. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/libvirt-utils.h +0 -0
  58. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/pyproject.toml +0 -0
  59. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/requirements-test.txt +0 -0
  60. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/eventmock.py +0 -0
  61. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/test_aio.py +0 -0
  62. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/test_domain.py +0 -0
  63. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/test_domain_checkpoint.py +0 -0
  64. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/test_domain_snapshot.py +0 -0
  65. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/test_interface.py +0 -0
  66. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/test_network.py +0 -0
  67. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/test_nodedev.py +0 -0
  68. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/tests/test_storage.py +0 -0
  69. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/typewrappers.c +0 -0
  70. {libvirt_python-12.5.0 → libvirt_python-12.7.0}/typewrappers.h +0 -0
@@ -43,6 +43,7 @@ The individual contributors are
43
43
  Guido Günther <agx@sigxcpu.org>
44
44
  Han Han <hhan@redhat.com>
45
45
  Hu Tao <hutao@cn.fujitsu.com>
46
+ Jaehoon Kim <jhkim@linux.ibm.com>
46
47
  Jason Andryuk <andryuk@aero.org>
47
48
  Jelle van der Waa <jvanderwaa@redhat.com>
48
49
  Jim Fehlig <jfehlig@suse.com>
@@ -87,6 +88,7 @@ The individual contributors are
87
88
  Prabodh Agarwal <prabodh1194@users.noreply.github.com>
88
89
  Pradipta Kr. Banerjee <pradipta.banerjee@gmail.com>
89
90
  Qiaowei Ren <qiaowei.ren@intel.com>
91
+ Radoslaw Smigielski <rsmigiel@redhat.com>
90
92
  Radostin Stoyanov <rstoyanov@fedoraproject.org>
91
93
  renlei4 <ren.lei4@zte.com.cn>
92
94
  Richard W.M. Jones <rjones@redhat.com>
@@ -1,3 +1,299 @@
1
+ 2026- 8- 25 Jaehoon Kim <jhkim@linux.ibm.com>
2
+
3
+ Add VIR_DOMAIN_IOTHREAD_POLL_WEIGHT macro
4
+ The VIR_DOMAIN_IOTHREAD_POLL_WEIGHT typed param is being introduced
5
+ in libvirt v12.7.0. Add the correct VIR_TYPED_PARAM_UINT entry to
6
+ virPyDomainSetIOThreadParams[] so that the parameter is parsed with
7
+ the correct type.
8
+
9
+
10
+
11
+ 2026- 8- 20 Radoslaw Smigielski <rsmigiel@redhat.com>
12
+
13
+ tests: add migration API tests for migrate, migrate2, and migrate3
14
+ Add a new test file test_domain_migration.py to cover the VM migration API,
15
+ using mocked C-level calls and test driver.
16
+
17
+
18
+
19
+ 2026- 8- 6 Radoslaw Smigielski <rsmigiel@redhat.com>
20
+
21
+ tests: expand connection tests in test_conn.py
22
+ Add functional tests for read-write and read-only connections using
23
+ the test:///default driver.
24
+
25
+
26
+
27
+ 2026- 8- 6 Daniel P. Berrangé <berrange@redhat.com>
28
+
29
+ rpm: convert to new pyproject macros
30
+ The currently used macros are deprecated:
31
+
32
+ https://fedoraproject.org/wiki/Changes/DeprecateSetuppyMacros
33
+
34
+ and print a warning that they will be removed in Fedora 45 so we
35
+ are overdue to port to the new macros.
36
+
37
+ The new macros appear to be compatible with CentOS Stream 9, so
38
+ we don't need conditional use of the old macros.
39
+
40
+
41
+
42
+ 2026- 8- 6 Daniel P. Berrangé <berrange@redhat.com>
43
+
44
+ ci: add pyproject-rpm-macros
45
+ This is needed for the forthcoming change to the RPM packaging
46
+
47
+
48
+
49
+ 2026- 8- 6 Daniel P. Berrangé <berrange@redhat.com>
50
+
51
+ rpm: update to RHEL-9 / Fedora 43 as min versions
52
+ This lets us assume newer Python packaging macros
53
+
54
+
55
+
56
+ 2026- 8- 5 Radoslaw Smigielski <rsmigiel@redhat.com>
57
+
58
+ docs: simplyfy steps to build docs with Sphinx
59
+ Encapsulate all requirements in Python virtual environment,
60
+ do not depend on installing them at the system level.
61
+
62
+
63
+
64
+ 2026- 8- 5 Radoslaw Smigielski <rsmigiel@redhat.com>
65
+
66
+ docs: document Sphinx building steps
67
+ Added a "Building API Documentation" section to HACKING file
68
+ with the step of building docs with sphinx.
69
+
70
+
71
+
72
+ 2026- 8- 5 Radoslaw Smigielski <rsmigiel@redhat.com>
73
+
74
+ docs: publish libvirt-python API docs via GitLab pages
75
+ Add jobs:
76
+ - website_job
77
+ - pages
78
+ to build libvirt-python API docs using Sphinx.
79
+
80
+ Created base on libvirt-php/libvirt-java/libvirt-ruby examples.
81
+
82
+
83
+
84
+ 2026- 8- 5 Radoslaw Smigielski <rsmigiel@redhat.com>
85
+
86
+ docs: add Sphinx configuration to generate Python API documentation
87
+ The libvirt-python bindings lack official API documentation despite
88
+ all the infrastructure for it already existing: the libvirt C project
89
+ ships XML API descriptions (libvirt-api.xml) with detailed function
90
+ documentation, and generator.py already extracts these descriptions
91
+ into Python docstrings in the generated code. However, there was no
92
+ tooling to render these docstrings into browsable documentation.
93
+
94
+ Add a basic Sphinx setup with autodoc to generate HTML API reference
95
+ from the existing docstrings for all four modules: libvirt (main API),
96
+ libvirt_qemu, libvirt_lxc, and libvirtaio.
97
+
98
+
99
+
100
+ 2026- 8- 3 Daniel P. Berrangé <berrange@redhat.com>
101
+
102
+ Declare python 3.9 as min required
103
+ This is a side effect of the mypy type annotations changed in
104
+
105
+ https://gitlab.com/libvirt/libvirt-python/-/merge_requests/208
106
+
107
+
108
+
109
+ 2026- 8- 3 Jiri Denemark <jdenemar@redhat.com>
110
+
111
+ Post-release version bump to 12.7.0
112
+
113
+
114
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
115
+
116
+ Use lowercase types for collection types
117
+ The uppercase aliases were deprecated since Py 3.9
118
+
119
+ https://docs.python.org/3/library/typing.html#deprecated-aliases
120
+
121
+
122
+
123
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
124
+
125
+ ci: refresh with lcitool manifest
126
+ This replaces OpenSUSE 15 with 16, since 15.6 is now end of life
127
+
128
+
129
+
130
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
131
+
132
+ Remove redundant return type annotation
133
+ The _timer() method does not return any value, so declaring its
134
+ return type is incorrect.
135
+
136
+
137
+
138
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
139
+
140
+ Use qualified classname for types in libvirt_qemu/libvirt_lxc
141
+ We must use "libvirt.virDomain" in the type annotation, not a plain
142
+ "virDomain".
143
+
144
+
145
+
146
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
147
+
148
+ Check for stream 'cb' attribute existance
149
+ Instead of accessing self.cb and catching the exception when it does not
150
+ exist, check for it upfront, which makes mypy happier.
151
+
152
+
153
+
154
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
155
+
156
+ Fix type for multi-valued return
157
+
158
+
159
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
160
+
161
+ Stop scoping the domain event callback type
162
+ This leads to incompatible types between the register and deregister
163
+ methods:
164
+
165
+ "Callable[[virConnect, virDomain, int, int, _T@domainEventDeregister], int | None]"
166
+ "Callable[[virConnect, virDomain, int, int, _T@domainEventRegister], int | None]"
167
+
168
+
169
+
170
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
171
+
172
+ Use Optiona[..] type annotation for all params with default values
173
+ If a parameter has a default value assigned then by definition it is
174
+ an optional parameter, and the type must reflect that.
175
+
176
+
177
+
178
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
179
+
180
+ Use 'bytes' not 'str' for 'unsigned char *' parameters
181
+ Such parameters are all byte arrays, not NUL terminated C strings.
182
+
183
+
184
+
185
+ 2026- 7- 28 Daniel P. Berrangé <berrange@redhat.com>
186
+
187
+ Fix override type for virNodeListDevices 'caps' parameter
188
+ The 'caps' parameter is a string capability name, not a set of
189
+ bytes.
190
+
191
+
192
+
193
+ 2026- 7- 20 Radoslaw Smigielski <rsmigiel@redhat.com>
194
+
195
+ tests: add comprehensive domain configuration tests
196
+ Add few new tests in test_domain_config.py covering domain attributes,
197
+ autostart, scheduler parameters, memory, vCPUs, block/network stats,
198
+ CPU stats, suspend/resume, metadata, blkio and NUMA parameters.
199
+
200
+
201
+
202
+ 2026- 7- 10 Radoslaw Smigielski <rsmigiel@redhat.com>
203
+
204
+ tests: add few new tests for domain lifecycle operations
205
+ Add new test file test_domain_lifecycle.py with 30 functional tests
206
+ covering domain lifecycle operations. This significantly expands test
207
+ coverage beyond the existing 2 basic tests in test_domain.py.
208
+
209
+ All new tests use the test:///default driver.
210
+
211
+ These tests verify that Python bindings work correctly with various
212
+ parameters and edge cases, not only that the bindings exist.
213
+
214
+
215
+
216
+ 2026- 7- 9 Radoslaw Smigielski <rsmigiel@redhat.com>
217
+
218
+ tests: run tox tests in parallel
219
+ Use `tox run-parallel` instead of `tox` in the test target so all
220
+ Python versions are exercised concurrently.
221
+ And significantly reduces tox execution time.
222
+
223
+
224
+
225
+ 2026- 7- 8 Radoslaw Smigielski <rsmigiel@redhat.com>
226
+
227
+ docs: add explicit install instructions for pytest and tox in README
228
+ Add dnf and pip install commands for both pytest and tox to the testing
229
+ section of the README, making it clear how to obtain the required tools
230
+ before running the test suite.
231
+
232
+
233
+
234
+ 2026- 7- 8 Jiri Denemark <jdenemar@redhat.com>
235
+
236
+ Post-release version bump to 12.6.0
237
+
238
+
239
+ 2026- 7- 8 Radoslaw Smigielski <rsmigiel@redhat.com>
240
+
241
+ python: Add support for free-threaded no-GIL CPython
242
+ This is an initial commit to add support for:
243
+ - Python 3.13 (python3.13t)
244
+ - Python 3.14 (python3.14t)
245
+
246
+ Both python3.13t and python3.14t do not support the Stable C API,
247
+ so the only way to get libvirt-python working with no-GIL Python
248
+ is to fall back to the Python Unstable C API. This is the approach
249
+ taken in this change.
250
+
251
+ As the Python community plans to add Stable C API support in Python
252
+ 3.15+, we can switch back to it from 3.15 onwards. However, for
253
+ 3.13 and 3.14, we must use the Unstable C API.
254
+ (Ref: https://docs.python.org/3/c-api/unstable.html)
255
+
256
+ Following PEP 703 (https://peps.python.org/pep-0703/):
257
+
258
+ 1. Add dedicated tox envs: py313t, py314t.
259
+ 2. Create dedicated env configurations for new environments.
260
+ This forces no-GIL execution in case any dependency tries to
261
+ silently turn the GIL back on.
262
+
263
+ [testenv:py313t] with basepython = python3.13t
264
+ [testenv:py314t] with basepython = python3.14t
265
+
266
+ 3. Explicitly use the free-threaded interpreters and only set
267
+ PYTHON_GIL=0 inside the virtualenv.
268
+ 4. Add documentation warning against exporting PYTHON_GIL=0 in the
269
+ shell before running tox. Doing so affects the Python instance
270
+ that launches tox itself, not just the test venv.
271
+
272
+ Fixes: https://gitlab.com/libvirt/libvirt-python/-/work_items/22
273
+
274
+
275
+ 2026- 7- 3 Radoslaw Smigielski <rsmigiel@redhat.com>
276
+
277
+ tests: add Python 3.14 to tox test environments
278
+ Add py314 to the envlist to support testing with Python 3.14.
279
+
280
+
281
+
282
+ 2026- 7- 2 Radoslaw Smigielski <rsmigiel@redhat.com>
283
+
284
+ docs: clarify build and test dependencies in README
285
+ Add missing installation instructions for required dependencies:
286
+
287
+ - Document that the Python 'build' module must be installed before
288
+ running 'python3 -m build', with examples using both dnf and pip
289
+ - Add instruction to install test dependencies from requirements-test.txt
290
+ before running pytest or tox
291
+
292
+ These additions help new contributors avoid common setup errors when
293
+ building and testing the libvirt Python bindings.
294
+
295
+
296
+
1
297
  2026- 6- 9 Michal Privoznik <mprivozn@redhat.com>
2
298
 
3
299
  Add support for virDomainAnnounceInterface() API
@@ -36,3 +36,23 @@ hand written source files
36
36
  the virStoragePool class
37
37
  - libvirt-override-virStream.py - high level overrides in
38
38
  the virStream class
39
+
40
+
41
+
42
+ Building API Documentation
43
+ ==========================
44
+
45
+ The Python API reference is built with Sphinx using the autodoc
46
+ extension. Since the Python modules are generated at build time
47
+ from XML API descriptions, the package must be compiled before
48
+ Sphinx can import anything.
49
+
50
+ $ python -m venv docs-venv --system-site-packages --symlinks
51
+ $ source docs-venv/bin/activate
52
+ $ python -m pip install setuptools build
53
+ $ python -m pip install -r requirements-docs.txt
54
+ $ python -m build -n -x
55
+ $ python -m pip install dist/libvirt_python*.whl
56
+ $ python -m sphinx -b html docs/ py_api_docs
57
+
58
+ The rendered HTML will be in the py_api_docs/ directory.
@@ -16,7 +16,7 @@ check: all
16
16
  tox -e py$(VERSION)
17
17
 
18
18
  test: all
19
- tox
19
+ tox run-parallel
20
20
 
21
21
  rpm: all
22
22
  rpmbuild -ta dist/libvirt[-_]python-$(shell tr -d '\n' < VERSION).tar.gz
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libvirt-python
3
- Version: 12.5.0
3
+ Version: 12.7.0
4
4
  Summary: The libvirt virtualization API python binding
5
5
  Home-page: http://www.libvirt.org
6
6
  Maintainer: Libvirt Maintainers
@@ -9,7 +9,7 @@ License: LGPL-v2.0-or-later
9
9
  Classifier: Development Status :: 5 - Production/Stable
10
10
  Classifier: Intended Audience :: Developers
11
11
  Classifier: Programming Language :: Python :: 3 :: Only
12
- Requires-Python: >=3.6
12
+ Requires-Python: >=3.9
13
13
  Description-Content-Type: text/x-rst
14
14
  License-File: COPYING
15
15
  Dynamic: license-file
@@ -36,6 +36,14 @@ Requirements
36
36
  To build the libvirt python binary requires the GCC and pkg-config
37
37
  tools, and development headers for the libvirt and python libraries.
38
38
 
39
+ Additionally, the Python build module is required and can be installed via:
40
+
41
+ $ dnf install python3-build
42
+
43
+ or
44
+
45
+ $ python3 -m pip install --user build
46
+
39
47
  Building and installing
40
48
  -----------------------
41
49
 
@@ -54,8 +62,29 @@ without explicit building.
54
62
  In order to test the package, you'll need either tox or at least pytest,
55
63
  depending on whether you want to test an already installed package in which
56
64
  case the latter is sufficient or if you wish to test in a virtual
57
- environment you'd need tox. Depending on your preferred setup, you can run the
58
- tests either as
65
+ environment you'd need tox.
66
+
67
+ To install pytest, use one of:
68
+
69
+ $ dnf install python3-pytest
70
+
71
+ or
72
+
73
+ $ python3 -m pip install --user pytest
74
+
75
+ To install tox, use one of:
76
+
77
+ $ dnf install python3-tox
78
+
79
+ or
80
+
81
+ $ python3 -m pip install --user tox
82
+
83
+ Additionally, install the remaining test dependencies:
84
+
85
+ $ python3 -m pip install -r requirements-test.txt
86
+
87
+ Depending on your preferred setup, you can run the tests either as
59
88
 
60
89
  $ python3 -m pytest
61
90
 
@@ -63,6 +92,10 @@ or as
63
92
 
64
93
  $ tox
65
94
 
95
+ Free-threaded Python (py313t, py314t) test environments require tox>=4.26
96
+ and the corresponding free-threaded interpreters (python3.13t, python3.14t)
97
+ to be installed.
98
+
66
99
  A makefile shim is also provided for your convenience, so that you don't have
67
100
  to care about the exact operations mentioned above and instead you simply do
68
101
 
@@ -20,6 +20,14 @@ Requirements
20
20
  To build the libvirt python binary requires the GCC and pkg-config
21
21
  tools, and development headers for the libvirt and python libraries.
22
22
 
23
+ Additionally, the Python build module is required and can be installed via:
24
+
25
+ $ dnf install python3-build
26
+
27
+ or
28
+
29
+ $ python3 -m pip install --user build
30
+
23
31
  Building and installing
24
32
  -----------------------
25
33
 
@@ -38,8 +46,29 @@ without explicit building.
38
46
  In order to test the package, you'll need either tox or at least pytest,
39
47
  depending on whether you want to test an already installed package in which
40
48
  case the latter is sufficient or if you wish to test in a virtual
41
- environment you'd need tox. Depending on your preferred setup, you can run the
42
- tests either as
49
+ environment you'd need tox.
50
+
51
+ To install pytest, use one of:
52
+
53
+ $ dnf install python3-pytest
54
+
55
+ or
56
+
57
+ $ python3 -m pip install --user pytest
58
+
59
+ To install tox, use one of:
60
+
61
+ $ dnf install python3-tox
62
+
63
+ or
64
+
65
+ $ python3 -m pip install --user tox
66
+
67
+ Additionally, install the remaining test dependencies:
68
+
69
+ $ python3 -m pip install -r requirements-test.txt
70
+
71
+ Depending on your preferred setup, you can run the tests either as
43
72
 
44
73
  $ python3 -m pytest
45
74
 
@@ -47,6 +76,10 @@ or as
47
76
 
48
77
  $ tox
49
78
 
79
+ Free-threaded Python (py313t, py314t) test environments require tox>=4.26
80
+ and the corresponding free-threaded interpreters (python3.13t, python3.14t)
81
+ to be installed.
82
+
50
83
  A makefile shim is also provided for your convenience, so that you don't have
51
84
  to care about the exact operations mentioned above and instead you simply do
52
85
 
@@ -0,0 +1 @@
1
+ 12.7.0
@@ -55,6 +55,9 @@ tests/test_api_coverage.py
55
55
  tests/test_conn.py
56
56
  tests/test_domain.py
57
57
  tests/test_domain_checkpoint.py
58
+ tests/test_domain_config.py
59
+ tests/test_domain_lifecycle.py
60
+ tests/test_domain_migration.py
58
61
  tests/test_domain_snapshot.py
59
62
  tests/test_interface.py
60
63
  tests/test_network.py
@@ -7,13 +7,12 @@ If the domain is not running, create it.
7
7
  import libvirt
8
8
  import libxml2
9
9
  from argparse import ArgumentParser
10
- from typing import Tuple
11
10
 
12
11
 
13
12
  # Parse the XML description of domU from FNAME
14
13
  # and return a tuple (name, xmldesc) where NAME
15
14
  # is the name of the domain, and xmldesc is the contetn of FNAME
16
- def read_domain(fname: str) -> Tuple[str, str]:
15
+ def read_domain(fname: str) -> tuple[str, str]:
17
16
  fp = open(fname, "r")
18
17
  xmldesc = fp.read()
19
18
  fp.close()
@@ -8,7 +8,7 @@ import libvirt
8
8
  import libxml2
9
9
  import getpass
10
10
  from argparse import ArgumentParser
11
- from typing import Any, List
11
+ from typing import Any
12
12
 
13
13
 
14
14
  # This is the callback method passed to libvirt.openAuth() (see below).
@@ -25,7 +25,7 @@ from typing import Any, List
25
25
  #
26
26
  # The user_data argument is the user data item of the auth argument (see below)
27
27
  # passed to libvirt.openAuth().
28
- def request_credentials(credentials: List[List], user_data: Any) -> int:
28
+ def request_credentials(credentials: list[list], user_data: Any) -> int:
29
29
  for credential in credentials:
30
30
  if credential[0] == libvirt.VIR_CRED_AUTHNAME:
31
31
  # prompt the user to input a authname. display the provided message
@@ -14,7 +14,7 @@ import errno
14
14
  import time
15
15
  import threading
16
16
  from argparse import ArgumentParser
17
- from typing import Any, Callable, Dict, List, Optional, TypeVar # noqa F401
17
+ from typing import Any, Callable, Optional, TypeVar # noqa F401
18
18
  _T = TypeVar("_T")
19
19
  _EventCallback = Callable[[int, int, int, _T], None]
20
20
  _TimerCallback = Callable[[int, _T], None]
@@ -114,8 +114,8 @@ class virEventLoopPoll:
114
114
  self.runningPoll = False
115
115
  self.nextHandleID = 1
116
116
  self.nextTimerID = 1
117
- self.handles = [] # type: List[virEventLoopPollHandle]
118
- self.timers = [] # type: List[virEventLoopPollTimer]
117
+ self.handles = [] # type: list[virEventLoopPollHandle]
118
+ self.timers = [] # type: list[virEventLoopPollTimer]
119
119
  self.cleanup = []
120
120
  self.quit = False
121
121
 
@@ -603,7 +603,7 @@ def myDomainEventBlockJob2Callback(conn: libvirt.virConnect, dom: libvirt.virDom
603
603
  dom.name(), dom.ID(), BLOCK_JOB_TYPES[type], disk, BLOCK_JOB_STATUS[status]))
604
604
 
605
605
 
606
- def myDomainEventTunableCallback(conn: libvirt.virConnect, dom: libvirt.virDomain, params: Dict[str, Any], opaque: _T) -> None:
606
+ def myDomainEventTunableCallback(conn: libvirt.virConnect, dom: libvirt.virDomain, params: dict[str, Any], opaque: _T) -> None:
607
607
  print("myDomainEventTunableCallback: Domain %s(%s) %s" % (
608
608
  dom.name(), dom.ID(), params))
609
609
 
@@ -623,7 +623,7 @@ def myDomainEventMigrationIteration(conn: libvirt.virConnect, dom: libvirt.virDo
623
623
  dom.name(), dom.ID(), iteration))
624
624
 
625
625
 
626
- def myDomainEventJobCompletedCallback(conn: libvirt.virConnect, dom: libvirt.virDomain, params: Dict[str, Any], opaque: _T) -> None:
626
+ def myDomainEventJobCompletedCallback(conn: libvirt.virConnect, dom: libvirt.virDomain, params: dict[str, Any], opaque: _T) -> None:
627
627
  print("myDomainEventJobCompletedCallback: Domain %s(%s) %s" % (
628
628
  dom.name(), dom.ID(), params))
629
629
 
@@ -7,7 +7,7 @@
7
7
  import libvirt
8
8
  from xml.dom import minidom
9
9
  import libxml2
10
- from typing import Any, Dict # noqa F401
10
+ from typing import Any # noqa F401
11
11
 
12
12
 
13
13
  def xpath_eval(ctxt, path: str) -> str:
@@ -52,7 +52,7 @@ domsStrict = [
52
52
  if proc.numaParameters()["numa_mode"] == libvirt.VIR_DOMAIN_NUMATUNE_MEM_STRICT
53
53
  ]
54
54
 
55
- domsStrictCfg = {} # type: Dict[libvirt.virDomain, Dict[str, Dict[str, Any]]]
55
+ domsStrictCfg = {} # type: dict[libvirt.virDomain, dict[str, dict[str, Any]]]
56
56
  for dom in domsStrict:
57
57
  xmlStr = dom.XMLDesc()
58
58
  doc = libxml2.parseDoc(xmlStr)