[RFC PATCH v3 09/20] tests/docker: add python3-venv dependency

2023-04-24 Thread John Snow
tion because it is normally part of the Python stdlib, and always having it allows us a more consistent cross-platform environment. Signed-off-by: John Snow --- tests/docker/dockerfiles/debian-all-test-cross.docker | 3 ++- tests/docker/dockerfiles/debian-hexagon-cross.docker | 3 ++- tests/doc

[RFC PATCH v3 02/20] python: add mkvenv.py

2023-04-24 Thread John Snow
xpat to provide "pyexpat" * (* Or whichever version is current for NetBSD.) Signed-off-by: John Snow --- python/scripts/mkvenv.py | 277 +++ python/setup.cfg | 9 ++ python/tests/flake8.sh | 1 + python/tests/isort.sh| 1 + pytho

[RFC PATCH v3 14/20] configure: use 'mkvenv ensure meson' to bootstrap meson

2023-04-24 Thread John Snow
to the correct, configured python and can be used by e.g. manual tests to invoke the correct, configured Python unambiguously. Signed-off-by: John Snow --- configure | 72 - .gitlab-ci.d/buildtest-template.yml | 4 +- 2 files changed, 21 in

[RFC PATCH v3 19/20] configure: use --diagnose option with meson ensure

2023-04-24 Thread John Snow
Rely on the diagnosis information from mkvenv so it can be removed from the configure script. Signed-off-by: John Snow --- configure | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/configure b/configure index ae55de1408..0881fffc14 100755 --- a/configure +++ b

[RFC PATCH v3 10/20] tests/vm: Configure netbsd to use Python 3.10

2023-04-24 Thread John Snow
NetBSD removes some packages from the Python stdlib, but only re-packages them for Python 3.10. Switch to using Python 3.10. Signed-off-by: John Snow --- tests/vm/netbsd | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vm/netbsd b/tests/vm/netbsd index 0b9536ca17..13eae109c0 100755

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-20 Thread John Snow
On Thu, Apr 20, 2023, 5:19 AM Philippe Mathieu-Daudé wrote: > On 17/4/23 19:44, Alex Bennée wrote: > > > > John Snow writes: > > > >> On Mon, Apr 17, 2023 at 9:43 AM Alex Bennée > wrote: > >>> > >>> From: Kautuk Consul > >>

Re: [PATCH v4 0/6] testing/next: avocado, docs, gitlab

2023-04-17 Thread John Snow
On Mon, Apr 17, 2023 at 9:43 AM Alex Bennée wrote: > > This is the current state of my testing tree. It contains a few > patches that didn't make it into 8.0 and more testing fixes including > a bump to the avocado release including Thomas' --max-parallel-tasks > hack to avoid running the tests in

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-17 Thread John Snow
On Mon, Apr 17, 2023 at 9:43 AM Alex Bennée wrote: > > From: Kautuk Consul > > Avocado version 101.0 has a fix to re-compute the checksum > of an asset file if the algorithm used in the *-CHECKSUM > file isn't the same as the one being passed to it by the > avocado user (i.e. the avocado_qemu pyt

[RFC PATCH v2 05/10] tests/vm: add py310-expat to NetBSD

2023-04-13 Thread John Snow
poses of a throwaway VM, there's not really a speed difference for who is responsible for installing pip; us (needs py310-pip) or Python (needs py310-expat). Signed-off-by: John Snow --- tests/vm/netbsd | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vm/netbsd b/tests/vm/netbsd i

[RFC PATCH v2 06/10] mkvenv: generate console entry shims from inside the venv

2023-04-13 Thread John Snow
as a fallback. As a coincidence, it also gives us a pretty good place to do all kinds of other "in-venv" setup that we might want to do later; for instance meson and sphinx bootstrapping might be good candidates. Signed-off-by: John Snow --- python/scripts/mkve

[RFC PATCH v2 08/10] configure: create a python venv unconditionally

2023-04-13 Thread John Snow
.) Signed-off-by: John Snow --- configure | 34 +- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 800b5850f4..03278fd891 100755 --- a/configure +++ b/configure @@ -608,7 +608,6 @@ check_py_version() { python= first_python= if

[RFC PATCH v2 02/10] tests: add python3-venv dependency

2023-04-13 Thread John Snow
tion because it is normally part of the Python stdlib, and always having it allows us a more consistent cross-platform environment. Signed-off-by: John Snow --- tests/docker/dockerfiles/debian-all-test-cross.docker | 3 ++- tests/docker/dockerfiles/debian-hexagon-cross.docker | 3 ++- tests/doc

[RFC PATCH v2 04/10] tests/vm: Configure netbsd to use Python 3.10

2023-04-13 Thread John Snow
NetBSD removes some packages from the Python stdlib, but only re-packages them for Python 3.10. Switch to using Python 3.10. Signed-off-by: John Snow --- tests/vm/netbsd | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vm/netbsd b/tests/vm/netbsd index 0b9536ca17..13eae109c0 100755

[RFC PATCH v2 09/10] configure: remove --meson=; install meson to the pyvenv

2023-04-13 Thread John Snow
.whl file instead. This will remove some of the `--no-use-pep517` hackiness and alleviates the requirement that users install the python3 'wheel' dependency. - Most of this logic can be moved into mkvenv.py, *especially* if the meson git submodule is removed. Signed-of

[RFC PATCH v2 03/10] mkvenv: Add better error message for missing pyexapt module

2023-04-13 Thread John Snow
NetBSD debundles pyexpat from python, but ensurepip needs pyexpat. Try our best to offer a helpful error message instead of just failing catastrophically. Signed-off-by: John Snow --- python/scripts/mkvenv.py | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git

[RFC PATCH v2 01/10] python: add mkvenv.py

2023-04-13 Thread John Snow
xpat to provide "pyexpat" * (* Or whichever version is current for NetBSD.) Signed-off-by: John Snow --- python/scripts/mkvenv.py | 379 +++ 1 file changed, 379 insertions(+) create mode 100644 python/scripts/mkvenv.py diff --git a/python/scripts/m

[RFC PATCH v2 10/10] tests: Use configure-provided pyvenv for tests

2023-04-13 Thread John Snow
to address that discrepancy in the future so that it will be possible to re-use the same venv for qemu.git/python/qemu self-tests to introduce them to make check as "make check-python". Signed-off-by: John Snow --- docs/devel/acpi-bits.rst | 6 +++-

[RFC PATCH v2 00/10] configure: create a python venv and install meson

2023-04-13 Thread John Snow
edge cases. Changes yet to come for further revisions to this series: - Need to add Sphinx support. - Need to add nested venv support. - PyPI support? (To drop meson git submodule?) - Installing meson from vendored .whl files for tarballs? (To drop --no-use-pep517 hack?) John Snow (10): p

[RFC PATCH v2 07/10] mkvenv: work around broken pip installations on Debian 10

2023-04-13 Thread John Snow
.] ?" I was slightly apprehensive about this as it felt "hackier", but it is indeed a lot less code and much faster. It's probably low-risk. Should we do that instead, or should we just scrap any fix at all under the premise that Debian 10 support is dropped anyway?

Re: [PATCH] tests/avocado: require netdev 'user' for kvm_xen_guest

2023-04-13 Thread John Snow
On Thu, Apr 13, 2023 at 5:43 PM John Snow wrote: > > The tests will fail mysteriously with EOFError otherwise, because the VM > fails to boot and quickly disconnects from the QMP socket. Skip these > tests when we didn't compile with slirp. > Full disclosure: I only

[PATCH] tests/avocado: require netdev 'user' for kvm_xen_guest

2023-04-13 Thread John Snow
The tests will fail mysteriously with EOFError otherwise, because the VM fails to boot and quickly disconnects from the QMP socket. Skip these tests when we didn't compile with slirp. Fixes: c8cb603293fd (tests/avocado: Test Xen guest support under KVM) Signed-off-by: John Snow ---

Re: [RFC PATCH 1/3] python: add mkvenv.py

2023-04-13 Thread John Snow
On Wed, Mar 29, 2023 at 8:56 AM Paolo Bonzini wrote: > > BTW, another way to repair Debian 10's pip is to create a symbolic link > to sys.base_prefix + '/share/python-wheels' in sys.prefix + > '/share/python-wheels'. Since this is much faster, perhaps it can be > done unconditionally and checkpip

Re: [RFC PATCH 1/3] python: add mkvenv.py

2023-04-13 Thread John Snow
On Wed, Mar 29, 2023 at 8:56 AM Paolo Bonzini wrote: > > On 3/28/23 23:11, John Snow wrote: > > +for entry_point in entry_points: > > +# Python 3.8 doesn't have 'module' or 'attr' attributes > > +

Re: [PATCH] tests/vm: use the default system python for NetBSD

2023-04-12 Thread John Snow
On Wed, Mar 29, 2023 at 8:47 AM Daniel P. Berrangé wrote: > > Currently our NetBSD VM recipe requests instal of the python37 package > and explicitly tells QEMU to use that version of python. Since the > NetBSD base ISO was updated to version 9.3 though, the default system > python version is 3.9

Re: [RFC PATCH 3/3] configure: install meson to a python virtual environment

2023-04-11 Thread John Snow
On Wed, Mar 29, 2023, 9:32 AM Daniel P. Berrangé wrote: > On Wed, Mar 29, 2023 at 03:27:53PM +0200, Paolo Bonzini wrote: > > On 3/29/23 14:53, Daniel P. Berrangé wrote: > > > I would love to see a day where configure isn't involved in the > > > build process. Obviously we can't put this new logic

Re: [PATCH 05/16] qapi/block-core: Clean up after removal of dirty bitmap @status

