* [Qemu-devel] [PULL 1/2] device-crash-test: Python 3 compatibility fix
2019-01-25 14:06 [Qemu-devel] [PULL 0/2] Python 3 compatibility fixes Eduardo Habkost
@ 2019-01-25 14:06 ` Eduardo Habkost
2019-01-25 14:06 ` [Qemu-devel] [PULL 2/2] decodetree: re.fullmatch was added in 3.4 Eduardo Habkost
2019-01-25 18:43 ` [Qemu-devel] [PULL 0/2] Python 3 compatibility fixes Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2019-01-25 14:06 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Eduardo Habkost, Alex Bennée, Cleber Rosa, Nisarg Shah
From: Nisarg Shah <nshah@disroot.org>
Restrict whitelist entry stats in debug mode to be sorted only by
"count", since Python 3 does not implicitly support comparing
dictionaries.
Signed-off-by: Nisarg Shah <nshah@disroot.org>
Message-Id: <20190116183358.30287-1-nshah@disroot.org>
[ehabkost: removed 2 unnecessary hunks from patch]
[ehabkost: edited commit message]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
scripts/device-crash-test | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 483dafb2fc..2a13fa4f84 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -557,7 +557,8 @@ def main():
logger.info("Skipped %d test cases", skipped)
if args.debug:
- stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in enumerate(ERROR_WHITELIST)])
+ stats = sorted([(len(wl_stats.get(i, [])), wl) for i, wl in
+ enumerate(ERROR_WHITELIST)], key=lambda x: x[0])
for count, wl in stats:
dbg("whitelist entry stats: %d: %r", count, wl)
--
2.18.0.rc1.1.g3f1ff2140
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/2] decodetree: re.fullmatch was added in 3.4
2019-01-25 14:06 [Qemu-devel] [PULL 0/2] Python 3 compatibility fixes Eduardo Habkost
2019-01-25 14:06 ` [Qemu-devel] [PULL 1/2] device-crash-test: Python 3 compatibility fix Eduardo Habkost
@ 2019-01-25 14:06 ` Eduardo Habkost
2019-01-25 18:43 ` [Qemu-devel] [PULL 0/2] Python 3 compatibility fixes Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2019-01-25 14:06 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Eduardo Habkost, Alex Bennée, Cleber Rosa, Paolo Bonzini
From: Paolo Bonzini <pbonzini@redhat.com>
Python 3 versions earlier than 3.4 do not have it, use the
same workaround that is in place for 3.0.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1548410602-16008-1-git-send-email-pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
scripts/decodetree.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 0bc73b5990..e342d278b8 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -204,7 +204,7 @@ def output(*args):
output_fd.write(a)
-if sys.version_info >= (3, 0):
+if sys.version_info >= (3, 4):
re_fullmatch = re.fullmatch
else:
def re_fullmatch(pat, str):
--
2.18.0.rc1.1.g3f1ff2140
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] Python 3 compatibility fixes
2019-01-25 14:06 [Qemu-devel] [PULL 0/2] Python 3 compatibility fixes Eduardo Habkost
2019-01-25 14:06 ` [Qemu-devel] [PULL 1/2] device-crash-test: Python 3 compatibility fix Eduardo Habkost
2019-01-25 14:06 ` [Qemu-devel] [PULL 2/2] decodetree: re.fullmatch was added in 3.4 Eduardo Habkost
@ 2019-01-25 18:43 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2019-01-25 18:43 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: QEMU Developers, Alex Bennée, Cleber Rosa
On Fri, 25 Jan 2019 at 14:06, Eduardo Habkost <ehabkost@redhat.com> wrote:
>
> The following changes since commit 9dd0d8111fbb8015db75a38933aee1d45f9e64a3:
>
> Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-01-24' into staging (2019-01-25 11:52:12 +0000)
>
> are available in the Git repository at:
>
> git://github.com/ehabkost/qemu.git tags/python-next-pull-request
>
> for you to fetch changes up to 651514df88fd53d537b3b78a7548663cc0816b1b:
>
> decodetree: re.fullmatch was added in 3.4 (2019-01-25 11:41:42 -0200)
>
> ----------------------------------------------------------------
> Python 3 compatibility fixes
>
> ----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread