<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/python/tests, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/python/tests?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/python/tests?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-04-21T15:01:00+00:00</updated>
<entry>
<title>python: rename qemu.aqmp to qemu.qmp</title>
<updated>2022-04-21T15:01:00+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2022-03-30T17:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=37094b6dd59f56978b918e79cadf17c6fd5d36e2'/>
<id>urn:sha1:37094b6dd59f56978b918e79cadf17c6fd5d36e2</id>
<content type='text'>
Now that we are fully switched over to the new QMP library, move it back
over the old namespace. This is being done primarily so that we may
upload this package simply as "qemu.qmp" without introducing confusion
over whether or not "aqmp" is a new protocol or not.

The trade-off is increased confusion inside the QEMU developer
tree. Sorry!

Note: the 'private' member "_aqmp" in legacy.py also changes to "_qmp";
not out of necessity, but just to remove any traces of the "aqmp"
name.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Beraldo Leal &lt;bleal@redhat.com&gt;
Acked-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@openvz.org&gt;
Message-id: 20220330172812.3427355-8-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python/aqmp: add start_server() and accept() methods</title>
<updated>2022-03-07T19:36:41+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2022-02-25T20:59:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=481607c7d35de2bc4d9bec7f4734036fc467f330'/>
<id>urn:sha1:481607c7d35de2bc4d9bec7f4734036fc467f330</id>
<content type='text'>
Add start_server() and accept() methods that can be used instead of
start_server_and_accept() to allow more fine-grained control over the
incoming connection process.

(Eagle-eyed reviewers will surely notice that it's a bit weird that
"CONNECTING" is a state that's shared between both the start_server()
and connect() states. That's absolutely true, and it's very true that
checking on the presence of _accepted as an indicator of state is a
hack. That's also very certainly true. But ... this keeps client code an
awful lot simpler, as it doesn't have to care exactly *how* the
connection is being made, just that it *is*. Is it worth disrupting that
simplicity in order to provide a better state guard on `accept()`? Hm.)

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Acked-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-id: 20220225205948.3693480-9-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python/aqmp: refactor _do_accept() into two distinct steps</title>
<updated>2022-03-07T19:36:41+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2022-02-25T20:59:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=5e9902a030ab832b0b6577764c65ce6a6f874af6'/>
<id>urn:sha1:5e9902a030ab832b0b6577764c65ce6a6f874af6</id>
<content type='text'>
Refactor _do_accept() into _do_start_server() and _do_accept(). As of
this commit, the former calls the latter, but in subsequent commits
they'll be split apart.

(So please forgive the misnomer for _do_start_server(); it will live up
to its name shortly, and the docstring will be updated then too. I'm
just cutting down on some churn.)

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Acked-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-id: 20220225205948.3693480-7-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python/aqmp: remove _new_session and _establish_connection</title>
<updated>2022-03-07T19:36:41+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2022-02-25T20:59:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=68a6cf3ffe3532c0655efbbf5910bd99a1b4a3fa'/>
<id>urn:sha1:68a6cf3ffe3532c0655efbbf5910bd99a1b4a3fa</id>
<content type='text'>
These two methods attempted to entirely envelop the logic of
establishing a connection to a peer start to finish. However, we need to
break apart the incoming connection step into more granular steps. We
will no longer be able to reasonably constrain the logic inside of these
helper functions.

So, remove them - with _session_guard(), they no longer serve a real
purpose.

Although the public API doesn't change, the internal API does. Now that
there are no intermediary methods between e.g. connect() and
_do_connect(), there's no hook where the runstate is set. As a result,
the test suite changes a little to cope with the new semantics of
_do_accept() and _do_connect().

Lastly, take some pieces of the now-deleted docstrings and move
them up to the public interface level. They were a little more detailed,
and it won't hurt to keep them.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Acked-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-id: 20220225205948.3693480-4-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python/aqmp: rename 'accept()' to 'start_server_and_accept()'</title>
<updated>2022-03-07T19:36:41+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2022-02-25T20:59:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=0ba4e76b23fed77d09be7f56da783ab3f0b2d497'/>
<id>urn:sha1:0ba4e76b23fed77d09be7f56da783ab3f0b2d497</id>
<content type='text'>
Previously, I had a method named "accept()" that under-the-hood calls
bind(2), listen(2) *and* accept(2). I meant this as a simplification and
counterpart to the one-shot "connect()" method.

This is confusing to readers who expect accept() to mean *just*
accept(2). Since I need to split apart the "accept()" method into
multiple methods anyway (one of which strongly resembling accept(2)), it
feels pertinent to rename this method *now*.