2023-04-11 Thread John Snow
ce 4.0) > # > # @persistent: true if the bitmap was stored on disk, is scheduled to be > stored > # on disk, or both. (since 4.0) > -- > 2.39.2 > Reviewed-By: John Snow

Re: [RFC PATCH 0/3] configure: create a python venv and install meson

2023-03-30 Thread John Snow
On Wed, Mar 29, 2023, 9:02 AM Paolo Bonzini wrote: > Thanks for posting this! > > On 3/28/23 23:11, John Snow wrote: > > This series is in RFC state; some notable things: > > - So far, only meson is included in this setup. > > - There's a ton of debugging prints e

Re: [RFC PATCH 1/3] python: add mkvenv.py

2023-03-30 Thread John Snow
On Wed, Mar 29, 2023, 8:56 AM Paolo Bonzini wrote: > On 3/28/23 23:11, John Snow wrote: > > +# venv class is cute and toggles this off before post_setup, > > +# but we need it to decide if we want to generate shims or not. > > Ha, yeah that's

[RFC PATCH 3/3] configure: install meson to a python virtual environment

2023-03-28 Thread John Snow
gured Python unambiguously. Signed-off-by: John Snow --- configure | 155 +++- .gitlab-ci.d/buildtest-template.yml | 2 +- 2 files changed, 108 insertions(+), 49 deletions(-) diff --git a/configure b/configure index 05bed4f4a11..1ec054775f6 1

[RFC PATCH 1/3] python: add mkvenv.py

2023-03-28 Thread John Snow
This script will be responsible for building a Python virtual environment at configure time. As such, it exists outside of the installable python packages and *must* be runnable with minimal dependencies. Signed-off-by: John Snow --- python/scripts/mkvenv.py | 445

[RFC PATCH 2/3] tests: add python3-venv dependency

2023-03-28 Thread John Snow
our oldest platforms.) Signed-off-by: John Snow --- tests/docker/dockerfiles/debian-all-test-cross.docker | 3 ++- tests/docker/dockerfiles/debian-hexagon-cross.docker | 3 ++- tests/docker/dockerfiles/debian-riscv64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-tricore-cross.docker | 3

[RFC PATCH 0/3] configure: create a python venv and install meson

2023-03-28 Thread John Snow
r most platforms; the asterisk is Debian.) - No new configure flags (...yet.) John Snow (3): python: add mkvenv.py tests: add python3-venv dependency configure: install meson to a python virtual environment configure | 155 -- .gitlab-ci.d/buildtest

Re: [PATCH] python: honour message limit when using pre-opened socket

2023-03-20 Thread John Snow
On Mon, Mar 20, 2023 at 8:20 AM Vladimir Sementsov-Ogievskiy wrote: > > On 20.03.23 13:54, Daniel P. Berrangé wrote: > > The default message recv limit in asyncio is smaller than our needs, so > > when opening connections we override it. This was done when opening a > > connection using a socket a

Re: [PATCH 02/10] python: drop pipenv

2023-03-16 Thread John Snow
On Thu, Mar 16, 2023 at 4:54 AM Philippe Mathieu-Daudé wrote: > > On 16/3/23 00:02, John Snow wrote: > > On Wed, Mar 15, 2023 at 5:17 PM Philippe Mathieu-Daudé > > wrote: > >> > >> +Jan > >> > >> On 22/2/23 15:37, Paolo Bonzini wrote: >

Re: [PATCH] Use f-strings in python scripts

2023-03-15 Thread John Snow
On Wed, Mar 15, 2023 at 8:13 AM Philippe Mathieu-Daudé wrote: > > On 15/3/23 12:16, Daniel P. Berrangé wrote: > > On Wed, Mar 15, 2023 at 08:43:33AM +0100, Philippe Mathieu-Daudé wrote: > >> Hi Marco, > >> > >> (+Python experts) > >> > >> On 13/3/23 18:25, Marco Liebel wrote: > >>> Replace python

Re: [PATCH 02/10] python: drop pipenv

2023-03-15 Thread John Snow
On Wed, Mar 15, 2023 at 5:17 PM Philippe Mathieu-Daudé wrote: > > +Jan > > On 22/2/23 15:37, Paolo Bonzini wrote: > > From: John Snow > > > > The pipenv tool was nice in theory, but in practice it's just too hard > > to update selectively, and it

