qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d0a263: qapi/expr: Comment cleanup


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] d0a263: qapi/expr: Comment cleanup
Date: Fri, 30 Apr 2021 08:07:43 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: d0a263cdd019116565682896d115ecd662515f78
      
https://github.com/qemu/qemu/commit/d0a263cdd019116565682896d115ecd662515f78
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr: Comment cleanup

The linter yaps after 0825f62c842. Fix this trivial issue to restore the
linter baseline.

(Yes, ideally -- and soon -- the linter will be part of CI so we don't
clutter up the log with fixups. For now, though, the baseline is useful
for testing intermediate commits as types are added to the QAPI
library.)

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-2-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: b7341b89c9c0212fef7b38b04ffaf39ea73bfca9
      
https://github.com/qemu/qemu/commit/b7341b89c9c0212fef7b38b04ffaf39ea73bfca9
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: Remove 'info' argument from nested check_if_str

The function can just use the argument from the scope above. Otherwise,
we get shadowed argument errors because the parameter name clashes with
the name of a variable already in-scope.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-3-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 0f231dcf2921fa8bc475d222a8ef81e67d4019e8
      
https://github.com/qemu/qemu/commit/0f231dcf2921fa8bc475d222a8ef81e67d4019e8
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: Check for dict instead of OrderedDict

OrderedDict is a subtype of dict, so we can check for a more general
form. These functions do not themselves depend on it being any
particular type.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-4-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 59b5556ce8c1d3dc1f2c6445ca32f2e515114a8e
      
https://github.com/qemu/qemu/commit/59b5556ce8c1d3dc1f2c6445ca32f2e515114a8e
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: constrain incoming expression types

mypy does not know the types of values stored in Dicts that masquerade
as objects. Help the type checker out by constraining the type.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-5-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: b66c62a2d3318c5d968d5b95428efb74ca5d5702
      
https://github.com/qemu/qemu/commit/b66c62a2d3318c5d968d5b95428efb74ca5d5702
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: Add assertion for union type 'check_dict'

mypy isn't fond of allowing you to check for bool membership in a
collection of str elements. Guard this lookup for precisely when we were
given a name.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-6-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 926bb8add7c549496c612fcd4a32f3cf37883c2a
      
https://github.com/qemu/qemu/commit/926bb8add7c549496c612fcd4a32f3cf37883c2a
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: move string check upwards in check_type

For readability purposes only, shimmy the early return upwards to the
top of the function, so cases proceed in order from least to most
complex.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-7-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 4918bb7defbdcb1e27cc2adf4e1604486d778ece
      
https://github.com/qemu/qemu/commit/4918bb7defbdcb1e27cc2adf4e1604486d778ece
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py
    A tests/qapi-schema/alternate-data-invalid.err
    A tests/qapi-schema/alternate-data-invalid.json
    A tests/qapi-schema/alternate-data-invalid.out
    M tests/qapi-schema/meson.build
    A tests/qapi-schema/union-invalid-data.err
    A tests/qapi-schema/union-invalid-data.json
    A tests/qapi-schema/union-invalid-data.out

  Log Message:
  -----------
  qapi/expr.py: Check type of union and alternate 'data' member

Prior to this commit, specifying a non-object value here causes the QAPI
parser to crash in expr.py with a stack trace with (likely) an
AttributeError when we attempt to call that value's items() method.

This member needs to be an object (Dict), and not anything else. Add a
check for this with a nicer error message, and formalize that check with
new test cases that exercise that error.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-8-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 7a783ce5b5a3ac4762b866e22370dd4fb30b91bf
      
https://github.com/qemu/qemu/commit/7a783ce5b5a3ac4762b866e22370dd4fb30b91bf
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: Add casts in a few select cases

Casts are instructions to the type checker only, they aren't "safe" and
should probably be avoided in general. In this case, when we perform
type checking on a nested structure, the type of each field does not
"stick".

