[Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes

Lukáš Doktor posted 10 patches 6 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170818142613.32394-1-ldoktor@redhat.com
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
scripts/qemu.py       | 95 +++++++++++++++++++++++++++++++++++++++------------
scripts/qmp/qmp-shell |  4 +--
scripts/qmp/qmp.py    | 49 +++++++++++++++-----------
scripts/qtest.py      | 13 ++++---
4 files changed, 111 insertions(+), 50 deletions(-)
[Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by Lukáš Doktor 6 years, 8 months ago
Hello guys,

I'm reading the available python modules to exercise qemu and while reading them
I fixed some issues that caught my attention. It usually starts with a simple
pylint/docstring fixes and slowly graduates to more controversial ones so I'm
open to suggestion to remove some of them.

Kind regards,
Lukáš

Changes in v2
- Squashed 2nd and 10th patches into 2nd one
- Use repr() in MonitorResponseError's description
- Improved commit message of the 6th patch
- Two tweaks to docstrings changed in the 6th patch
- Also updated qmp-shell to use new-style super calls (7th patch)
- Fixed the accidental rename of qmp `cmd_id` (kept the id->cmd_id patch)
- Changed the style of the style-fix in the 10th commit

Changes in v3
- Don't use repr in the 5th patch in MonitorResponseError

Changes in v4
- Use correct git base (remove unwanted commits)

Changes in v5
- Avoid bool comparison
- Change report to return in one docstring
- Removed the unnecessary spaces around single-line docstring

Changes in v6
- Bunch of docstring tweaks by Markus Armbruster
- Line break in <80 chars
- result dict => response dict
- Removed the "event_match" rename

Lukáš Doktor (10):
  qemu.py: Pylint/style fixes
  qemu|qtest: Avoid dangerous arguments
  qemu.py: Use iteritems rather than keys()
  qemu.py: Simplify QMP key-conversion
  qemu.py: Use custom exceptions rather than Exception
  qmp.py: Couple of pylint/style fixes
  qmp.py: Use object-based class for QEMUMonitorProtocol
  qmp.py: Avoid "has_key" usage
  qmp.py: Avoid overriding a builtin object
  qtest.py: Few pylint/style fixes

 scripts/qemu.py       | 95 +++++++++++++++++++++++++++++++++++++++------------
 scripts/qmp/qmp-shell |  4 +--
 scripts/qmp/qmp.py    | 49 +++++++++++++++-----------
 scripts/qtest.py      | 13 ++++---
 4 files changed, 111 insertions(+), 50 deletions(-)

-- 
2.9.4


Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by John Snow 6 years, 7 months ago

On 08/18/2017 10:26 AM, Lukáš Doktor wrote:
> Hello guys,
> 
> I'm reading the available python modules to exercise qemu and while reading them
> I fixed some issues that caught my attention. It usually starts with a simple
> pylint/docstring fixes and slowly graduates to more controversial ones so I'm
> open to suggestion to remove some of them.
> 
> Kind regards,
> Lukáš
> 
> Changes in v2
> - Squashed 2nd and 10th patches into 2nd one
> - Use repr() in MonitorResponseError's description
> - Improved commit message of the 6th patch
> - Two tweaks to docstrings changed in the 6th patch
> - Also updated qmp-shell to use new-style super calls (7th patch)
> - Fixed the accidental rename of qmp `cmd_id` (kept the id->cmd_id patch)
> - Changed the style of the style-fix in the 10th commit
> 
> Changes in v3
> - Don't use repr in the 5th patch in MonitorResponseError
> 
> Changes in v4
> - Use correct git base (remove unwanted commits)
> 
> Changes in v5
> - Avoid bool comparison
> - Change report to return in one docstring
> - Removed the unnecessary spaces around single-line docstring
> 
> Changes in v6
> - Bunch of docstring tweaks by Markus Armbruster
> - Line break in <80 chars
> - result dict => response dict
> - Removed the "event_match" rename
> 

Looks like all ten patches have an R-B despite changes; but it looks
like nothing particularly major was changed anyway.

Does this fall under Markus's jurisdiction?

(Well, except for qtest.py which seemingly has double-extra-no
maintainer...!)

--js

Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by Markus Armbruster 6 years, 7 months ago
John Snow <jsnow@redhat.com> writes:

> On 08/18/2017 10:26 AM, Lukáš Doktor wrote:
>> Hello guys,
>> 
>> I'm reading the available python modules to exercise qemu and while reading them
>> I fixed some issues that caught my attention. It usually starts with a simple
>> pylint/docstring fixes and slowly graduates to more controversial ones so I'm
>> open to suggestion to remove some of them.
>> 
>> Kind regards,
>> Lukáš
>> 
>> Changes in v2
>> - Squashed 2nd and 10th patches into 2nd one
>> - Use repr() in MonitorResponseError's description
>> - Improved commit message of the 6th patch
>> - Two tweaks to docstrings changed in the 6th patch
>> - Also updated qmp-shell to use new-style super calls (7th patch)
>> - Fixed the accidental rename of qmp `cmd_id` (kept the id->cmd_id patch)
>> - Changed the style of the style-fix in the 10th commit
>> 
>> Changes in v3
>> - Don't use repr in the 5th patch in MonitorResponseError
>> 
>> Changes in v4
>> - Use correct git base (remove unwanted commits)
>> 
>> Changes in v5
>> - Avoid bool comparison
>> - Change report to return in one docstring
>> - Removed the unnecessary spaces around single-line docstring
>> 
>> Changes in v6
>> - Bunch of docstring tweaks by Markus Armbruster
>> - Line break in <80 chars
>> - result dict => response dict
>> - Removed the "event_match" rename
>> 
>
> Looks like all ten patches have an R-B despite changes; but it looks
> like nothing particularly major was changed anyway.
>
> Does this fall under Markus's jurisdiction?
>
> (Well, except for qtest.py which seemingly has double-extra-no
> maintainer...!)

qemu.py is about starting and controlling QEMU, commonly for testing
purposes.  It's related to QMP only by virtue of using QMP for control
(well, what else could it use?); if that makes me maintainer, I'll soon
maintain basically all tests :)

As far as I can tell, qemu.py's main user is still qemu-iotests, via
qtest.py.  Dan factored it out to make it available for
tests/migration/guestperf/.

Options for maintaining qemu.py and qtest.py:

* Maintain them with qemu-iotest

  Currently mainained with the block layer core, by Kevin and Max.

  - Keep it that way

  - Appoint qemu-iotest maintainer(s).

* Maintain them separately, say as "Python qtest support", appoint
  maintainer(s)

  Dan appears to be a hot contender:

    $ scripts/get_maintainer.pl -f --git-blame scripts/qtest.py 
    Fam Zheng <famz@redhat.com> (authored lines:71/110=65%,commits:1/3=33%)
    "Daniel P. Berrange" <berrange@redhat.com> (authored lines:39/110=35%,commits:2/3=67%)
    Max Reitz <mreitz@redhat.com> (commits:2/3=67%)
    Amit Shah <amit.shah@redhat.com> (commits:1/3=33%)
    Stefan Hajnoczi <stefanha@redhat.com> (commits:1/3=33%)
    qemu-devel@nongnu.org (open list:All patches CC here)
    $ scripts/get_maintainer.pl -f --git-blame scripts/qemu.py 
    "Daniel P. Berrange" <berrange@redhat.com> (authored lines:217/229=95%,commits:2/4=50%)
    Eduardo Habkost <ehabkost@redhat.com> (authored lines:12/229=5%,commits:4/4=100%)
    Markus Armbruster <armbru@redhat.com> (commits:1/4=25%)
    Max Reitz <mreitz@redhat.com> (commits:1/4=25%)
    Amit Shah <amit.shah@redhat.com> (commits:1/4=25%)
    qemu-devel@nongnu.org (open list:All patches CC here)

  Eduardo made the mistake^W^W^Wgraciously volunteered to maintain
  scripts/qmp/qmp-shell, which is also used for testing.  Perhaps he'd
  be willing to maintain these guys as well.

* Do nothing

  Hope "somebody" will take pity and merge patches.  A common value of
  "somebody" would be Paolo.

Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by Philippe Mathieu-Daudé 6 years, 7 months ago
On 08/22/2017 04:24 AM, Markus Armbruster wrote:
> John Snow <jsnow@redhat.com> writes:
[...]
>>
>> Looks like all ten patches have an R-B despite changes; but it looks
>> like nothing particularly major was changed anyway.
>>
>> Does this fall under Markus's jurisdiction?
>>
>> (Well, except for qtest.py which seemingly has double-extra-no
>> maintainer...!)
> 
> qemu.py is about starting and controlling QEMU, commonly for testing
> purposes.  It's related to QMP only by virtue of using QMP for control
> (well, what else could it use?); if that makes me maintainer, I'll soon
> maintain basically all tests :)
> 
> As far as I can tell, qemu.py's main user is still qemu-iotests, via
> qtest.py.  Dan factored it out to make it available for
> tests/migration/guestperf/.
> 
> Options for maintaining qemu.py and qtest.py:
> 
> * Maintain them with qemu-iotest
> 
>    Currently mainained with the block layer core, by Kevin and Max.
> 
>    - Keep it that way
> 
>    - Appoint qemu-iotest maintainer(s).
> 
> * Maintain them separately, say as "Python qtest support", appoint
>    maintainer(s)
> 
>    Dan appears to be a hot contender:
> 
>      $ scripts/get_maintainer.pl -f --git-blame scripts/qtest.py
>      Fam Zheng <famz@redhat.com> (authored lines:71/110=65%,commits:1/3=33%)
>      "Daniel P. Berrange" <berrange@redhat.com> (authored lines:39/110=35%,commits:2/3=67%)
>      Max Reitz <mreitz@redhat.com> (commits:2/3=67%)
>      Amit Shah <amit.shah@redhat.com> (commits:1/3=33%)
>      Stefan Hajnoczi <stefanha@redhat.com> (commits:1/3=33%)
>      qemu-devel@nongnu.org (open list:All patches CC here)
>      $ scripts/get_maintainer.pl -f --git-blame scripts/qemu.py
>      "Daniel P. Berrange" <berrange@redhat.com> (authored lines:217/229=95%,commits:2/4=50%)
>      Eduardo Habkost <ehabkost@redhat.com> (authored lines:12/229=5%,commits:4/4=100%)
>      Markus Armbruster <armbru@redhat.com> (commits:1/4=25%)
>      Max Reitz <mreitz@redhat.com> (commits:1/4=25%)
>      Amit Shah <amit.shah@redhat.com> (commits:1/4=25%)
>      qemu-devel@nongnu.org (open list:All patches CC here)
> 
>    Eduardo made the mistake^W^W^Wgraciously volunteered to maintain
>    scripts/qmp/qmp-shell, which is also used for testing.  Perhaps he'd
>    be willing to maintain these guys as well.
> 
> * Do nothing
> 
>    Hope "somebody" will take pity and merge patches.  A common value of
>    "somebody" would be Paolo.

