mbox series

[00/10] Python: delint iotests, machine.py and console_socket.py

Message ID 20210512214642.2803189-1-jsnow@redhat.com (mailing list archive)
Headers show
Series Python: delint iotests, machine.py and console_socket.py | expand

Message

John Snow May 12, 2021, 9:46 p.m. UTC
gitlab CI: https://gitlab.com/jsnow/qemu/-/pipelines/301924893
branch: https://gitlab.com/jsnow/qemu/-/commits/python-package-pre-cleanup

This series serves as a pre-requisite for packaging the python series
and getting the linters running via CI. The first patch fixes a linter
error we've had for a while now; the subsequent 9 fix a new warning that
was recently added to pylint 2.8.x.

If there's nobody opposed, I'll take it through my Python queue,
including the iotests bits.

John Snow (10):
  python/console_socket: avoid one-letter variable
  python/machine: use subprocess.DEVNULL instead of
    open(os.path.devnull)
  python/machine: use subprocess.run instead of subprocess.Popen
  python/console_socket: Add a pylint ignore
  python/machine: Disable pylint warning for open() in _pre_launch
  python/machine: disable warning for Popen in _launch()
  iotests: use subprocess.run where possible
  iotests: use 'with open()' where applicable
  iotests: silence spurious consider-using-with warnings
  iotests: ensure that QemuIoInteractive definitely closes

 python/qemu/console_socket.py    | 11 ++++---
 python/qemu/machine.py           | 28 ++++++++++------
 tests/qemu-iotests/iotests.py    | 55 +++++++++++++++++++-------------
 tests/qemu-iotests/testrunner.py |  1 +
 4 files changed, 57 insertions(+), 38 deletions(-)

Comments

John Snow May 17, 2021, 4:11 p.m. UTC | #1
On 5/12/21 5:46 PM, John Snow wrote:
> gitlab CI: https://gitlab.com/jsnow/qemu/-/pipelines/301924893
> branch: https://gitlab.com/jsnow/qemu/-/commits/python-package-pre-cleanup
> 
> This series serves as a pre-requisite for packaging the python series
> and getting the linters running via CI. The first patch fixes a linter
> error we've had for a while now; the subsequent 9 fix a new warning that
> was recently added to pylint 2.8.x.
> 
> If there's nobody opposed, I'll take it through my Python queue,
> including the iotests bits.
> 
> John Snow (10):
>    python/console_socket: avoid one-letter variable
>    python/machine: use subprocess.DEVNULL instead of
>      open(os.path.devnull)
>    python/machine: use subprocess.run instead of subprocess.Popen
>    python/console_socket: Add a pylint ignore
>    python/machine: Disable pylint warning for open() in _pre_launch
>    python/machine: disable warning for Popen in _launch()
>    iotests: use subprocess.run where possible
>    iotests: use 'with open()' where applicable
>    iotests: silence spurious consider-using-with warnings
>    iotests: ensure that QemuIoInteractive definitely closes
> 
>   python/qemu/console_socket.py    | 11 ++++---
>   python/qemu/machine.py           | 28 ++++++++++------
>   tests/qemu-iotests/iotests.py    | 55 +++++++++++++++++++-------------
>   tests/qemu-iotests/testrunner.py |  1 +
>   4 files changed, 57 insertions(+), 38 deletions(-)
> 

The iotests stuff was handled by Emanuele Giuseppe Esposito instead, and 
-- I must admit -- better than I did. Dropping patches 7-10.

--js
Emanuele Giuseppe Esposito May 17, 2021, 5:02 p.m. UTC | #2
On 17/05/2021 18:11, John Snow wrote:
> On 5/12/21 5:46 PM, John Snow wrote:
>> gitlab CI: https://gitlab.com/jsnow/qemu/-/pipelines/301924893
>> branch: 
>> https://gitlab.com/jsnow/qemu/-/commits/python-package-pre-cleanup
>>
>> This series serves as a pre-requisite for packaging the python series
>> and getting the linters running via CI. The first patch fixes a linter
>> error we've had for a while now; the subsequent 9 fix a new warning that
>> was recently added to pylint 2.8.x.
>>
>> If there's nobody opposed, I'll take it through my Python queue,
>> including the iotests bits.
>>
>> John Snow (10):
>>    python/console_socket: avoid one-letter variable
>>    python/machine: use subprocess.DEVNULL instead of
>>      open(os.path.devnull)
>>    python/machine: use subprocess.run instead of subprocess.Popen
>>    python/console_socket: Add a pylint ignore
>>    python/machine: Disable pylint warning for open() in _pre_launch
>>    python/machine: disable warning for Popen in _launch()
>>    iotests: use subprocess.run where possible
>>    iotests: use 'with open()' where applicable
>>    iotests: silence spurious consider-using-with warnings
>>    iotests: ensure that QemuIoInteractive definitely closes
>>
>>   python/qemu/console_socket.py    | 11 ++++---
>>   python/qemu/machine.py           | 28 ++++++++++------
>>   tests/qemu-iotests/iotests.py    | 55 +++++++++++++++++++-------------
>>   tests/qemu-iotests/testrunner.py |  1 +
>>   4 files changed, 57 insertions(+), 38 deletions(-)
>>
> 
> The iotests stuff was handled by Emanuele Giuseppe Esposito instead, and 
> -- I must admit -- better than I did. Dropping patches 7-10.

Yes, patch 7-9 + the #pylint: disable= in patch 10 are covered in
"qemu-iotests: fix pylint 2.8 consider-using-with error"
https://patchew.org/QEMU/20210510190449.65948-1-eesposit@redhat.com/
that is merged.

Just wanted to point that maybe you want to keep part of patch 10, if 
you think that it is important :)

Emanuele