qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] python: expect a working python3-tomli package for Python <3.11
@ 2024-06-06  8:11 Paolo Bonzini
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2024-06-06  8:11 UTC (permalink / raw)
  To: qemu-devel

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-06  8:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06  8:11 [PATCH 0/2] python: expect a working python3-tomli package for Python <3.11 Paolo Bonzini
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

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).