:'(

* Fam is also a good candidate for scripts/qemu.py with VM testing

* trivial queue?

* Add global Python maintainers

Mostly to review/merge...

Can we predict how the python scripts will evolve? Only fast-testing?

Is there some users hacking on qemu.py unaware they can/should use 
libvirt-python?
If so, shouldn't we think about running more tests through libvirt and 
add effort there?

Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by Eduardo Habkost 6 years, 7 months ago
(CCing Cleber and Stefan)

On Tue, Aug 22, 2017 at 07:19:45AM -0300, Philippe Mathieu-Daudé wrote:
[...]
> Can we predict how the python scripts will evolve? Only fast-testing?
> 

I guess it depends on how you define "fast".  Does "fast-testing"
include a full device-crash-test run (that could take ~30
minutes) or the full set of iotests?


> Is there some users hacking on qemu.py unaware they can/should use
> libvirt-python?

I believe the existing users of qemu.py wouldn't want to have
dependencies on libvirt or other external modules (e.g. code that
test specific QMP commands and/or is run by "make check").


> If so, shouldn't we think about running more tests through libvirt and add
> effort there?

Even if the existing test code wouldn't benefit from libvirt, I
agree there is some value in writing test code that uses libvirt.
But in this case would the test code belong to the QEMU source
tree, or somewhere else?