Re: [PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3'

2023-02-22 Thread John Snow
On Wed, Feb 22, 2023 at 2:15 AM Markus Armbruster wrote: > > John Snow writes: > > > On Tue, Feb 21, 2023, 1:50 AM Markus Armbruster wrote: > > > >> John Snow writes: > >> > >> > Once upon a time, "sphinx-build" on certain RPM plat

[PULL 0/2] Python patches

2023-02-22 Thread John Snow
t for you to fetch changes up to 6832189fd791622c30e7bbe3a12b76be14dc1158: python: drop pipenv (2023-02-22 23:35:03 -0500) Python Only minor testing updates. ---- Jo

[PULL 2/2] python: drop pipenv

2023-02-22 Thread John Snow
The pipenv tool was nice in theory, but in practice it's just too hard to update selectively, and it makes using it a pain. The qemu.qmp repo dropped pipenv support a while back and it's been functioning just fine, so I'm backporting that change here to qemu.git. Signed-off-by: Joh

[PULL 1/2] python: support pylint 2.16

2023-02-22 Thread John Snow
Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail. 1. The superfluous-parens check seems to be a bit more aggressive, 2. broad-exception-raised is new; it discourages "raise Exception". Fix these minor issues and turn the lights green. Signed-off-by:

Re: [PATCH v3 1/6] configure: Look for auxiliary Python installations

2023-02-21 Thread John Snow
On Tue, Feb 21, 2023, 6:03 AM Paolo Bonzini wrote: > On 2/21/23 02:24, John Snow wrote: > > At the moment, we look for just "python3" and "python", which is good > > enough almost all of the time. But ... if you are on a platform that > > uses an older

Re: [PATCH v4 0/6] qapi: static typing conversion, pt5c

2023-02-21 Thread John Snow
On Tue, Feb 21, 2023, 1:42 AM Markus Armbruster wrote: > John Snow writes: > > > On Wed, Feb 15, 2023 at 8:39 AM Markus Armbruster > wrote: > >> > >> I had a few suggestions, but none of them requires a respin. Let's > >> discuss them, and then

Re: [PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3'

2023-02-21 Thread John Snow
On Tue, Feb 21, 2023, 6:31 AM Paolo Bonzini wrote: > On 2/21/23 02:24, John Snow wrote: > > Once upon a time, "sphinx-build" on certain RPM platforms invoked > > specifically a Python 2.x version, while "sphinx-build-3" was a distro > > shim for the Pyt

Re: [PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3'

2023-02-21 Thread John Snow
On Tue, Feb 21, 2023, 1:50 AM Markus Armbruster wrote: > John Snow writes: > > > Once upon a time, "sphinx-build" on certain RPM platforms invoked > > specifically a Python 2.x version, while "sphinx-build-3" was a distro > > shim for the Python

[PATCH v3 6/6] Python: Drop support for Python 3.6

2023-02-20 Thread John Snow
ince it is safe under our supported platform policy, bump our minimum supported version of Python to 3.7. Signed-off-by: John Snow --- docs/conf.py | 4 ++-- configure| 8 python/Makefile | 10 +- python/setup.cfg | 7 +++ python

[PATCH v3 1/6] configure: Look for auxiliary Python installations

2023-02-20 Thread John Snow
hon that we cannot use. - In the event that no suitable python is found, the first python found is the version used to generate the human-readable error message. - The error message isn't printed right away to allow later configuration code to pick up an explicitly configured python.

Re: [PATCH v4 0/6] qapi: static typing conversion, pt5c

2023-02-20 Thread John Snow
On Wed, Feb 15, 2023 at 8:39 AM Markus Armbruster wrote: > > I had a few suggestions, but none of them requires a respin. Let's > discuss them, and then I merge. Hiya, I lost track of things a little due to the other Python discussion. Who is waiting for whom? --js

[PATCH v3 0/6] Python: Drop support for Python 3.6

2023-02-20 Thread John Snow
the way forward is to work with Paolo to implement a proper venv solution for the build tree that will help mitigate the fallout from (2) by automating the use of a pip-provided Sphinx in the cases where the distro-provided version is insufficient. OK, seeya later! --js John Snow (6): configu

[PATCH v3 2/6] configure: Add courtesy hint to Python version failure message

2023-02-20 Thread John Snow
. Signed-off-by: John Snow --- configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 6abf5a72078..0d0cca53f09 100755 --- a/configure +++ b/configure @@ -1059,7 +1059,10 @@ fi if ! check_py_version "$python"; then error_exit &

[PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3'

2023-02-20 Thread John Snow
27;sphinx-build' prior to 'sphinx-build-3', which will prefer pip/venv installed versions of sphinx if they're available. This adds an extremely convenient ability to test document building ability in QEMU across multiple versions of Sphinx for the purposes of compatibility

[PATCH v3 4/6] DO-NOT-MERGE: testing: add pip-installed sphinx-build to CentOS 8

2023-02-20 Thread John Snow
likely the safest option if you don't have a lot of Python knowhow. Signed-off-by: John Snow --- tests/docker/dockerfiles/centos8.docker | 4 1 file changed, 4 insertions(+) diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index a3bf

[PATCH v3 3/6] DO-NOT-MERGE: testing: Add Python >= 3.7 to Centos, OpenSuSE

2023-02-20 Thread John Snow
, meanwhile, is just to prove that bumping our dependency does not introduce any regressions in our test suite or developer processes. It also is meant to demonstrate the relatively small changes needed to begin utilizing 3.7 as a minimum. Signed-off-by: John Snow --- tests/docker/dockerfiles/centos8

Re: [PATCH v5 02/16] python: fix broad-exception-raised pylint error

2023-02-20 Thread John Snow
Sementsov-Ogievskiy I think I came to the same conclusions: https://gitlab.com/jsnow/qemu/-/commit/19bac2ea70cbb5ada4f94d6223cdc96f51a2b3d9 Reviewed-by: John Snow > --- > python/qemu/utils/qemu_ga_client.py | 6 +++--- > tests/qemu-iotests/iotests.py | 4 ++-- > 2 files change

Re: [PATCH v5 01/16] python: fix superfluous-parens pylint error

2023-02-20 Thread John Snow
On Wed, Feb 15, 2023 at 8:26 AM Vladimir Sementsov-Ogievskiy wrote: > > Now make check-dev called in python/ directory fails due to this error. > Let's fix it. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow I've got a similar patch queued alre

Re: [PATCH v2 0/7] Python: Drop support for Python 3.6

2023-02-20 Thread John Snow
On Mon, Feb 20, 2023 at 1:16 AM Thomas Huth wrote: > > On 17/02/2023 21.46, John Snow wrote: > > On Thu, Feb 16, 2023 at 5:58 AM Thomas Huth wrote: > >> > >> On 15/02/2023 20.05, Markus Armbruster wrote: > >>> The discussion under PATCH 6 makes me think

Re: [PATCH] hw/ide/ahci: trace ncq write command as write instead of read

2023-02-20 Thread John Snow
On Mon, Feb 20, 2023 at 3:12 AM Philippe Mathieu-Daudé wrote: > > On 17/2/23 11:31, Fiona Ebner wrote: > > Fixes: e4baa9f00b ("AHCI: Replace DPRINTF with trace-events") > > Signed-off-by: Fiona Ebner > > --- > > > > Or should it be sorted alphabetically below execute_ncq_command_unsup? > > I felt

Re: [PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-17 Thread John Snow
On Tue, Feb 14, 2023 at 12:26 PM Kevin Wolf wrote: > > Am 14.02.2023 um 15:03 hat Paolo Bonzini geschrieben: > > In the case of Python the issue is not the interpreter per se, though > > there are a couple new feature in Python 3.7 that are quite nice (for > > example improved data classes[1] or c

Re: [PATCH v2 0/7] Python: Drop support for Python 3.6

2023-02-17 Thread John Snow
On Thu, Feb 16, 2023 at 5:58 AM Thomas Huth wrote: > > On 15/02/2023 20.05, Markus Armbruster wrote: > > The discussion under PATCH 6 makes me think there's a bit of confusion > > about the actual impact of dropping support for Python 3.6. Possibly > > because it's spelled out in the commit messa

Re: [PATCH] hw/ide/ahci: trace ncq write command as write instead of read

2023-02-17 Thread John Snow
; > > Or should it be sorted alphabetically below execute_ncq_command_unsup? > > No, there is no convention... > > > I felt read and write belong close together and this reflects the > > positions in the code. > > probably for this reason. > > Reviewed-by: Philippe Mathieu-Daudé > > Thanks! > Reviewed-by: John Snow

Re: [PATCH 07/12] testing: update ubuntu2004 to ubuntu2204

2023-02-17 Thread John Snow
On Fri, Feb 17, 2023, 12:14 PM Daniel P. Berrangé wrote: > On Fri, Feb 17, 2023 at 11:35:44AM -0500, John Snow wrote: > > On Thu, Feb 16, 2023, 2:44 PM Daniel P. Berrangé > > wrote: > > > > > On Thu, Feb 16, 2023 at 01:15:30PM -0500, John Snow wrote: > > >

Re: [PATCH 07/12] testing: update ubuntu2004 to ubuntu2204

2023-02-17 Thread John Snow
On Thu, Feb 16, 2023, 2:44 PM Daniel P. Berrangé wrote: > On Thu, Feb 16, 2023 at 01:15:30PM -0500, John Snow wrote: > > On Wed, Feb 15, 2023 at 2:25 PM Alex Bennée > wrote: > > > > > > The 22.04 LTS release has been out for almost a year now so its time > >

Re: [PATCH 07/12] testing: update ubuntu2004 to ubuntu2204

2023-02-16 Thread John Snow
On Wed, Feb 15, 2023 at 2:25 PM Alex Bennée wrote: > > The 22.04 LTS release has been out for almost a year now so its time > to update all the remaining images to the current LTS. We can also > drop some hacks we need for older clang TSAN support. We still support Ubuntu 20.04 until 2024 though,

Re: Lost partition tables on ide-hd + ahci drive

2023-02-15 Thread John Snow
On Wed, Feb 15, 2023, 5:53 AM Fiona Ebner wrote: > Am 14.02.23 um 19:21 schrieb John Snow: > > On Thu, Feb 2, 2023 at 7:08 AM Fiona Ebner wrote: > >> > >> Hi, > >> over the years we've got 1-2 dozen reports[0] about suddenly > >> missing/cor

Re: [PATCH 6/7] CI: Stop building docs on centos8

2023-02-15 Thread John Snow
On Fri, Feb 10, 2023 at 5:30 AM Paolo Bonzini wrote: > > On 2/10/23 00:32, John Snow wrote: > >> It's possible to teach lcitool to use pip instead to install > >> docutils, sphinx and sphinx-rtd-theme > > > > I will say that once upon a time, Peter Mayd

Re: [PATCH 5/7] testing: Add Python >= 3.7 to Centos, OpenSuSE

2023-02-15 Thread John Snow
On Fri, Feb 10, 2023 at 5:38 AM Daniel P. Berrangé wrote: > > On Thu, Feb 09, 2023 at 10:40:32AM -0500, John Snow wrote: > > This is just a proof-of-concept patch, as these files are lcitool > > generated. The real fix will involve updating the lcitool configuration > >

Re: [PATCH 3/7] configure: Look for auxiliary Python installations

2023-02-15 Thread John Snow
On Fri, Feb 10, 2023 at 2:45 PM Eric Blake wrote: > > On Thu, Feb 09, 2023 at 10:40:30AM -0500, John Snow wrote: > > At the moment, we look for just "python3" and "python", which is good > > enough almost all of the time. But ... if you are on a platform th

Re: [PATCH v4 4/6] qapi/parser: add QAPIExpression type

2023-02-15 Thread John Snow
On Wed, Feb 15, 2023 at 4:43 AM Markus Armbruster wrote: > > John Snow writes: > > > This patch creates a new type, QAPIExpression, which represents a parsed > > expression complete with QAPIDoc and QAPISourceInfo. > > > > This patch turns parser.exprs into

Re: [PATCH v4 3/6] qapi: Add minor typing workaround for 3.6

2023-02-15 Thread John Snow
On Wed, Feb 15, 2023, 8:36 AM Markus Armbruster wrote: > Markus Armbruster writes: > > > John Snow writes: > > > >> Pylint under 3.6 does not believe that Collection is subscriptable at > >> runtime. It is, making this a Pylint > >> bug

[PATCH v4 5/6] qapi: remove _JSONObject

2023-02-14 Thread John Snow
We can remove this alias as it only has two usages now, and no longer pays for the confusion of "yet another type". Signed-off-by: John Snow --- scripts/qapi/expr.py | 13 +++-- scripts/qapi/parser.py | 5 ++--- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git

[PATCH v4 1/6] qapi: Update flake8 config

2023-02-14 Thread John Snow
New versions of flake8 don't like same-line comments. (It's a version newer than what fc37 ships, but it still makes my life easier to fix it now.) Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- scripts/qapi/.flake8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

[PATCH v4 3/6] qapi: Add minor typing workaround for 3.6

2023-02-14 Thread John Snow
.13.9 was released 2022-05-13, about seven months after the bug was closed. The least-annoying fix here is to just use the more specific type Sequence, only because it seems to work in 3.6. Signed-off-by: John Snow --- scripts/qapi/expr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 dele

[PATCH v4 4/6] qapi/parser: add QAPIExpression type

2023-02-14 Thread John Snow
" all the way through expr.py and into schema.py. Several assertions around packing and unpacking this data can be removed as a result. Signed-off-by: John Snow --- scripts/qapi/expr.py | 82 +- scripts/qapi/parser.py | 46 ++-- sc

[PATCH v4 2/6] qapi: update pylint configuration

2023-02-14 Thread John Snow
Newer versions of pylint disable the "no-self-use" message by default. Older versions don't, though. If we leave the suppressions in, pylint yelps about useless options. Just tell pylint to shush. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- scripts/qapi/pylintr

[PATCH v4 0/6] qapi: static typing conversion, pt5c

2023-02-14 Thread John Snow
x27;s no intermediate state where it's needed now. - Minor style issues. John Snow (6): qapi: Update flake8 config qapi: update pylint configuration qapi: Add minor typing workaround for 3.6 qapi/parser: add QAPIExpression type qapi: remove _JSONObject qapi: remove JSON

[PATCH v4 6/6] qapi: remove JSON value FIXME

2023-02-14 Thread John Snow
it's worth with mypy's current expressive power. As such, declare this "done enough for now". Signed-off-by: John Snow --- scripts/qapi/parser.py | 4 1 file changed, 4 deletions(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index d570086e1a9..878f90b

Re: [PATCH v2 0/7] Python: Drop support for Python 3.6

2023-02-14 Thread John Snow
On Thu, Feb 9, 2023 at 7:31 PM John Snow wrote: > > Howdy, this series increases our minimum python version to 3.7. > > CI: https://gitlab.com/jsnow/qemu/-/pipelines/771780626 > (All green!) > GL: https://gitlab.com/jsnow/qemu/-/commits/python-require-37 > > Patch

Re: Lost partition tables on ide-hd + ahci drive

2023-02-14 Thread John Snow
On Thu, Feb 2, 2023 at 7:08 AM Fiona Ebner wrote: > > Hi, > over the years we've got 1-2 dozen reports[0] about suddenly > missing/corrupted MBR/partition tables. The issue seems to be very rare > and there was no success in trying to reproduce it yet. I'm asking here > in the hope that somebody h

Re: "patches" tool has a new patches.json URL

2023-02-14 Thread John Snow
On Thu, Feb 9, 2023 at 3:46 PM Stefan Hajnoczi wrote: > > Hi, > For those using the https://github.com/stefanha/patches tool to work > with QEMU patch series, please update your configuration file to the new > patches.json URL: > > $ $EDITOR ~/.patchesrc > [fetch] > url=https://patches.qemu.

Re: [PATCH v3 4/7] qapi/expr: add typing workaround for AbstractSet

2023-02-14 Thread John Snow
On Fri, Feb 10, 2023, 11:26 AM John Snow wrote: > > > On Fri, Feb 10, 2023, 10:44 AM Markus Armbruster > wrote: > >> John Snow writes: >> >> > mypy can only narrow the type of `Mapping[str, ...].keys() & Set[str]` >> > to `AbstractSet[str]`

Re: [PATCH v3 3/7] qapi/expr: Split check_expr out from check_exprs

2023-02-14 Thread John Snow
On Sat, Feb 11, 2023, 5:06 AM Markus Armbruster wrote: > John Snow writes: > > > --3b01fe05f45a096a > > Content-Type: text/plain; charset="UTF-8" > > > > On Fri, Feb 10, 2023, 7:33 AM Markus Armbruster > wrote: > > > &

Re: [PATCH v3 5/7] qapi/parser: add QAPIExpression type

2023-02-14 Thread John Snow
On Sat, Feb 11, 2023, 1:49 AM Markus Armbruster wrote: > John Snow writes: > > > This patch creates a new type, QAPIExpression, which represents a parsed > > expression complete with QAPIDoc and QAPISourceInfo. > > > > This patch turns parser.exprs into a list of Q

Re: [PATCH 0/2] docs/devel/qapi-code-gen: Update features doc, minor improvements

2023-02-14 Thread John Snow
On Tue, Feb 14, 2023, 11:49 AM John Snow wrote: > > > On Mon, Feb 13, 2023, 8:20 AM Markus Armbruster wrote: > >> *** BLURB HERE *** >> > > 🤫 > > >> Markus Armbruster (2): >> docs/devel/qapi-code-gen: Belatedly update features documentation &

Re: [PATCH 0/2] docs/devel/qapi-code-gen: Update features doc, minor improvements

2023-02-14 Thread John Snow
On Mon, Feb 13, 2023, 8:20 AM Markus Armbruster wrote: > *** BLURB HERE *** > 🤫 > Markus Armbruster (2): > docs/devel/qapi-code-gen: Belatedly update features documentation > docs/devel/qapi-code-gen: Fix a missing 'may', clarify SchemaInfo > > docs/devel/qapi-code-gen.rst | 16 --

Re: [PATCH v2 4/7] configure: Add nice hint to Python failure message

2023-02-10 Thread John Snow
On Fri, Feb 10, 2023, 2:45 AM Thomas Huth wrote: > On 10/02/2023 01.31, John Snow wrote: > > If we begin requiring Python 3.7+, a few platforms are going to need to > > install an additional package. > > > > This is at least mildly annoying to the user (and I hate

Re: [PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-10 Thread John Snow
On Fri, Feb 10, 2023, 11:32 AM Peter Maydell wrote: > On Fri, 10 Feb 2023 at 16:01, John Snow wrote: > > On Fri, Feb 10, 2023, 5:41 AM Peter Maydell > wrote: > >> On Fri, 10 Feb 2023 at 00:31, John Snow wrote: > >> This confuses me. We work fine with Python 3.6

Re: [PATCH v3 4/7] qapi/expr: add typing workaround for AbstractSet

2023-02-10 Thread John Snow
On Fri, Feb 10, 2023, 10:44 AM Markus Armbruster wrote: > John Snow writes: > > > mypy can only narrow the type of `Mapping[str, ...].keys() & Set[str]` > > to `AbstractSet[str]` and not a `Set[str]`. As a result, if the type of > > an expression is changed to a Mapp

Re: [PATCH v2 3/7] configure: Look for auxiliary Python installations

2023-02-10 Thread John Snow
On Fri, Feb 10, 2023, 11:17 AM Paolo Bonzini wrote: > On Fri, Feb 10, 2023 at 4:28 PM John Snow wrote: > > PS, while you're here, how does this new loop interfere with your > "custom python specified" flag for meson? I think meson uses the version of > python *it*

Re: [PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-10 Thread John Snow
On Fri, Feb 10, 2023, 5:41 AM Peter Maydell wrote: > On Fri, 10 Feb 2023 at 00:31, John Snow wrote: > > > > CentOS 8 does not ship with a sphinx new enough for our purposes (It > > necessarily uses Python 3.6), so drop this from this build. We can > > resume building

Re: [PATCH v2 3/7] configure: Look for auxiliary Python installations

2023-02-10 Thread John Snow
On Fri, Feb 10, 2023, 5:46 AM Paolo Bonzini wrote: > On 2/10/23 01:31, John Snow wrote: > > At the moment, we look for just "python3" and "python", which is good > > enough almost all of the time. But ... if you are on a platform that > > uses an older

Re: [PATCH v3 3/7] qapi/expr: Split check_expr out from check_exprs

2023-02-10 Thread John Snow
On Fri, Feb 10, 2023, 7:33 AM Markus Armbruster wrote: > Another observation... > > John Snow writes: > > > Primarily, this reduces a nesting level of a particularly long > > block. It's mostly code movement, but a new docstring is created. > > > > It

[PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-09 Thread John Snow
CentOS 8 does not ship with a sphinx new enough for our purposes (It necessarily uses Python 3.6), so drop this from this build. We can resume building docs on CentOS 9 if we wish, but we also currently test and build docs on Fedora, Ubuntu, Alpine and Debian. Signed-off-by: John Snow

[PATCH v2 2/7] python: drop pipenv

2023-02-09 Thread John Snow
The pipenv tool was nice in theory, but in practice it's just too hard to update selectively, and it makes using it a pain. The qemu.qmp repo dropped pipenv support a while back and it's been functioning just fine, so I'm backporting that change here to qemu.git. Signed-of

[PATCH v2 1/7] python: support pylint 2.16

2023-02-09 Thread John Snow
Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail. 1. The superfluous-parens check seems to be a bit more aggressive, 2. broad-exception-raised is new; it discourages "raise Exception". Fix these minor issues and turn the lights green. Signed-off-by:

[PATCH v2 4/7] configure: Add nice hint to Python failure message

2023-02-09 Thread John Snow
r how to install newer Python packages. Signed-off-by: John Snow --- configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index ea8c973d13b..bf512273f44 100755 --- a/configure +++ b/configure @@ -1058,7 +1058,10 @@ fi if ! check_py_version &qu

[PATCH v2 7/7] Python: Drop support for Python 3.6

2023-02-09 Thread John Snow
e it is safe to under our supported platform policy, bump our minimum supported version of Python to 3.7. Signed-off-by: John Snow --- docs/conf.py | 4 ++-- configure| 8 python/Makefile | 10 +- python/setup.cfg | 7 +++ python

[PATCH v2 3/7] configure: Look for auxiliary Python installations

2023-02-09 Thread John Snow
ration code to pick up an explicitly configured python. Signed-off-by: John Snow --- configure | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 64960c6000f..ea8c973d13b 100755 --- a/configure +++ b/configure @@ -592,

[PATCH v2 5/7] DO-NOT-MERGE: testing: Add Python >= 3.7 to Centos, OpenSuSE

2023-02-09 Thread John Snow
This is just a proof-of-concept patch, as these files are lcitool generated. The real fix will involve updating the lcitool configuration and updating these files that way. This is just to prove that bumping our dependency works. Signed-off-by: John Snow --- tests/docker/dockerfiles/centos8

[PATCH v2 0/7] Python: Drop support for Python 3.6

2023-02-09 Thread John Snow
sage for patch 7 with explicit version info - Added DO-NOT-MERGE to patch 5's title - Tested tests/vm/freebsd, netbsd, and openbsd in addition to full CI RFC: - Patch 5 is just a proof-of-concept; we need to update lcitool instead. - Cleber, I need to update your ansible scripts. How do I tes

Re: [PATCH 6/7] CI: Stop building docs on centos8

2023-02-09 Thread John Snow
On Thu, Feb 9, 2023 at 5:43 PM Paolo Bonzini wrote: > > > > Il gio 9 feb 2023, 16:40 John Snow ha scritto: >> >> CentOS 8 does not ship with a sphinx new enough for our purposes (It >> necessarily uses Python 3.6), so drop this from this build. We can >> re

Re: [PATCH 7/7] Python: Drop support for Python 3.6

2023-02-09 Thread John Snow
On Thu, Feb 9, 2023 at 1:03 PM Daniel P. Berrangé wrote: > > On Thu, Feb 09, 2023 at 11:40:57AM -0500, John Snow wrote: > > On Thu, Feb 9, 2023 at 11:27 AM Daniel P. Berrangé > > wrote: > > > > > > On Thu, Feb 09, 2023 at 10:40:34AM -0500, John Snow wrote: &

<    2   3   4   5   6   7   8   9   10   11   >