qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH 0/2] python: expect a working python3-tomli package for Python <3.11
Date: Thu,  6 Jun 2024 10:11:51 +0200	[thread overview]
Message-ID: <20240606081153.2457559-1-pbonzini@redhat.com> (raw)

pythondeps.toml is parsed using either Python's embedded tomllib parser
new in Python 3.11, or the external tomli library for older versions.
The latter however was absent in Ubuntu 20.04, so we include a copy of
the wheel in python/wheels.  (For Debian bullseye, it is included in
the backports repository).

Now that Ubuntu 20.04 is not supported anymore, it can be dropped;
and with it the "ensure" subcommand of mkvenv.py, which was only
needed to bootstrap the venv with the TOML parser needed by
"ensuregroup".

Back when mkvenv.py was implemented, John and I had an idea of an
"isolated mode" that does not use any system packages.  With these
patches this means that, as things stand, the isolated mode can only
work with Python 3.11+; older versions would need special code in
mkvenv.py to install tomli from PyPI if system_site_packages==False[1].
Since the isolated mode does not exist yet, this is left for the future
comtemplation.

Paolo

[1] isolated mode probably would benefit from installing distlib instead
of using the pip._vendor.distlib hack; therefore, adding tomli would
not be a huge deal anyway.

Paolo Bonzini (2):
  Revert "python: use vendored tomli"
  python: mkvenv: remove ensure command

 docs/devel/build-system.rst                |  13 ++-
 configure                                  |   4 -
 python/scripts/mkvenv.py                   | 105 ---------------------
 python/scripts/vendor.py                   |   3 -
 python/wheels/tomli-2.0.1-py3-none-any.whl | Bin 12757 -> 0 bytes
 5 files changed, 6 insertions(+), 119 deletions(-)
 delete mode 100644 python/wheels/tomli-2.0.1-py3-none-any.whl

-- 
2.45.1



             reply	other threads:[~2024-06-06  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06  8:11 Paolo Bonzini [this message]
2024-06-06  8:11 ` [PATCH 1/2] Revert "python: use vendored tomli" Paolo Bonzini
2024-06-06  8:11 ` [PATCH 2/2] python: mkvenv: remove ensure command Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240606081153.2457559-1-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).