-- 
Eduardo

Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by Stefan Hajnoczi 6 years, 7 months ago
On Tue, Aug 22, 2017 at 04:07:09PM -0300, Eduardo Habkost wrote:
> (CCing Cleber and Stefan)
> 
> On Tue, Aug 22, 2017 at 07:19:45AM -0300, Philippe Mathieu-Daudé wrote:
> [...]
> > Can we predict how the python scripts will evolve? Only fast-testing?
> > 
> 
> I guess it depends on how you define "fast".  Does "fast-testing"
> include a full device-crash-test run (that could take ~30
> minutes) or the full set of iotests?
> 
> 
> > Is there some users hacking on qemu.py unaware they can/should use
> > libvirt-python?
> 
> I believe the existing users of qemu.py wouldn't want to have
> dependencies on libvirt or other external modules (e.g. code that
> test specific QMP commands and/or is run by "make check").

Yes, most QEMU tests interact with QEMU at a lower level than the
libvirt API.  They may exercise new features that are not available via
libvirt so we'd end up bypassing it anyway.

It is easier to debug a test case that interacts directly with QEMU.
Investigating a failed test where libvirt is involved is more
time-consuming.

libvirt and tools built on it, like virt-builder, are good for tests
that need a fully-fledged operating system inside the guest.  Avocado
Virt is aimed at higher-level tests involving guests too:
https://avocado-virt.readthedocs.io/en/latest/WritingTests.html