Rename this all-in-one method "start_server_and_accept()" instead.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Acked-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-id: 20220225205948.3693480-3-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>Python: add setuptools v60.0 workaround</title>
<updated>2022-02-23T22:07:26+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2022-02-04T22:18:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=762c280d5f3c17a239204a73855d8778f6dc2113'/>
<id>urn:sha1:762c280d5f3c17a239204a73855d8778f6dc2113</id>
<content type='text'>
Setuptools v60 and later include a bundled version of distutils, a
deprecated standard library scheduled for removal in future versions of
Python. Setuptools v60 is only possible to install for Python 3.7 and later.

Python has a distutils.sysconfig.get_python_lib() function that returns
'/usr/lib/pythonX.Y' on posix systems. RPM-based systems actually use
'/usr/lib64/pythonX.Y' instead, so Fedora patches stdlib distutils for
Python 3.7 and Python 3.8 to return the correct value.

Python 3.9 and later introduce a sys.platlibdir property, which returns
the correct value on RPM-based systems.

The change to a distutils package not provided by Fedora on Python 3.7
and 3.8 causes a regression in distutils.sysconfig.get_python_lib() that
ultimately causes false positives to be emitted by pylint, because it
can no longer find the system source libraries.

Many Python tools are fairly aggressive about updating setuptools
packages, and so even though this package is a fair bit newer than
Python 3.7/3.8, it's not entirely unreasonable for a given user to have
such a modern package with a fairly old Python interpreter.

Updates to Python 3.7 and Python 3.8 are being produced for Fedora which
will fix the problem on up-to-date systems. Until then, we can force the
loading of platform-provided distutils when running the pylint
test. This is the least-invasive yet most comprehensive fix.

References:
 https://github.com/pypa/setuptools/pull/2896
 https://github.com/PyCQA/pylint/issues/5704
 https://github.com/pypa/distutils/issues/110

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Message-id: 20220204221804.2047468-2-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python: Add iotest linters to test suite</title>
<updated>2021-11-01T15:54:59+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2021-10-19T14:49:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=461044ceb4fe58eb919dedfeb62f619f79d4d552'/>
<id>urn:sha1:461044ceb4fe58eb919dedfeb62f619f79d4d552</id>
<content type='text'>
Run mypy and pylint on the iotests files directly from the Python CI
test infrastructure. This ensures that any accidental breakages to the
qemu.[qmp|aqmp|machine|utils] packages will be caught by that test
suite.

It also ensures that these linters are run with well-known versions and
test against a wide variety of python versions, which helps to find
accidental cross-version python compatibility issues.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-id: 20211019144918.3159078-15-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python/aqmp: add LineProtocol tests</title>
<updated>2021-09-27T16:10:29+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2021-09-15T16:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8193b9d148e0d42794b78ab040c804db15b5f524'/>
<id>urn:sha1:8193b9d148e0d42794b78ab040c804db15b5f524</id>
<content type='text'>
Tests a real connect, a real accept, and really sending and receiving a
message over a UNIX socket.

Brings coverage of protocol.py up to ~93%.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Message-id: 20210915162955.333025-27-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python/aqmp: add AsyncProtocol unit tests</title>
<updated>2021-09-27T16:10:29+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2021-09-15T16:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a1f71b61ea763b5ac7429940018c1bb697889e56'/>
<id>urn:sha1:a1f71b61ea763b5ac7429940018c1bb697889e56</id>
<content type='text'>
This tests most of protocol.py -- From a hacked up Coverage.py run, it's
at about 86%. There's a few error cases that aren't very well tested
yet, they're hard to induce artificially so far. I'm working on it.

Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
Message-id: 20210915162955.333025-26-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>python: only check qemu/ subdir with flake8</title>
<updated>2021-07-01T01:54:04+00:00</updated>
<author>
<name>John Snow</name>
</author>
<published>2021-06-29T21:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=0d52c19a599a45c800fb58f3ad359f6472a18e3f'/>
<id>urn:sha1:0d52c19a599a45c800fb58f3ad359f6472a18e3f</id>
<content type='text'>
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 &lt;jsnow@redhat.com&gt;
Reviewed-by: Willian Rampazzo &lt;willianr@redhat.com&gt;
Reviewed-by: Wainer dos Santos Moschetta &lt;wainersm@redhat.com&gt;
Tested-by: Wainer dos Santos Moschetta &lt;wainersm@redhat.com&gt;
Message-id: 20210629214323.1329806-11-jsnow@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
</feed>
