qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] a48e75: qapi/visit: remove useless prefix arg


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a48e75: qapi/visit: remove useless prefix argument
Date: Fri, 22 Jun 2018 10:02:29 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a48e7542be9ef6dab3c8d52f563298d06ef872c9
      
https://github.com/qemu/qemu/commit/a48e7542be9ef6dab3c8d52f563298d06ef872c9
  Author: Marc-André Lureau <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M scripts/qapi/visit.py

  Log Message:
  -----------
  qapi/visit: remove useless prefix argument

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: f030ffd39d6c1ea8fff281be5e4b19c819d7ce10
      
https://github.com/qemu/qemu/commit/f030ffd39d6c1ea8fff281be5e4b19c819d7ce10
  Author: Marc-André Lureau <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M scripts/qapi/events.py

  Log Message:
  -----------
  qapi/events: generate event enum in main module

The event generator produces an enum, and put it in the last visited
module. It fits better in the main module, since it's the set of all
visited events, from all modules.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: bf6e6a37ee8c2d80af258cabdd476498b68188ad
      
https://github.com/qemu/qemu/commit/bf6e6a37ee8c2d80af258cabdd476498b68188ad
  Author: Max Reitz <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M qobject/block-qdict.c

  Log Message:
  -----------
  qdict: Make qdict_flatten() shallow-clone-friendly

In its current form, qdict_flatten() removes all entries from nested
QDicts that are moved to the root QDict.  It is completely sufficient to
remove all old entries from the root QDict, however.  If the nested
dicts have a refcount of 1, this will automatically delete them, too.
And if they have a greater refcount, we probably do not want to modify
them in the first place.

The latter observation means that it was currently (in general)
impossible to qdict_flatten() a shallowly cloned dict because that would
empty nested QDicts in the original dict as well.  This patch changes
this, so you can now use qdict_flatten(qdict_shallow_clone(dict)) to get
a flattened copy without disturbing the original.

Signed-off-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: fe170d8bfaa12d63117cad8707ac18c3b2f3bb8e
      
https://github.com/qemu/qemu/commit/fe170d8bfaa12d63117cad8707ac18c3b2f3bb8e
  Author: Max Reitz <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M tests/check-block-qdict.c

  Log Message:
  -----------
  tests: Add QDict clone-flatten test

This new test verifies that qdict_flatten() does not modify a shallow
clone of the given QDict.

Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 800877bb1639d38ffaebe312a37b61c66bb10c83
      
https://github.com/qemu/qemu/commit/800877bb1639d38ffaebe312a37b61c66bb10c83
  Author: Anton Nefedov <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M scripts/qapi/common.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py
    M tests/Makefile.include
    R tests/qapi-schema/flat-union-incomplete-branch.err
    R tests/qapi-schema/flat-union-incomplete-branch.exit
    R tests/qapi-schema/flat-union-incomplete-branch.json
    R tests/qapi-schema/flat-union-incomplete-branch.out
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  qapi: allow empty branches in flat unions

It often happens that just a few discriminator values imply extra data in
a flat union. Existing checks did not make possible to leave other values
uncovered. Such cases had to be worked around by either stating a dummy
(empty) type or introducing another (subset) discriminator enumeration.

Both options create redundant entities in qapi files for little profit.

With this patch it is not necessary anymore to add designated union
fields for every possible value of a discriminator enumeration.

Signed-off-by: Anton Nefedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 29cd0403f19e4be928b50ce6247cee02c3dfd46b
      
https://github.com/qemu/qemu/commit/29cd0403f19e4be928b50ce6247cee02c3dfd46b
  Author: Anton Nefedov <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M block/qcow2.c
    M cpus.c
    M qapi/block-core.json
    M qapi/crypto.json
    M qapi/misc.json
    M qapi/net.json
    M qapi/ui.json

  Log Message:
  -----------
  qapi: remove empty flat union branches and types

Flat unions may now have uncovered branches, so it is possible to get rid
of empty types defined for that purpose only.

Signed-off-by: Anton Nefedov <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: de685ae5e9a4b523513033bd6cadc8187a227170
      
https://github.com/qemu/qemu/commit/de685ae5e9a4b523513033bd6cadc8187a227170
  Author: Markus Armbruster <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M scripts/qapi/common.py

  Log Message:
  -----------
  qapi: Open files with encoding='utf-8'

Python 2 happily reads UTF-8 files in text mode, but Python 3 requires
either UTF-8 locale or an explicit encoding passed to open().  Commit
d4e5ec877ca fixed this by setting the en_US.UTF-8 locale.  Falls apart
when the locale isn't be available.

