Revision tags: v9.2.0, v9.1.2, v9.1.1, v9.1.0, v8.0.0, v7.2.0, v7.0.0, v6.2.0, v6.1.0 |
|
#
8f860d26 |
| 30-Apr-2021 |
Peter Maydell <peter.maydell@linaro.org> |
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: usi
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>
show more ...
|
#
30d0a016 |
| 21-Apr-2021 |
John Snow <jsnow@redhat.com> |
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 bu
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>
show more ...
|
#
ac6a7d88 |
| 21-Apr-2021 |
John Snow <jsnow@redhat.com> |
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 QA
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>
show more ...
|
#
ac897611 |
| 21-Apr-2021 |
John Snow <jsnow@redhat.com> |
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
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>
show more ...
|
#
86cc2ff6 |
| 21-Apr-2021 |
John Snow <jsnow@redhat.com> |
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 requir
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>
show more ...
|
#
b54e07cc |
| 21-Apr-2021 |
John Snow <jsnow@redhat.com> |
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
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>
show more ...
|
#
46f49468 |
| 21-Apr-2021 |
John Snow <jsnow@redhat.com> |
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 ex
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>
show more ...
|
Revision tags: v5.2.0, v5.0.0 |
|
#
af4378c3 |
| 05-Mar-2020 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-03-05' into staging
QAPI patches for 2020-03-05
# gpg: Signature made Thu 05 Mar 2020 12:42:15 GMT # gpg: using RSA k
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-03-05' into staging
QAPI patches for 2020-03-05
# gpg: Signature made Thu 05 Mar 2020 12:42:15 GMT # 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-2020-03-05: qapi: Brush off some (py)lint qapi: Use super() now we have Python 3 qapi: Drop conditionals for Python 2 qapi: Inheriting from object is pointless with Python 3, drop
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
2cae67bc |
| 04-Mar-2020 |
Markus Armbruster <armbru@redhat.com> |
qapi: Use super() now we have Python 3
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200304155932.20452-4-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
|
Revision tags: v4.2.0 |
|
#
69717d0f |
| 23-Oct-2019 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-10-22-v3' into staging
QAPI patches for 2019-10-22
# gpg: Signature made Tue 22 Oct 2019 15:56:36 BST # gpg: using RS
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-10-22-v3' into staging
QAPI patches for 2019-10-22
# gpg: Signature made Tue 22 Oct 2019 15:56:36 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-2019-10-22-v3: qapi: Allow introspecting fix for savevm's cooperation with blockdev tests/qapi-schema: Cover feature documentation comments tests: qapi: Test 'features' of commands qapi: Add feature flags to commands tests/qapi-schema: Tidy up test output indentation qapi: Clear scripts/qapi/doc.py executable bits again qapi: Split up scripts/qapi/common.py qapi: Move gen_enum(), gen_enum_lookup() back to qapi/types.py qapi: Speed up frontend tests qapi: Eliminate accidental global frontend state qapi: Store pragma state in QAPISourceInfo, not global state qapi: Don't suppress doc generation without pragma doc-required
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
e6c42b96 |
| 18-Oct-2019 |
Markus Armbruster <armbru@redhat.com> |
qapi: Split up scripts/qapi/common.py
The QAPI code generator clocks in at some 3100 SLOC in 8 source files. Almost 60% of the code is in qapi/common.py. Split it into more focused modules:
* Move
qapi: Split up scripts/qapi/common.py
The QAPI code generator clocks in at some 3100 SLOC in 8 source files. Almost 60% of the code is in qapi/common.py. Split it into more focused modules:
* Move QAPISchemaPragma and QAPISourceInfo to qapi/source.py.
* Move QAPIError and its sub-classes to qapi/error.py.
* Move QAPISchemaParser and QAPIDoc to parser.py. Use the opportunity to put QAPISchemaParser first.
* Move check_expr() & friends to qapi/expr.py. Use the opportunity to put the code into a more sensible order.
* Move QAPISchema & friends to qapi/schema.py
* Move QAPIGen and its sub-classes, ifcontext, QAPISchemaModularCVisitor, and QAPISchemaModularCVisitor to qapi/gen.py
* Delete camel_case(), it's unused since commit e98859a9b9 "qapi: Clean up after recent conversions to QAPISchemaVisitor"
A number of helper functions remain in qapi/common.py. I considered moving the code generator helpers to qapi/gen.py, but decided not to. Perhaps we should rewrite them as methods of QAPIGen some day.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20191018074345.24034-7-armbru@redhat.com> [Add "# -*- coding: utf-8 -*-" lines]
show more ...
|