[PATCH v4 0/6] scripts: More Python fixes

Philippe Mathieu-Daudé posted 6 patches 3 years, 11 months ago
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-quick@centos7 passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200512103238.7078-1-philmd@redhat.com
scripts/kvm/vmxcap                 |  7 ++++---
scripts/modules/module_block.py    | 31 +++++++++++++++---------------
scripts/qemu-gdb.py                |  4 ++--
scripts/qemugdb/__init__.py        |  3 +--
scripts/qemugdb/aio.py             |  3 +--
scripts/qemugdb/coroutine.py       |  3 +--
scripts/qemugdb/mtree.py           |  4 +---
scripts/qemugdb/tcg.py             |  1 -
scripts/qemugdb/timers.py          |  1 -
scripts/qmp/qom-get                |  2 +-
scripts/qmp/qom-list               |  2 +-
scripts/qmp/qom-set                |  2 +-
scripts/qmp/qom-tree               |  2 +-
tests/migration/guestperf-batch.py |  2 +-
tests/migration/guestperf-plot.py  |  2 +-
tests/migration/guestperf.py       |  2 +-
16 files changed, 33 insertions(+), 38 deletions(-)
[PATCH v4 0/6] scripts: More Python fixes
Posted by Philippe Mathieu-Daudé 3 years, 11 months ago
Trivial Python3 fixes, again...

Since v3:
- Fixed missing scripts/qemugdb/timers.py (kwolf)
- Cover more scripts
- Check for __main__ in few scripts

Since v2:
- Remove patch updating MAINTAINERS

Since v1:
- Added Alex Bennée A-b tags
- Addressed John Snow review comments
  - Use /usr/bin/env
  - Do not modify os.path (dropped last patch)

Philippe Mathieu-Daudé (6):
  scripts/qemugdb: Remove shebang header
  scripts/qemu-gdb: Use Python 3 interpreter
  scripts/qmp: Use Python 3 interpreter
  scripts/kvm/vmxcap: Use Python 3 interpreter and add pseudo-main()
  scripts/modules/module_block: Use Python 3 interpreter & add
    pseudo-main
  tests/migration/guestperf: Use Python 3 interpreter

 scripts/kvm/vmxcap                 |  7 ++++---
 scripts/modules/module_block.py    | 31 +++++++++++++++---------------
 scripts/qemu-gdb.py                |  4 ++--
 scripts/qemugdb/__init__.py        |  3 +--
 scripts/qemugdb/aio.py             |  3 +--
 scripts/qemugdb/coroutine.py       |  3 +--
 scripts/qemugdb/mtree.py           |  4 +---
 scripts/qemugdb/tcg.py             |  1 -
 scripts/qemugdb/timers.py          |  1 -
 scripts/qmp/qom-get                |  2 +-
 scripts/qmp/qom-list               |  2 +-
 scripts/qmp/qom-set                |  2 +-
 scripts/qmp/qom-tree               |  2 +-
 tests/migration/guestperf-batch.py |  2 +-
 tests/migration/guestperf-plot.py  |  2 +-
 tests/migration/guestperf.py       |  2 +-
 16 files changed, 33 insertions(+), 38 deletions(-)

-- 
2.21.3


Re: [PATCH v4 0/6] scripts: More Python fixes
Posted by Kevin Wolf 3 years, 11 months ago
Am 12.05.2020 um 12:32 hat Philippe Mathieu-Daudé geschrieben:
> Trivial Python3 fixes, again...
> 
> Since v3:
> - Fixed missing scripts/qemugdb/timers.py (kwolf)
> - Cover more scripts
> - Check for __main__ in few scripts

I'm not sure if the __main__ check actually provides anything useful in
source files of standalone tools that aren't supposed to be imported
from somewhere else. But of course, it's not wrong either.

Reviewed-by: Kevin Wolf <kwolf@redhat.com>


Re: [PATCH v4 0/6] scripts: More Python fixes
Posted by Philippe Mathieu-Daudé 3 years, 11 months ago
On 5/12/20 12:32 PM, Philippe Mathieu-Daudé wrote:
> Trivial Python3 fixes, again...
> 
> Since v3:
> - Fixed missing scripts/qemugdb/timers.py (kwolf)
> - Cover more scripts
> - Check for __main__ in few scripts
> 
> Since v2:
> - Remove patch updating MAINTAINERS
> 
> Since v1:
> - Added Alex Bennée A-b tags
> - Addressed John Snow review comments
>   - Use /usr/bin/env
>   - Do not modify os.path (dropped last patch)
> 
> Philippe Mathieu-Daudé (6):
>   scripts/qemugdb: Remove shebang header
>   scripts/qemu-gdb: Use Python 3 interpreter
>   scripts/qmp: Use Python 3 interpreter
>   scripts/kvm/vmxcap: Use Python 3 interpreter and add pseudo-main()
>   scripts/modules/module_block: Use Python 3 interpreter & add
>     pseudo-main
>   tests/migration/guestperf: Use Python 3 interpreter
> 
>  scripts/kvm/vmxcap                 |  7 ++++---
>  scripts/modules/module_block.py    | 31 +++++++++++++++---------------
>  scripts/qemu-gdb.py                |  4 ++--
>  scripts/qemugdb/__init__.py        |  3 +--
>  scripts/qemugdb/aio.py             |  3 +--
>  scripts/qemugdb/coroutine.py       |  3 +--
>  scripts/qemugdb/mtree.py           |  4 +---
>  scripts/qemugdb/tcg.py             |  1 -
>  scripts/qemugdb/timers.py          |  1 -
>  scripts/qmp/qom-get                |  2 +-
>  scripts/qmp/qom-list               |  2 +-
>  scripts/qmp/qom-set                |  2 +-
>  scripts/qmp/qom-tree               |  2 +-
>  tests/migration/guestperf-batch.py |  2 +-
>  tests/migration/guestperf-plot.py  |  2 +-
>  tests/migration/guestperf.py       |  2 +-
>  16 files changed, 33 insertions(+), 38 deletions(-)

Thanks, applied to my python-next tree:
https://gitlab.com/philmd/qemu/commits/python-next