* [PULL 0/2] Python patches
@ 2021-09-16 22:07 John Snow
2021-09-16 22:07 ` [PULL 1/2] python: Update for pylint 2.10 John Snow
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: John Snow @ 2021-09-16 22:07 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Thomas Huth, Daniel Berrange, Eduardo Habkost,
Alex Bennée, Markus Armbruster, Wainer dos Santos Moschetta,
Philippe Mathieu-Daudé, Willian Rampazzo, Cleber Rosa,
John Snow
The following changes since commit 831aaf24967a49d7750090b9dcfd6bf356f16529:
Merge remote-tracking branch 'remotes/marcandre/tags/misc-pull-request' into staging (2021-09-14 18:14:56 +0100)
are available in the Git repository at:
https://gitlab.com/jsnow/qemu.git tags/python-pull-request
for you to fetch changes up to eb8033f658e8b6f23ba9f4ef4a1b55894f7ea486:
python: pylint 2.11 support (2021-09-16 15:04:04 -0400)
----------------------------------------------------------------
Python Pull request
This fixes the check-python-tox job.
CI including optional jobs is all green:
https://gitlab.com/jsnow/qemu/-/pipelines/372151147
----------------------------------------------------------------
John Snow (2):
python: Update for pylint 2.10
python: pylint 2.11 support
python/qemu/machine/machine.py | 7 ++++++-
python/setup.cfg | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PULL 1/2] python: Update for pylint 2.10
2021-09-16 22:07 [PULL 0/2] Python patches John Snow
@ 2021-09-16 22:07 ` John Snow
2021-09-16 22:07 ` [PULL 2/2] python: pylint 2.11 support John Snow
2021-09-20 15:16 ` [PULL 0/2] Python patches Peter Maydell
2 siblings, 0 replies; 9+ messages in thread
From: John Snow @ 2021-09-16 22:07 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Thomas Huth, Daniel Berrange, Eduardo Habkost,
Alex Bennée, Markus Armbruster, Wainer dos Santos Moschetta,
Philippe Mathieu-Daudé, Willian Rampazzo, Cleber Rosa,
John Snow
A few new annoyances. Of note is the new warning for an unspecified
encoding when opening a text file, which actually does indicate a
potentially real problem; see
https://www.python.org/dev/peps/pep-0597/#motivation
Use LC_CTYPE to determine an encoding to use for interpreting QEMU's
terminal output. Note that Python states: "language code and encoding
may be None if their values cannot be determined" -- use a platform
default as a backup.
Notes: Passing encoding=None will generate a suppressed warning on
Python 3.10+ that 'None' should not be passed as the encoding
argument. This behavior may be deprecated in the future and the default
switched to be a ubiquitous UTF-8. Opting in to the locale default will
be done by passing the encoding 'locale', but that isn't available in
3.6 through 3.9. Presumably this warning will be unsuppressed some time
prior to the actual switch and we can re-investigate these issues at
that time if necessary.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-id: 20210916182248.721529-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/machine/machine.py | 7 ++++++-
python/setup.cfg | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
index a7081b1845..34131884a5 100644
--- a/python/qemu/machine/machine.py
+++ b/python/qemu/machine/machine.py
@@ -19,6 +19,7 @@
import errno
from itertools import chain
+import locale
import logging
import os
import shutil
@@ -290,8 +291,12 @@ def get_pid(self) -> Optional[int]:
return self._subp.pid
def _load_io_log(self) -> None:
+ # Assume that the output encoding of QEMU's terminal output is
+ # defined by our locale. If indeterminate, allow open() to fall
+ # back to the platform default.
+ _, encoding = locale.getlocale()
if self._qemu_log_path is not None:
- with open(self._qemu_log_path, "r") as iolog:
+ with open(self._qemu_log_path, "r", encoding=encoding) as iolog:
self._iolog = iolog.read()
@property
diff --git a/python/setup.cfg b/python/setup.cfg
index 83909c1c97..0f0cab098f 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -104,6 +104,7 @@ good-names=i,
[pylint.similarities]
# Ignore imports when computing similarities.
ignore-imports=yes
+ignore-signatures=yes
# Minimum lines number of a similarity.
# TODO: Remove after we opt in to Pylint 2.8.3. See commit msg.
--
2.31.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 2/2] python: pylint 2.11 support
2021-09-16 22:07 [PULL 0/2] Python patches John Snow
2021-09-16 22:07 ` [PULL 1/2] python: Update for pylint 2.10 John Snow
@ 2021-09-16 22:07 ` John Snow
2021-09-20 15:16 ` [PULL 0/2] Python patches Peter Maydell
2 siblings, 0 replies; 9+ messages in thread
From: John Snow @ 2021-09-16 22:07 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Thomas Huth, Daniel Berrange, Eduardo Habkost,
Alex Bennée, Markus Armbruster, Wainer dos Santos Moschetta,
Philippe Mathieu-Daudé, Willian Rampazzo, Cleber Rosa,
John Snow
We're not ready to enforce f-strings everywhere, so just silence this
new warning.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-id: 20210916182248.721529-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/setup.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/setup.cfg b/python/setup.cfg
index 0f0cab098f..fdca265fec 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -87,7 +87,7 @@ ignore_missing_imports = True
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
-disable=
+disable=consider-using-f-string,
[pylint.basic]
# Good variable names which should always be accepted, separated by a comma.
--
2.31.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PULL 0/2] Python patches
2021-09-16 22:07 [PULL 0/2] Python patches John Snow
2021-09-16 22:07 ` [PULL 1/2] python: Update for pylint 2.10 John Snow
2021-09-16 22:07 ` [PULL 2/2] python: pylint 2.11 support John Snow
@ 2021-09-20 15:16 ` Peter Maydell
2 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2021-09-20 15:16 UTC (permalink / raw)
To: John Snow
Cc: Thomas Huth, Daniel Berrange, Eduardo Habkost, QEMU Developers,
Wainer dos Santos Moschetta, Markus Armbruster, Willian Rampazzo,
Cleber Rosa, Alex Bennée, Philippe Mathieu-Daudé
On Thu, 16 Sept 2021 at 23:07, John Snow <jsnow@redhat.com> wrote:
>
> The following changes since commit 831aaf24967a49d7750090b9dcfd6bf356f16529:
>
> Merge remote-tracking branch 'remotes/marcandre/tags/misc-pull-request' into staging (2021-09-14 18:14:56 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/jsnow/qemu.git tags/python-pull-request
>
> for you to fetch changes up to eb8033f658e8b6f23ba9f4ef4a1b55894f7ea486:
>
> python: pylint 2.11 support (2021-09-16 15:04:04 -0400)
>
> ----------------------------------------------------------------
> Python Pull request
>
> This fixes the check-python-tox job.
>
> CI including optional jobs is all green:
> https://gitlab.com/jsnow/qemu/-/pipelines/372151147
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.2
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PULL 0/2] Python patches
@ 2023-02-23 4:36 John Snow
2023-02-24 15:07 ` Peter Maydell
0 siblings, 1 reply; 9+ messages in thread
From: John Snow @ 2023-02-23 4:36 UTC (permalink / raw)
To: qemu-devel
Cc: Hanna Reitz, Beraldo Leal, Markus Armbruster, Peter Maydell,
Thomas Huth, John Snow, Eduardo Habkost, Kevin Wolf,
Vladimir Sementsov-Ogievskiy, Philippe Mathieu-Daudé,
Wainer dos Santos Moschetta, Alex Bennée, qemu-block,
Cleber Rosa
The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8:
Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2023-02-21 11:28:31 +0000)
are available in the Git repository at:
https://gitlab.com/jsnow/qemu.git tags/python-pull-request
for you to fetch changes up to 6832189fd791622c30e7bbe3a12b76be14dc1158:
python: drop pipenv (2023-02-22 23:35:03 -0500)
----------------------------------------------------------------
Python
Only minor testing updates.
----------------------------------------------------------------
John Snow (2):
python: support pylint 2.16
python: drop pipenv
python/README.rst | 3 -
.gitlab-ci.d/static_checks.yml | 4 +-
python/.gitignore | 4 +-
python/Makefile | 53 ++-
python/Pipfile | 13 -
python/Pipfile.lock | 347 ------------------
python/qemu/qmp/protocol.py | 2 +-
python/qemu/qmp/qmp_client.py | 2 +-
python/qemu/utils/qemu_ga_client.py | 6 +-
python/setup.cfg | 4 +-
python/tests/minreqs.txt | 45 +++
tests/docker/dockerfiles/python.docker | 1 -
tests/qemu-iotests/iotests.py | 4 +-
.../tests/migrate-bitmaps-postcopy-test | 2 +-
14 files changed, 94 insertions(+), 396 deletions(-)
delete mode 100644 python/Pipfile
delete mode 100644 python/Pipfile.lock
create mode 100644 python/tests/minreqs.txt
--
2.39.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PULL 0/2] Python patches
2023-02-23 4:36 John Snow
@ 2023-02-24 15:07 ` Peter Maydell
0 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2023-02-24 15:07 UTC (permalink / raw)
To: John Snow
Cc: qemu-devel, Hanna Reitz, Beraldo Leal, Markus Armbruster,
Thomas Huth, Eduardo Habkost, Kevin Wolf,
Vladimir Sementsov-Ogievskiy, Philippe Mathieu-Daudé,
Wainer dos Santos Moschetta, Alex Bennée, qemu-block,
Cleber Rosa
On Thu, 23 Feb 2023 at 04:36, John Snow <jsnow@redhat.com> wrote:
>
> The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8:
>
> Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2023-02-21 11:28:31 +0000)
>
> are available in the Git repository at:
>
> https://gitlab.com/jsnow/qemu.git tags/python-pull-request
>
> for you to fetch changes up to 6832189fd791622c30e7bbe3a12b76be14dc1158:
>
> python: drop pipenv (2023-02-22 23:35:03 -0500)
>
> ----------------------------------------------------------------
> Python
>
> Only minor testing updates.
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PULL 0/2] Python patches
@ 2025-08-20 4:58 John Snow
2025-08-20 5:01 ` John Snow
0 siblings, 1 reply; 9+ messages in thread
From: John Snow @ 2025-08-20 4:58 UTC (permalink / raw)
To: qemu-devel
Cc: Cleber Rosa, Peter Maydell, Michael Roth, Markus Armbruster,
John Snow
The following changes since commit 5836af0783213b9355a6bbf85d9e6bc4c9c9363f:
Merge tag 'uefi-20250812-pull-request' of https://gitlab.com/kraxel/qemu into staging (2025-08-13 15:19:29 -0400)
are available in the Git repository at:
https://gitlab.com/jsnow/qemu.git tags/python-pull-request
for you to fetch changes up to 16398e73cd13c7d9f284d8ec4a440778fc2e3f9a:
python: avoid deprecation warning with get_event_loop (2025-08-20 00:55:27 -0400)
----------------------------------------------------------------
Python pull request
Necessary for Python 3.14 support for iotests, releasing October 7th
----------------------------------------------------------------
Daniel P. Berrangé (1):
python: avoid deprecation warning with get_event_loop
Richard W.M. Jones (1):
python: Replace asyncio.get_event_loop for Python 3.14
python/qemu/qmp/legacy.py | 10 +++++++++-
python/qemu/qmp/qmp_tui.py | 2 +-
python/tests/protocol.py | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
--
2.50.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PULL 0/2] Python patches
2025-08-20 4:58 John Snow
@ 2025-08-20 5:01 ` John Snow
2025-08-20 13:33 ` Daniel P. Berrangé
0 siblings, 1 reply; 9+ messages in thread
From: John Snow @ 2025-08-20 5:01 UTC (permalink / raw)
To: qemu-devel, Daniel Berrangé
Cc: Cleber Rosa, Peter Maydell, Michael Roth, Markus Armbruster
On Wed, Aug 20, 2025 at 12:58 AM John Snow <jsnow@redhat.com> wrote:
>
> The following changes since commit 5836af0783213b9355a6bbf85d9e6bc4c9c9363f:
>
> Merge tag 'uefi-20250812-pull-request' of https://gitlab.com/kraxel/qemu into staging (2025-08-13 15:19:29 -0400)
>
> are available in the Git repository at:
>
> https://gitlab.com/jsnow/qemu.git tags/python-pull-request
>
> for you to fetch changes up to 16398e73cd13c7d9f284d8ec4a440778fc2e3f9a:
>
> python: avoid deprecation warning with get_event_loop (2025-08-20 00:55:27 -0400)
>
> ----------------------------------------------------------------
> Python pull request
>
> Necessary for Python 3.14 support for iotests, releasing October 7th
>
> ----------------------------------------------------------------
>
> Daniel P. Berrangé (1):
> python: avoid deprecation warning with get_event_loop
>
> Richard W.M. Jones (1):
> python: Replace asyncio.get_event_loop for Python 3.14
>
> python/qemu/qmp/legacy.py | 10 +++++++++-
> python/qemu/qmp/qmp_tui.py | 2 +-
> python/tests/protocol.py | 2 +-
> 3 files changed, 11 insertions(+), 3 deletions(-)
>
> --
> 2.50.1
>
Dan: I wasn't sure if you were suggesting these to be pulled *right
away*, but just in case that is what you meant, I sent this PR for
what I think is the minimum necessary to avoid iotests croaking when
3.14 drops in October. Let me know if we need to make any other
adjustments here and I will follow up in the morning.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PULL 0/2] Python patches
2025-08-20 5:01 ` John Snow
@ 2025-08-20 13:33 ` Daniel P. Berrangé
0 siblings, 0 replies; 9+ messages in thread
From: Daniel P. Berrangé @ 2025-08-20 13:33 UTC (permalink / raw)
To: John Snow
Cc: qemu-devel, Cleber Rosa, Peter Maydell, Michael Roth,
Markus Armbruster
On Wed, Aug 20, 2025 at 01:01:06AM -0400, John Snow wrote:
> On Wed, Aug 20, 2025 at 12:58 AM John Snow <jsnow@redhat.com> wrote:
> >
> > The following changes since commit 5836af0783213b9355a6bbf85d9e6bc4c9c9363f:
> >
> > Merge tag 'uefi-20250812-pull-request' of https://gitlab.com/kraxel/qemu into staging (2025-08-13 15:19:29 -0400)
> >
> > are available in the Git repository at:
> >
> > https://gitlab.com/jsnow/qemu.git tags/python-pull-request
> >
> > for you to fetch changes up to 16398e73cd13c7d9f284d8ec4a440778fc2e3f9a:
> >
> > python: avoid deprecation warning with get_event_loop (2025-08-20 00:55:27 -0400)
> >
> > ----------------------------------------------------------------
> > Python pull request
> >
> > Necessary for Python 3.14 support for iotests, releasing October 7th
> >
> > ----------------------------------------------------------------
> >
> > Daniel P. Berrangé (1):
> > python: avoid deprecation warning with get_event_loop
> >
> > Richard W.M. Jones (1):
> > python: Replace asyncio.get_event_loop for Python 3.14
> >
> > python/qemu/qmp/legacy.py | 10 +++++++++-
> > python/qemu/qmp/qmp_tui.py | 2 +-
> > python/tests/protocol.py | 2 +-
> > 3 files changed, 11 insertions(+), 3 deletions(-)
> >
> > --
> > 2.50.1
> >
>
> Dan: I wasn't sure if you were suggesting these to be pulled *right
> away*, but just in case that is what you meant, I sent this PR for
> what I think is the minimum necessary to avoid iotests croaking when
> 3.14 drops in October. Let me know if we need to make any other
> adjustments here and I will follow up in the morning.
Only the 1st patch is important for the 10.1.0 release - the 2nd patch
doesn't take effect until the rest of my py series that explicitly
turns on warnings for iotests/functional tests.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-08-20 13:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-16 22:07 [PULL 0/2] Python patches John Snow
2021-09-16 22:07 ` [PULL 1/2] python: Update for pylint 2.10 John Snow
2021-09-16 22:07 ` [PULL 2/2] python: pylint 2.11 support John Snow
2021-09-20 15:16 ` [PULL 0/2] Python patches Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2023-02-23 4:36 John Snow
2023-02-24 15:07 ` Peter Maydell
2025-08-20 4:58 John Snow
2025-08-20 5:01 ` John Snow
2025-08-20 13:33 ` Daniel P. Berrangé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).