Stefan

Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by Philippe Mathieu-Daudé 6 years, 7 months ago
On 08/24/2017 09:15 AM, Stefan Hajnoczi wrote:
> On Tue, Aug 22, 2017 at 04:07:09PM -0300, Eduardo Habkost wrote:
>> (CCing Cleber and Stefan)
>>
>> On Tue, Aug 22, 2017 at 07:19:45AM -0300, Philippe Mathieu-Daudé wrote:
>> [...]
>>> Can we predict how the python scripts will evolve? Only fast-testing?
>>>
>>
>> I guess it depends on how you define "fast".  Does "fast-testing"
>> include a full device-crash-test run (that could take ~30
>> minutes) or the full set of iotests?
>>
>>
>>> Is there some users hacking on qemu.py unaware they can/should use
>>> libvirt-python?
>>
>> I believe the existing users of qemu.py wouldn't want to have
>> dependencies on libvirt or other external modules (e.g. code that
>> test specific QMP commands and/or is run by "make check").
> 
> Yes, most QEMU tests interact with QEMU at a lower level than the
> libvirt API.  They may exercise new features that are not available via
> libvirt so we'd end up bypassing it anyway.

good point,

> It is easier to debug a test case that interacts directly with QEMU.
> Investigating a failed test where libvirt is involved is more
> time-consuming.

another good point.

