[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 1ec43c: docs: repair broken references
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 1ec43c: docs: repair broken references |
Date: |
Mon, 12 Oct 2020 04:45:31 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 1ec43ca42e153414f586aeda45f37acffbfd1ca1
https://github.com/qemu/qemu/commit/1ec43ca42e153414f586aeda45f37acffbfd1ca1
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M docs/devel/multi-thread-tcg.rst
M docs/devel/testing.rst
Log Message:
-----------
docs: repair broken references
In two different places, we are not making a cross-reference to some
resource correctly.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20201009161558.107041-2-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: adcb9b36c9b0a63e3b0cf81994430cfb0d720571
https://github.com/qemu/qemu/commit/adcb9b36c9b0a63e3b0cf81994430cfb0d720571
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/gen.py
Log Message:
-----------
qapi: modify docstrings to be sphinx-compatible
A precise style guide and a package-wide overhaul is forthcoming pending
further discussion and consensus. For now, merely avoid obvious errors
that cause Sphinx documentation build problems, using a style loosely
based on PEP 257 and Sphinx Autodoc. It is chosen for interoperability
with our existing Sphinx framework, and because it has loose recognition
in the Pycharm IDE.
See also:
https://www.python.org/dev/peps/pep-0257/
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#info-field-lists
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20201009161558.107041-3-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 52a474180ae36362c95276d92c4eb306cc9d86a0
https://github.com/qemu/qemu/commit/52a474180ae36362c95276d92c4eb306cc9d86a0
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi-gen.py
Log Message:
-----------
qapi-gen: Separate arg-parsing from generation
This is a minor re-work of the entrypoint script. It isolates a
generate() method from the actual command-line mechanism.
Signed-off-by: John Snow <jsnow@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: <20201009161558.107041-4-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[invalid_char() renamed to invalid_prefix_char()]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: a76ab215ec3cd45937d602ae468401ac14abd424
https://github.com/qemu/qemu/commit/a76ab215ec3cd45937d602ae468401ac14abd424
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi-gen.py
A scripts/qapi/main.py
Log Message:
-----------
qapi: move generator entrypoint into package
As part of delinting and adding type hints to the QAPI generator, it's
helpful for the entrypoint to be part of the package, only leaving a
very tiny entrypoint shim outside of the package.
Signed-off-by: John Snow <jsnow@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: <20201009161558.107041-5-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[invalid_char() renamed to invalid_prefix_char()]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 7137a96099644734cd6045313823840d4cecd5e8
https://github.com/qemu/qemu/commit/7137a96099644734cd6045313823840d4cecd5e8
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/commands.py
M scripts/qapi/events.py
M scripts/qapi/expr.py
M scripts/qapi/gen.py
M scripts/qapi/introspect.py
M scripts/qapi/main.py
M scripts/qapi/parser.py
M scripts/qapi/schema.py
M scripts/qapi/types.py
M scripts/qapi/visit.py
Log Message:
-----------
qapi: Prefer explicit relative imports
All of the QAPI include statements are changed to be package-aware, as
explicit relative imports.
A quirk of Python packages is that the name of the package exists only
*outside* of the package. This means that to a module inside of the qapi
folder, there is inherently no such thing as the "qapi" package. The
reason these imports work is because the "qapi" package exists in the
context of the caller -- the execution shim, where sys.path includes a
directory that has a 'qapi' folder in it.
When we write "from qapi import sibling", we are NOT referencing the folder
'qapi', but rather "any package named qapi in sys.path". If you should
so happen to have a 'qapi' package in your path, it will use *that*
package.
When we write "from .sibling import foo", we always reference explicitly
our sibling module; guaranteeing consistency in *where* we are importing
these modules from.
This can be useful when working with virtual environments and packages
in development mode. In development mode, a package is installed as a
series of symlinks that forwards to your same source files. The problem
arises because code quality checkers will follow "import qapi.x" to the
"installed" version instead of the sibling file and -- even though they
are the same file -- they have different module paths, and this causes
cyclic import problems, false positive type mismatch errors, and more.
It can also be useful when dealing with hierarchical packages, e.g. if
we allow qemu.core.qmp, qemu.qapi.parser, etc.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201009161558.107041-6-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 5af8263d40c698c47befd4c0bed3d6c452b56d82
https://github.com/qemu/qemu/commit/5af8263d40c698c47befd4c0bed3d6c452b56d82
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/commands.py
M scripts/qapi/events.py
M scripts/qapi/gen.py
M scripts/qapi/introspect.py
M scripts/qapi/types.py
M scripts/qapi/visit.py
Log Message:
-----------
qapi: Remove wildcard includes
Wildcard includes become hard to manage when refactoring and dealing
with circular dependencies with strictly typed mypy.
flake8 also flags each one as a warning, as it is not smart enough to
know which names exist in the imported file.
Remove them and include things explicitly by name instead.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201009161558.107041-7-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 67fea575023a9b2871414857770aafd334a6e39d
https://github.com/qemu/qemu/commit/67fea575023a9b2871414857770aafd334a6e39d
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
A scripts/qapi/.isort.cfg
M scripts/qapi/expr.py
M scripts/qapi/introspect.py
M scripts/qapi/parser.py
M scripts/qapi/schema.py
Log Message:
-----------
qapi: enforce import order/styling with isort
While we're mucking around with imports, we might as well formalize the
style we use. Let's use isort to do it for us.
lines_after_imports=2: Use two lines after imports, to match PEP8's
desire to have "two lines before and after" class definitions, which are
likely to start immediately after imports.
force_sort_within_sections: Intermingles "from x" and "import x" style
statements, such that sorting is always performed strictly on the module
name itself.
force_grid_wrap=4: Four or more imports from a single module will force
the one-per-line style that's more git-friendly. This will generally
happen for 'typing' imports.
multi_line_output=3: Uses the one-per-line indented style for long
imports.
include_trailing_comma: Adds a comma to the last import in a group,
which makes git conflicts nicer to deal with, generally.
line_length: 72 is chosen to match PEP8's "docstrings and comments" line
length limit. If you have a single line import that exceeds 72
characters, your names are too long!
Suggested-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20201009161558.107041-8-jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 42c0dd122299cf2aa6ef8668afe95f4c332833df
https://github.com/qemu/qemu/commit/42c0dd122299cf2aa6ef8668afe95f4c332833df
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
A scripts/qapi/.flake8
M scripts/qapi/commands.py
M scripts/qapi/schema.py
M scripts/qapi/visit.py
Log Message:
-----------
qapi: delint using flake8
Petty style guide fixes and line length enforcement. Not a big win, not
a big loss, but flake8 passes 100% on the qapi module, which gives us an
easy baseline to enforce hereafter.
A note on the flake8 exception: flake8 will warn on *any* bare except,
but pylint's is context-aware and will suppress the warning if you
re-raise the exception.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-9-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: e6522d889ac22ca0d5d63de707bb6dfc43fed5f0
https://github.com/qemu/qemu/commit/e6522d889ac22ca0d5d63de707bb6dfc43fed5f0
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
A scripts/qapi/pylintrc
Log Message:
-----------
qapi: add pylintrc
Using `pylint --generate-rcfile > pylintrc`, generate a skeleton
pylintrc file. Sections that are not presently relevant (by the end of
this series) are removed leaving just the empty section as a search
engine / documentation hint to future authors.
I am targeting pylint 2.6.0. In the future (and hopefully before 5.2 is
released), I aim to have gitlab CI running the specific targeted
versions of pylint, mypy, flake8, etc in a job.
2.5.x will work if you additionally pass --disable=bad-whitespace.
This warning was removed from 2.6.x, for lack of consistent support.
Right now, quite a few modules are ignored as they are known to fail as
of this commit. modules will be removed from the known-bad list
throughout this and following series as they are repaired.
Note: Normally, pylintrc would go in the folder above the module, but as
that folder is shared by many things, it is going inside the module
folder (for now). Due to a bug in pylint 2.5+, pylint does not
correctly recognize when it is being run from "inside" a package, and
must be run *outside* of the package.
Therefore, to run it, you must:
> pylint scripts/qapi/ --rcfile=scripts/qapi/pylintrc
Signed-off-by: John Snow <jsnow@redhat.com>
Tested-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-10-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 341f6afbac5afb41eb3291a060332f92bbb0f9c7
https://github.com/qemu/qemu/commit/341f6afbac5afb41eb3291a060332f92bbb0f9c7
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/common.py
Log Message:
-----------
qapi/common.py: Remove python compatibility workaround
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: cbe8f87f975264ee5b61795dc86f70915fb5f5f3
https://github.com/qemu/qemu/commit/cbe8f87f975264ee5b61795dc86f70915fb5f5f3
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/common.py
M scripts/qapi/visit.py
Log Message:
-----------
qapi/common.py: Add indent manager
Code style tools really dislike the use of global keywords, because it
generally involves re-binding the name at runtime which can have strange
effects depending on when and how that global name is referenced in
other modules.
Make a little indent level manager instead.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-12-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: a7aa64a6aed6d1979881a07dc3d889fc7366cce2
https://github.com/qemu/qemu/commit/a7aa64a6aed6d1979881a07dc3d889fc7366cce2
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/common.py
M scripts/qapi/schema.py
Log Message:
-----------
qapi/common.py: delint with pylint
At this point, that just means using a consistent strategy for constant names.
constants get UPPER_CASE and names not used externally get a leading underscore.
As a preference, while renaming constants to be UPPERCASE, move them to
the head of the file. Generally, it's nice to be able to audit the code
that runs on import in one central place.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-13-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 73951712b1cc87a5599c92920ad8d23352b82418
https://github.com/qemu/qemu/commit/73951712b1cc87a5599c92920ad8d23352b82418
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/common.py
Log Message:
-----------
qapi/common.py: Replace one-letter 'c' variable
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201009161558.107041-14-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 9c2a7b17f264bbd75cf2089f3b9689697bc1600c
https://github.com/qemu/qemu/commit/9c2a7b17f264bbd75cf2089f3b9689697bc1600c
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/pylintrc
Log Message:
-----------
qapi/common.py: check with pylint
Remove qapi/common.py from the pylintrc ignore list.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20201009161558.107041-15-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: d646b2a128391293f9a9b5924d0b62149f992496
https://github.com/qemu/qemu/commit/d646b2a128391293f9a9b5924d0b62149f992496
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/common.py
Log Message:
-----------
qapi/common.py: add type hint annotations
Annotations do not change runtime behavior.
This commit *only* adds annotations.
Note that build_params() cannot be fully annotated due to import
dependency issues. The commit after next will take care of it.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-16-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 1cc7398dfa30fffbb23b79ff7cacea18b3c9b674
https://github.com/qemu/qemu/commit/1cc7398dfa30fffbb23b79ff7cacea18b3c9b674
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/common.py
Log Message:
-----------
qapi/common.py: Convert comments into docstrings, and elaborate
As docstrings, they'll show up in documentation and IDE help.
The docstring style being targeted is the Sphinx documentation
style. Sphinx uses an extension of ReST with "domains". We use the
(implicit) Python domain, which supports a number of custom "info
fields". Those info fields are documented here:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#info-field-lists
Primarily, we use `:param X: descr`, `:return[s]: descr`, and `:raise[s]
Z: when`. Everything else is the Sphinx dialect of ReST.
(No, nothing checks or enforces this style that I am aware of. Sphinx
either chokes or succeeds, but does not enforce a standard of what is
otherwise inside the docstring. Pycharm does highlight when your param
fields are not aligned with the actual fields present. It does not
highlight missing return or exception statements. There is no existing
style guide I am aware of that covers a standard for a minimally
acceptable docstring. I am debating writing one.)
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-17-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: e6a34cd7a440e6ba04251612aa6eb036d3c47d98
https://github.com/qemu/qemu/commit/e6a34cd7a440e6ba04251612aa6eb036d3c47d98
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/commands.py
M scripts/qapi/common.py
M scripts/qapi/events.py
M scripts/qapi/gen.py
Log Message:
-----------
qapi/common.py: move build_params into gen.py
Including it in common.py creates a circular import dependency; schema
relies on common, but common.build_params requires a type annotation
from schema. To type this properly, it needs to be moved outside the
cycle.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-18-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 7e09d7882dc1c9464c0fda260fe288011c612adc
https://github.com/qemu/qemu/commit/7e09d7882dc1c9464c0fda260fe288011c612adc
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
A scripts/qapi/mypy.ini
M scripts/qapi/schema.py
Log Message:
-----------
qapi: establish mypy type-checking baseline
Fix a minor typing issue, and then establish a mypy type-checking
baseline.
Like pylint, this should be run from the folder above:
> mypy --config-file=qapi/mypy.ini qapi/
This is designed and tested for mypy 0.770 or greater.
Signed-off-by: John Snow <jsnow@redhat.com>
Tested-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-19-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: d1b21b393e7ae1a387a7c81f633d924a66d29408
https://github.com/qemu/qemu/commit/d1b21b393e7ae1a387a7c81f633d924a66d29408
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/events.py
M scripts/qapi/mypy.ini
Log Message:
-----------
qapi/events.py: add type hint annotations
Annotations do not change runtime behavior.
This commit *only* adds annotations.
Note: __init__ does not need its return type annotated, as it is special.
https://mypy.readthedocs.io/en/stable/class_basics.html#annotating-init-methods
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-20-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 1a503761e451549ba7457848d3955bd3391438d6
https://github.com/qemu/qemu/commit/1a503761e451549ba7457848d3955bd3391438d6
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/events.py
Log Message:
-----------
qapi/events.py: Move comments into docstrings
Clarify them while we're here.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-21-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: ab2d8a75b6437b7386f77c5025e1331c20a5ac4e
https://github.com/qemu/qemu/commit/ab2d8a75b6437b7386f77c5025e1331c20a5ac4e
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/commands.py
Log Message:
-----------
qapi/commands.py: Don't re-bind to variable of different type
Mypy isn't a fan of rebinding a variable with a new data type.
It's easy enough to avoid.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20201009161558.107041-22-jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 7304721f9e010edb9c06fdc578123b4b8c7205ae
https://github.com/qemu/qemu/commit/7304721f9e010edb9c06fdc578123b4b8c7205ae
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/commands.py
M scripts/qapi/mypy.ini
Log Message:
-----------
qapi/commands.py: add type hint annotations
Annotations do not change runtime behavior.
This commit *only* adds annotations.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-23-jsnow@redhat.com>
Message-Id: <20201009161558.107041-24-jsnow@redhat.com>
[mypy.ini update squashed in]
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: f5d4361cda562871ea8c480ce0cf5b1bc835456b
https://github.com/qemu/qemu/commit/f5d4361cda562871ea8c480ce0cf5b1bc835456b
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/mypy.ini
M scripts/qapi/source.py
Log Message:
-----------
qapi/source.py: add type hint annotations
Annotations do not change runtime behavior.
This commit *only* adds annotations.
A note on typing of __init__: mypy requires init functions with no
parameters to document a return type of None to be considered fully
typed. In the case when there are input parameters, None may be omitted.
Since __init__ may never return any value, it is preferred to omit the
return annotation whenever possible.
Signed-off-by: John Snow <jsnow@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: <20201009161558.107041-25-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 96670e89eca099a92492818b45427b567b1fb0de
https://github.com/qemu/qemu/commit/96670e89eca099a92492818b45427b567b1fb0de
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/pylintrc
M scripts/qapi/source.py
Log Message:
-----------
qapi/source.py: delint with pylint
Shush an error and leave a hint for future cleanups when we're allowed
to use Python 3.7+.
Signed-off-by: John Snow <jsnow@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: <20201009161558.107041-26-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 3ae1c848516d92531a73f2e7f1799c3572f680c5
https://github.com/qemu/qemu/commit/3ae1c848516d92531a73f2e7f1799c3572f680c5
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/gen.py
Log Message:
-----------
qapi/gen: Make _is_user_module() return bool
_is_user_module() returns thruth values. The next commit wants it to
return bool. Make it so.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201009161558.107041-27-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message rewritten]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 17d40c395748dab4cd579d698b89ba6f51ffb692
https://github.com/qemu/qemu/commit/17d40c395748dab4cd579d698b89ba6f51ffb692
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/gen.py
M scripts/qapi/mypy.ini
Log Message:
-----------
qapi/gen.py: add type hint annotations
Annotations do not change runtime behavior.
This commit *only* adds annotations.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-28-jsnow@redhat.com>
Message-Id: <20201009161558.107041-29-jsnow@redhat.com>
[mypy.ini update squashed in]
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 0cbd5b0516814a07004d6bd22e5c323f8314273f
https://github.com/qemu/qemu/commit/0cbd5b0516814a07004d6bd22e5c323f8314273f
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/gen.py
Log Message:
-----------
qapi/gen.py: Remove unused parameter
_module_dirname doesn't use the 'what' argument, so remove it.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-30-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: cc6263c44b3ad70a8cb884518e78e70c17f180d0
https://github.com/qemu/qemu/commit/cc6263c44b3ad70a8cb884518e78e70c17f180d0
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/gen.py
Log Message:
-----------
qapi/gen.py: update write() to be more idiomatic
Make the file handling here just a tiny bit more idiomatic.
(I realize this is heavily subjective.)
Use exist_ok=True for os.makedirs and remove the exception,
use fdopen() to wrap the file descriptor in a File-like object,
and use a context manager for managing the file pointer.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20201009161558.107041-31-jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 9abddb5be44245e8529a8c132a16176fc63d0df6
https://github.com/qemu/qemu/commit/9abddb5be44245e8529a8c132a16176fc63d0df6
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/gen.py
M scripts/qapi/pylintrc
Log Message:
-----------
qapi/gen.py: delint with pylint
'fp' and 'fd' are self-evident in context, add them to the list of OK
names.
_top and _bottom also need to stay standard methods because some users
override the method and need to use `self`. Tell pylint to shush.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-32-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: cd073c8fb0e86f135dbc573c2651863867183a75
https://github.com/qemu/qemu/commit/cd073c8fb0e86f135dbc573c2651863867183a75
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/mypy.ini
M scripts/qapi/types.py
Log Message:
-----------
qapi/types.py: add type hint annotations
Annotations do not change runtime behavior.
This commit *only* adds annotations.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-33-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: dec44d3d659446c333c52e0c95c996b6881f94d6
https://github.com/qemu/qemu/commit/dec44d3d659446c333c52e0c95c996b6881f94d6
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/pylintrc
M scripts/qapi/types.py
Log Message:
-----------
qapi/types.py: remove one-letter variables
"John, if pylint told you to jump off a bridge, would you?"
Hey, if it looked like fun, I might.
Now that this file is clean, enable pylint checks on this file.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-34-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 554df4f33f2076f973b4ae6bc55b5160f513634f
https://github.com/qemu/qemu/commit/554df4f33f2076f973b4ae6bc55b5160f513634f
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/visit.py
Log Message:
-----------
qapi/visit.py: assert tag_member contains a QAPISchemaEnumType
This is true by design, but not presently able to be expressed in the
type system. An assertion helps mypy understand our constraints.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20201009161558.107041-35-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 2cc1eefb84c9608661889f4deffe89f1c9aef6bb
https://github.com/qemu/qemu/commit/2cc1eefb84c9608661889f4deffe89f1c9aef6bb
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/pylintrc
M scripts/qapi/visit.py
Log Message:
-----------
qapi/visit.py: remove unused parameters from gen_visit_object
And this fixes the pylint report for this file, so make sure we check
this in the future, too.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201009161558.107041-36-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: b4c0aa59aff520e2a55edd5fef393058ca6520de
https://github.com/qemu/qemu/commit/b4c0aa59aff520e2a55edd5fef393058ca6520de
Author: John Snow <jsnow@redhat.com>
Date: 2020-10-10 (Sat, 10 Oct 2020)
Changed paths:
M scripts/qapi/mypy.ini
M scripts/qapi/visit.py
Log Message:
-----------
qapi/visit.py: add type hint annotations
Annotations do not change runtime behavior.
This commit *only* adds annotations.
Signed-off-by: John Snow <jsnow@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: <20201009161558.107041-37-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Commit: 2387df497b4b4bcf754eb7398edca82889e2ef54
https://github.com/qemu/qemu/commit/2387df497b4b4bcf754eb7398edca82889e2ef54
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2020-10-12 (Mon, 12 Oct 2020)
Changed paths:
M docs/devel/multi-thread-tcg.rst
M docs/devel/testing.rst
M scripts/qapi-gen.py
A scripts/qapi/.flake8
A scripts/qapi/.isort.cfg
M scripts/qapi/commands.py
M scripts/qapi/common.py
M scripts/qapi/events.py
M scripts/qapi/expr.py
M scripts/qapi/gen.py
M scripts/qapi/introspect.py
A scripts/qapi/main.py
A scripts/qapi/mypy.ini
M scripts/qapi/parser.py
A scripts/qapi/pylintrc
M scripts/qapi/schema.py
M scripts/qapi/source.py
M scripts/qapi/types.py
M scripts/qapi/visit.py
Log Message:
-----------
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-10-10' into
staging
QAPI patches patches for 2020-10-10
# gpg: Signature made Sat 10 Oct 2020 10:43:14 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-2020-10-10: (34 commits)
qapi/visit.py: add type hint annotations
qapi/visit.py: remove unused parameters from gen_visit_object
qapi/visit.py: assert tag_member contains a QAPISchemaEnumType
qapi/types.py: remove one-letter variables
qapi/types.py: add type hint annotations
qapi/gen.py: delint with pylint
qapi/gen.py: update write() to be more idiomatic
qapi/gen.py: Remove unused parameter
qapi/gen.py: add type hint annotations
qapi/gen: Make _is_user_module() return bool
qapi/source.py: delint with pylint
qapi/source.py: add type hint annotations
qapi/commands.py: add type hint annotations
qapi/commands.py: Don't re-bind to variable of different type
qapi/events.py: Move comments into docstrings
qapi/events.py: add type hint annotations
qapi: establish mypy type-checking baseline
qapi/common.py: move build_params into gen.py
qapi/common.py: Convert comments into docstrings, and elaborate
qapi/common.py: add type hint annotations
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/48a340d9b23f...2387df497b4b
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 1ec43c: docs: repair broken references,
Peter Maydell <=