mbox series

[0/2] python: expect a working python3-tomli package for Python <3.11

Message ID 20240606081153.2457559-1-pbonzini@redhat.com (mailing list archive)
Headers show
Series python: expect a working python3-tomli package for Python <3.11 | expand

Message

Paolo Bonzini June 6, 2024, 8:11 a.m. UTC
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