> 
> libvirt and tools built on it, like virt-builder, are good for tests
> that need a fully-fledged operating system inside the guest.  Avocado
> Virt is aimed at higher-level tests involving guests too:
> https://avocado-virt.readthedocs.io/en/latest/WritingTests.html
> 
> Stefan
> 

Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by Paolo Bonzini 6 years, 7 months ago
On 22/08/2017 09:24, Markus Armbruster wrote:
> John Snow <jsnow@redhat.com> writes:
> 
>> On 08/18/2017 10:26 AM, Lukáš Doktor wrote:
>>> Hello guys,
>>>
>>> I'm reading the available python modules to exercise qemu and while reading them
>>> I fixed some issues that caught my attention. It usually starts with a simple
>>> pylint/docstring fixes and slowly graduates to more controversial ones so I'm
>>> open to suggestion to remove some of them.
>>>
>>> Kind regards,
>>> Lukáš
>>>
>>> Changes in v2
>>> - Squashed 2nd and 10th patches into 2nd one
>>> - Use repr() in MonitorResponseError's description
>>> - Improved commit message of the 6th patch
>>> - Two tweaks to docstrings changed in the 6th patch
>>> - Also updated qmp-shell to use new-style super calls (7th patch)
>>> - Fixed the accidental rename of qmp `cmd_id` (kept the id->cmd_id patch)
>>> - Changed the style of the style-fix in the 10th commit
>>>
>>> Changes in v3
>>> - Don't use repr in the 5th patch in MonitorResponseError
>>>
>>> Changes in v4
>>> - Use correct git base (remove unwanted commits)
>>>
>>> Changes in v5
>>> - Avoid bool comparison
>>> - Change report to return in one docstring
>>> - Removed the unnecessary spaces around single-line docstring
>>>
>>> Changes in v6
>>> - Bunch of docstring tweaks by Markus Armbruster
>>> - Line break in <80 chars
>>> - result dict => response dict
>>> - Removed the "event_match" rename
>>>
>>
>> Looks like all ten patches have an R-B despite changes; but it looks
>> like nothing particularly major was changed anyway.
>>
>> Does this fall under Markus's jurisdiction?
>>
>> (Well, except for qtest.py which seemingly has double-extra-no
>> maintainer...!)
> 
> qemu.py is about starting and controlling QEMU, commonly for testing
> purposes.  It's related to QMP only by virtue of using QMP for control
> (well, what else could it use?); if that makes me maintainer, I'll soon
> maintain basically all tests :)
> 
> As far as I can tell, qemu.py's main user is still qemu-iotests, via
> qtest.py.  Dan factored it out to make it available for
> tests/migration/guestperf/.
> 
> Options for maintaining qemu.py and qtest.py:
> 
> * Maintain them with qemu-iotest
> 
>   Currently mainained with the block layer core, by Kevin and Max.
> 
>   - Keep it that way
> 
>   - Appoint qemu-iotest maintainer(s).
> 
> * Maintain them separately, say as "Python qtest support", appoint
>   maintainer(s)
> 
>   Dan appears to be a hot contender:
> 
>     $ scripts/get_maintainer.pl -f --git-blame scripts/qtest.py 
>     Fam Zheng <famz@redhat.com> (authored lines:71/110=65%,commits:1/3=33%)
>     "Daniel P. Berrange" <berrange@redhat.com> (authored lines:39/110=35%,commits:2/3=67%)
>     Max Reitz <mreitz@redhat.com> (commits:2/3=67%)
>     Amit Shah <amit.shah@redhat.com> (commits:1/3=33%)
>     Stefan Hajnoczi <stefanha@redhat.com> (commits:1/3=33%)
>     qemu-devel@nongnu.org (open list:All patches CC here)
>     $ scripts/get_maintainer.pl -f --git-blame scripts/qemu.py 
>     "Daniel P. Berrange" <berrange@redhat.com> (authored lines:217/229=95%,commits:2/4=50%)
>     Eduardo Habkost <ehabkost@redhat.com> (authored lines:12/229=5%,commits:4/4=100%)
>     Markus Armbruster <armbru@redhat.com> (commits:1/4=25%)
>     Max Reitz <mreitz@redhat.com> (commits:1/4=25%)
>     Amit Shah <amit.shah@redhat.com> (commits:1/4=25%)
>     qemu-devel@nongnu.org (open list:All patches CC here)
> 
>   Eduardo made the mistake^W^W^Wgraciously volunteered to maintain
>   scripts/qmp/qmp-shell, which is also used for testing.  Perhaps he'd
>   be willing to maintain these guys as well.
> 
> * Do nothing
> 
>   Hope "somebody" will take pity and merge patches.  A common value of
>   "somebody" would be Paolo.

Paolo is disappearing for two weeks starting Saturday, so you have
plenty of time to find another solution. :)

Paolo

Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by John Snow 6 years, 7 months ago