Matthias Maier and Arfrever Frehtes Taifersar Arahesis proposed to use
binary mode instead, with manual conversion from bytes to str.  Works,
but opening with an explicit encoding is simpler, so do that.

Since Python 2's open() doesn't support the encoding parameter, we
need to suppress it with a version check.

Reported-by: Arfrever Frehtes Taifersar Arahesis <address@hidden>
Reported-by: Matthias Maier <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 0d6b93deeeb3cc190692d629f5927befdc8b1fb8
      
https://github.com/qemu/qemu/commit/0d6b93deeeb3cc190692d629f5927befdc8b1fb8
  Author: Matthias Maier <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M Makefile
    M tests/Makefile.include

  Log Message:
  -----------
  Revert commit d4e5ec877ca

This commit removes the PYTHON_UTF8 workaround. The problem with setting

  LC_ALL= LANG=C LC_CTYPE=en_US.UTF-8

is that the en_US.UTF-8 locale might not be available. In this case
setting above locales results in build errors even though another UTF-8
locale was originally set [1]. The only stable way of fixing the
encoding problem is by specifying the encoding in Python, like the
previous commit does.

[1] https://bugs.gentoo.org/657766

Signed-off-by: Arfrever Frehtes Taifersar Arahesis <address@hidden>
Signed-off-by: Matthias Maier <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
[Commit message tweaked]
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: da112e83c188ebe0fe5946c78ae7793341c93955
      
https://github.com/qemu/qemu/commit/da112e83c188ebe0fe5946c78ae7793341c93955
  Author: Markus Armbruster <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M scripts/qapi/introspect.py

  Log Message:
  -----------
  qapi/introspect: Eliminate pointless variable in .visit_end()

Commit 1a9a507b2e3 "qapi-introspect: Hide type names" added local
variable @jsons to improve sorting, but also removed the sorting.  It
was part of a big series that went to v8, and it made sense until v2
or so...

Commit 7d0f982bfbb replaced @jsons by @qlits, preserving the
uselessness.

Get rid of it.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>


  Commit: be25fcc4d2faeb3ffa8db813272963bae659c4c2
      
https://github.com/qemu/qemu/commit/be25fcc4d2faeb3ffa8db813272963bae659c4c2
  Author: Markus Armbruster <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Update QAPI stanza for commit fb0bc835e56

Commit fb0bc835e56 moved code from scripts/qapi-*.py to
scripts/qapi/*.py.  It neglected to update MAINTAINERS: scripts/qapi*
matches only the former, not the latter.  Do that now.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 7ed14cbf3cf083f125c079bd02b3215941853830
      
https://github.com/qemu/qemu/commit/7ed14cbf3cf083f125c079bd02b3215941853830
  Author: Peter Maydell <address@hidden>
  Date:   2018-06-22 (Fri, 22 Jun 2018)

  Changed paths:
    M MAINTAINERS
    M Makefile
    M block/qcow2.c
    M cpus.c
    M docs/devel/qapi-code-gen.txt
    M qapi/block-core.json
    M qapi/crypto.json
    M qapi/misc.json
    M qapi/net.json
    M qapi/ui.json
    M qobject/block-qdict.c
    M scripts/qapi/common.py
    M scripts/qapi/events.py
    M scripts/qapi/introspect.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py
    M tests/Makefile.include
    M tests/check-block-qdict.c
    R tests/qapi-schema/flat-union-incomplete-branch.err
    R tests/qapi-schema/flat-union-incomplete-branch.exit
    R tests/qapi-schema/flat-union-incomplete-branch.json
    R tests/qapi-schema/flat-union-incomplete-branch.out
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2018-06-22' into 
staging

QAPI patches for 2018-06-22

# gpg: Signature made Fri 22 Jun 2018 15:36:22 BST
# gpg:                using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2018-06-22:
  MAINTAINERS: Update QAPI stanza for commit fb0bc835e56
  qapi/introspect: Eliminate pointless variable in .visit_end()
  Revert commit d4e5ec877ca
  qapi: Open files with encoding='utf-8'
  qapi: remove empty flat union branches and types
  qapi: allow empty branches in flat unions
  tests: Add QDict clone-flatten test
  qdict: Make qdict_flatten() shallow-clone-friendly
  qapi/events: generate event enum in main module
  qapi/visit: remove useless prefix argument

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/5fce31220003...7ed14cbf3cf0
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]