(See PEP 647 for an example of "type narrowing" that does "stick".
 It is available in Python 3.10, so we can't use it yet.)

We don't need to assert that something is a str if we've already checked
or asserted that it is -- use a cast instead for these cases.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-9-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 538cd41065ae5e506a1a07e866b1fd40b4b53d07
      
https://github.com/qemu/qemu/commit/538cd41065ae5e506a1a07e866b1fd40b4b53d07
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: Modify check_keys to accept any Collection

This is a minor adjustment that lets parameters @required and
@optional take tuple arguments, in particular ().  Later patches will
make use of that.

(Iterable would also have worked, but Iterable also includes things like
generator expressions which are consumed upon iteration, which would
require a rewrite to make sure that each input was only traversed
once. Collection implies the "can re-iterate" property.)

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-10-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: b9ad358aa057e83f8039a1e222d6941d2bf1f70a
      
https://github.com/qemu/qemu/commit/b9ad358aa057e83f8039a1e222d6941d2bf1f70a
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py
    M scripts/qapi/mypy.ini

  Log Message:
  -----------
  qapi/expr.py: add type hint annotations

Annotations do not change runtime behavior.
This commit *only* adds annotations.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 210fd63104525b6e3154de529565258f19146f1a
      
https://github.com/qemu/qemu/commit/210fd63104525b6e3154de529565258f19146f1a
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: Consolidate check_if_str calls in check_if

This is a small rewrite to address some minor style nits.

Don't compare against the empty list to check for the empty condition, and
move the normalization forward to unify the check on the now-normalized
structure.

With the check unified, the local nested function isn't needed anymore
and can be brought down into the normal flow of the function. With the
nesting level changed, shuffle the error strings around a bit to get
them to fit in 79 columns.

Note: although ifcond is typed as Sequence[str] elsewhere, we *know* that
the parser will produce real, bona-fide lists. It's okay to check
isinstance(ifcond, list) here.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-12-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: e42648dccdd1defe8f35f247966cd7283f865cd6
      
https://github.com/qemu/qemu/commit/e42648dccdd1defe8f35f247966cd7283f865cd6
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: Remove single-letter variable

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-13-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 328e8ca71abb9be7084ba16baad2a770c4e32d92
      
https://github.com/qemu/qemu/commit/328e8ca71abb9be7084ba16baad2a770c4e32d92
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/pylintrc

  Log Message:
  -----------
  qapi/expr.py: enable pylint checks

Signed-off-by: John Snow <jsnow@redhat.com>
Tested-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-14-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 79e4fd14fb0f9e145413c6813dc541fdb50e3923
      
https://github.com/qemu/qemu/commit/79e4fd14fb0f9e145413c6813dc541fdb50e3923
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr: Only explicitly prohibit 'Kind' nor 'List' for type names

Per list review: qapi-code-gen.txt reserves suffixes Kind and
List only for type names, but the code rejects them for events and
commands, too.

It turns out we reject them earlier anyway: In check_name_upper() for
event names, and in check_name_lower() for command names.

Still, adjust the code for clarity over what precisely we are guarding
against.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-15-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: a48653638fab9c9a9356b41d6e11544b2a7b330f
      
https://github.com/qemu/qemu/commit/a48653638fab9c9a9356b41d6e11544b2a7b330f
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: Add docstrings

Now with more :words:!

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-16-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: eab99939a7cd289a8b50c2e7ef6a38ca2706a46c
      
https://github.com/qemu/qemu/commit/eab99939a7cd289a8b50c2e7ef6a38ca2706a46c
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr.py: Use tuples instead of lists for static data

It is -- maybe -- possibly -- three nanoseconds faster.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20210421182032.3521476-17-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: e81718c698a9f1a1d98edd605f508dadbffe0d4d
      
https://github.com/qemu/qemu/commit/e81718c698a9f1a1d98edd605f508dadbffe0d4d
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/expr.py

  Log Message:
  -----------
  qapi/expr: Update authorship and copyright information

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421182032.3521476-18-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 46f49468c690ff015a5b5346a279845f5e55369e
      
https://github.com/qemu/qemu/commit/46f49468c690ff015a5b5346a279845f5e55369e
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M docs/sphinx/qapidoc.py
    M scripts/qapi/error.py
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi/error: Repurpose QAPIError as an abstract base exception class

Rename QAPIError to QAPISourceError, and then create a new QAPIError
class that serves as the basis for all of our other custom exceptions,
without specifying any class properties.

This leaves QAPIError as a package-wide error class that's suitable for
any current or future errors.

(Right now, we don't have any errors that DON'T also want to specify a
Source location, but this MAY change. In these cases, a common abstract
ancestor would be desired.)

Add docstrings to explain the intended function of each error class.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421192233.3542904-2-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: b54e07cc46064e79de275c7ea26d90a51913a9ea
      
https://github.com/qemu/qemu/commit/b54e07cc46064e79de275c7ea26d90a51913a9ea
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/error.py

  Log Message:
  -----------
  qapi/error: Use Python3-style super()

Missed in commit 2cae67bcb5 "qapi: Use super() now we have Python 3".

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210421192233.3542904-3-jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 86cc2ff65a4764ade26c7741c7c05f23e7efa95c
      
https://github.com/qemu/qemu/commit/86cc2ff65a4764ade26c7741c7c05f23e7efa95c
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/error.py
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi/error: Make QAPISourceError 'col' parameter optional

It's already treated as optional, with one direct caller and some
subclass callers passing 'None'. Make it officially optional, which
requires moving the position of the argument to come after all required
parameters.

QAPISemError becomes functionally identical to QAPISourceError. Keep the
name to preserve its semantic meaning and avoid code churn, but remove
the now-useless __init__ wrapper.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421192233.3542904-4-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: ac89761179ed6e3165a63ad68759f77f33bace30
      
https://github.com/qemu/qemu/commit/ac89761179ed6e3165a63ad68759f77f33bace30
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/error.py

  Log Message:
  -----------
  qapi/error: assert QAPISourceInfo is not None

Built-in stuff is not parsed from a source file, and therefore have no
QAPISourceInfo. If such None info was used for reporting an error,
built-in stuff would be broken. Programming error. Instead of reporting
a confusing error with bogus source location then, we better crash.

We currently crash only if self.col was set. Assert that self.info is
not None in order to crash reliably.

We can not yet change the type of the initializer to prove this cannot
happen at static analysis time before the remainder of the code is fully
typed.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421192233.3542904-5-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: ac6a7d8884762d27cc2dde5a5c6e793cc18fc4d9
      
https://github.com/qemu/qemu/commit/ac6a7d8884762d27cc2dde5a5c6e793cc18fc4d9
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/error.py
    M scripts/qapi/parser.py

  Log Message:
  -----------
  qapi/error.py: move QAPIParseError to parser.py

Keeping it in error.py will create some cyclic import problems when we
add types to the QAPISchemaParser. Callers don't need to know the
details of QAPIParseError unless they are parsing or dealing directly
with the parser, so this won't create any harsh new requirements for
callers in the general case.

Update error.py with a little docstring that gives a nod to where the
error may now be found.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421192233.3542904-6-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 92870cf3afe42c0f2103ff3f5e4e7edd99549040
      
https://github.com/qemu/qemu/commit/92870cf3afe42c0f2103ff3f5e4e7edd99549040
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/pylintrc

  Log Message:
  -----------
  qapi/error.py: enable pylint checks

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210421192233.3542904-7-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 30d0a016e965796b41ac545b3d527f8080292869
      
https://github.com/qemu/qemu/commit/30d0a016e965796b41ac545b3d527f8080292869
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/error.py

  Log Message:
  -----------
  qapi/error: Add type hints

No functional change.

Note: QAPISourceError's info parameter is Optional[] because schema.py
treats the info property of its various classes as Optional to
accommodate built-in types, which have no source. See prior commit
'qapi/error: assert QAPISourceInfo is not None'.

Signed-off-by: John Snow <jsnow@redhat.com>

Message-Id: <20210421192233.3542904-8-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: b54626e0b8f423e91b2e31fa7741e4954cebd2d6
      
https://github.com/qemu/qemu/commit/b54626e0b8f423e91b2e31fa7741e4954cebd2d6
  Author: John Snow <jsnow@redhat.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M scripts/qapi/mypy.ini

  Log Message:
  -----------
  qapi/error.py: enable mypy checks

Signed-off-by: John Snow <jsnow@redhat.com>

Message-Id: <20210421192233.3542904-9-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 8f860d2633baf9c2b6261f703f86e394c6bc22ca
      
https://github.com/qemu/qemu/commit/8f860d2633baf9c2b6261f703f86e394c6bc22ca
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M docs/sphinx/qapidoc.py
    M scripts/qapi/error.py
    M scripts/qapi/expr.py
    M scripts/qapi/mypy.ini
    M scripts/qapi/parser.py
    M scripts/qapi/pylintrc
    M scripts/qapi/schema.py
    A tests/qapi-schema/alternate-data-invalid.err
    A tests/qapi-schema/alternate-data-invalid.json
    A tests/qapi-schema/alternate-data-invalid.out
    M tests/qapi-schema/meson.build
    A tests/qapi-schema/union-invalid-data.err
    A tests/qapi-schema/union-invalid-data.json
    A tests/qapi-schema/union-invalid-data.out

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-04-30' into 
staging

QAPI patches patches for 2021-04-30

# gpg: Signature made Fri 30 Apr 2021 12:42:32 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2021-04-30: (25 commits)
  qapi/error.py: enable mypy checks
  qapi/error: Add type hints
  qapi/error.py: enable pylint checks
  qapi/error.py: move QAPIParseError to parser.py
  qapi/error: assert QAPISourceInfo is not None
  qapi/error: Make QAPISourceError 'col' parameter optional
  qapi/error: Use Python3-style super()
  qapi/error: Repurpose QAPIError as an abstract base exception class
  qapi/expr: Update authorship and copyright information
  qapi/expr.py: Use tuples instead of lists for static data
  qapi/expr.py: Add docstrings
  qapi/expr: Only explicitly prohibit 'Kind' nor 'List' for type names
  qapi/expr.py: enable pylint checks
  qapi/expr.py: Remove single-letter variable
  qapi/expr.py: Consolidate check_if_str calls in check_if
  qapi/expr.py: add type hint annotations
  qapi/expr.py: Modify check_keys to accept any Collection
  qapi/expr.py: Add casts in a few select cases
  qapi/expr.py: Check type of union and alternate 'data' member
  qapi/expr.py: move string check upwards in check_type
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/f38d1ea49711...8f860d2633ba



reply via email to

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