On 08/22/2017 03:24 AM, Markus Armbruster wrote:
> John Snow <jsnow@redhat.com> writes:
> 
>> On 08/18/2017 10:26 AM, Lukáš Doktor wrote:
>>> Hello guys,
>>>
>>> I'm reading the available python modules to exercise qemu and while reading them
>>> I fixed some issues that caught my attention. It usually starts with a simple
>>> pylint/docstring fixes and slowly graduates to more controversial ones so I'm
>>> open to suggestion to remove some of them.
>>>
>>> Kind regards,
>>> Lukáš
>>>
>>> Changes in v2
>>> - Squashed 2nd and 10th patches into 2nd one
>>> - Use repr() in MonitorResponseError's description
>>> - Improved commit message of the 6th patch
>>> - Two tweaks to docstrings changed in the 6th patch
>>> - Also updated qmp-shell to use new-style super calls (7th patch)
>>> - Fixed the accidental rename of qmp `cmd_id` (kept the id->cmd_id patch)
>>> - Changed the style of the style-fix in the 10th commit
>>>
>>> Changes in v3
>>> - Don't use repr in the 5th patch in MonitorResponseError
>>>
>>> Changes in v4
>>> - Use correct git base (remove unwanted commits)
>>>
>>> Changes in v5
>>> - Avoid bool comparison
>>> - Change report to return in one docstring
>>> - Removed the unnecessary spaces around single-line docstring
>>>
>>> Changes in v6
>>> - Bunch of docstring tweaks by Markus Armbruster
>>> - Line break in <80 chars
>>> - result dict => response dict
>>> - Removed the "event_match" rename
>>>
>>
>> Looks like all ten patches have an R-B despite changes; but it looks
>> like nothing particularly major was changed anyway.
>>
>> Does this fall under Markus's jurisdiction?
>>
>> (Well, except for qtest.py which seemingly has double-extra-no
>> maintainer...!)
> 
> qemu.py is about starting and controlling QEMU, commonly for testing
> purposes.  It's related to QMP only by virtue of using QMP for control
> (well, what else could it use?); if that makes me maintainer, I'll soon
> maintain basically all tests :)
> 
> As far as I can tell, qemu.py's main user is still qemu-iotests, via
> qtest.py.  Dan factored it out to make it available for
> tests/migration/guestperf/.
> 
> Options for maintaining qemu.py and qtest.py:
> 
> * Maintain them with qemu-iotest
> 
>   Currently mainained with the block layer core, by Kevin and Max.
> 
>   - Keep it that way
> 
>   - Appoint qemu-iotest maintainer(s).
> 
> * Maintain them separately, say as "Python qtest support", appoint
>   maintainer(s)
> 
>   Dan appears to be a hot contender:
> 
>     $ scripts/get_maintainer.pl -f --git-blame scripts/qtest.py 
>     Fam Zheng <famz@redhat.com> (authored lines:71/110=65%,commits:1/3=33%)
>     "Daniel P. Berrange" <berrange@redhat.com> (authored lines:39/110=35%,commits:2/3=67%)
>     Max Reitz <mreitz@redhat.com> (commits:2/3=67%)
>     Amit Shah <amit.shah@redhat.com> (commits:1/3=33%)
>     Stefan Hajnoczi <stefanha@redhat.com> (commits:1/3=33%)
>     qemu-devel@nongnu.org (open list:All patches CC here)
>     $ scripts/get_maintainer.pl -f --git-blame scripts/qemu.py 
>     "Daniel P. Berrange" <berrange@redhat.com> (authored lines:217/229=95%,commits:2/4=50%)
>     Eduardo Habkost <ehabkost@redhat.com> (authored lines:12/229=5%,commits:4/4=100%)
>     Markus Armbruster <armbru@redhat.com> (commits:1/4=25%)
>     Max Reitz <mreitz@redhat.com> (commits:1/4=25%)
>     Amit Shah <amit.shah@redhat.com> (commits:1/4=25%)
>     qemu-devel@nongnu.org (open list:All patches CC here)
> 
>   Eduardo made the mistake^W^W^Wgraciously volunteered to maintain
>   scripts/qmp/qmp-shell, which is also used for testing.  Perhaps he'd
>   be willing to maintain these guys as well.
> 
> * Do nothing
> 
>   Hope "somebody" will take pity and merge patches.  A common value of
>   "somebody" would be Paolo.
> 

Should we have an appointed python czar? There's been a lot of talk over
the right way to migrate from python2 to 3 and other design questions
about our python scripts and utilities going forward.

Might be nice to have a dedicated python-person to have a bit of an eye
over all of it...

Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by Eduardo Habkost 6 years, 7 months ago
On Tue, Aug 22, 2017 at 09:24:16AM +0200, Markus Armbruster wrote:
> John Snow <jsnow@redhat.com> writes:
> 
> > On 08/18/2017 10:26 AM, Lukáš Doktor wrote:
> >> Hello guys,
> >> 
> >> I'm reading the available python modules to exercise qemu and while reading them
> >> I fixed some issues that caught my attention. It usually starts with a simple
> >> pylint/docstring fixes and slowly graduates to more controversial ones so I'm
> >> open to suggestion to remove some of them.
> >> 
> >> Kind regards,
> >> Lukáš
> >> 
> >> Changes in v2
> >> - Squashed 2nd and 10th patches into 2nd one
> >> - Use repr() in MonitorResponseError's description
> >> - Improved commit message of the 6th patch
> >> - Two tweaks to docstrings changed in the 6th patch
> >> - Also updated qmp-shell to use new-style super calls (7th patch)
> >> - Fixed the accidental rename of qmp `cmd_id` (kept the id->cmd_id patch)
> >> - Changed the style of the style-fix in the 10th commit
> >> 
> >> Changes in v3
> >> - Don't use repr in the 5th patch in MonitorResponseError
> >> 
> >> Changes in v4
> >> - Use correct git base (remove unwanted commits)
> >> 
> >> Changes in v5
> >> - Avoid bool comparison
> >> - Change report to return in one docstring
> >> - Removed the unnecessary spaces around single-line docstring
> >> 
> >> Changes in v6
> >> - Bunch of docstring tweaks by Markus Armbruster
> >> - Line break in <80 chars
> >> - result dict => response dict
> >> - Removed the "event_match" rename
> >> 
> >
> > Looks like all ten patches have an R-B despite changes; but it looks
> > like nothing particularly major was changed anyway.
> >
> > Does this fall under Markus's jurisdiction?
> >
> > (Well, except for qtest.py which seemingly has double-extra-no
> > maintainer...!)
> 
> qemu.py is about starting and controlling QEMU, commonly for testing
> purposes.  It's related to QMP only by virtue of using QMP for control
> (well, what else could it use?); if that makes me maintainer, I'll soon
> maintain basically all tests :)
> 
> As far as I can tell, qemu.py's main user is still qemu-iotests, via
> qtest.py.  Dan factored it out to make it available for
> tests/migration/guestperf/.
> 
> Options for maintaining qemu.py and qtest.py:
> 
> * Maintain them with qemu-iotest
> 
>   Currently mainained with the block layer core, by Kevin and Max.
> 
>   - Keep it that way
> 
>   - Appoint qemu-iotest maintainer(s).
> 
> * Maintain them separately, say as "Python qtest support", appoint
>   maintainer(s)
> 
>   Dan appears to be a hot contender:
> 
>     $ scripts/get_maintainer.pl -f --git-blame scripts/qtest.py 
>     Fam Zheng <famz@redhat.com> (authored lines:71/110=65%,commits:1/3=33%)
>     "Daniel P. Berrange" <berrange@redhat.com> (authored lines:39/110=35%,commits:2/3=67%)
>     Max Reitz <mreitz@redhat.com> (commits:2/3=67%)
>     Amit Shah <amit.shah@redhat.com> (commits:1/3=33%)
>     Stefan Hajnoczi <stefanha@redhat.com> (commits:1/3=33%)
>     qemu-devel@nongnu.org (open list:All patches CC here)
>     $ scripts/get_maintainer.pl -f --git-blame scripts/qemu.py 
>     "Daniel P. Berrange" <berrange@redhat.com> (authored lines:217/229=95%,commits:2/4=50%)
>     Eduardo Habkost <ehabkost@redhat.com> (authored lines:12/229=5%,commits:4/4=100%)
>     Markus Armbruster <armbru@redhat.com> (commits:1/4=25%)
>     Max Reitz <mreitz@redhat.com> (commits:1/4=25%)
>     Amit Shah <amit.shah@redhat.com> (commits:1/4=25%)
>     qemu-devel@nongnu.org (open list:All patches CC here)
> 
>   Eduardo made the mistake^W^W^Wgraciously volunteered to maintain
>   scripts/qmp/qmp-shell, which is also used for testing.  Perhaps he'd
>   be willing to maintain these guys as well.

I could take care of queueing patches for the Python modules on
the same tree where qmp-shell patches would be queued.  However,
I would be happier if somebody else agreed to be listed as
co-maintainer to at least help on review and decision-making.

-- 
Eduardo

Re: [Qemu-devel] [PATCH v6 00/10] qemu.py: Pylint/style fixes
Posted by Eduardo Habkost 6 years, 7 months ago
On Fri, Aug 18, 2017 at 04:26:03PM +0200, Lukáš Doktor wrote:
> Hello guys,
> 
> I'm reading the available python modules to exercise qemu and while reading them
> I fixed some issues that caught my attention. It usually starts with a simple
> pylint/docstring fixes and slowly graduates to more controversial ones so I'm
> open to suggestion to remove some of them.
> 
> Kind regards,
> Lukáš

I'm queueing this series on a python-next branch at:

  https://github.com/ehabkost/qemu.git python-next

-- 
Eduardo