qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Beraldo Leal" <bleal@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>
Subject: Re: [RFC PATCH 1/3] python: add mkvenv.py
Date: Fri, 31 Mar 2023 10:44:17 +0200	[thread overview]
Message-ID: <7f39388b-1689-c40a-9e2f-861408dae7b8@redhat.com> (raw)
In-Reply-To: <CAFn=p-bu1nhw5-PdtxZ2U=PA5uq7VTrgW-W8boh29JRHxSVTyg@mail.gmail.com>

On 3/30/23 16:00, John Snow wrote:
>      > +                yield {
>      > +                    'name': entry_point.name
>     <http://entry_point.name>,
>      > +                    'module': module,
>      > +                    'import_name': attr,
>      > +                    'func': attr,
> 
>     What about using a dataclass or namedtuple instead of a dictionary?
> 
> 
> Sure. Once 3.8 is our minimum there's no point, though.

Well, that's why I also mentioned namedtuples.  But no big deal.

>     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 mode can go away together with
>     self._context?
> 
> 
> I guess I like it less because it's way more Debian-specific at that 
> point. I think I'd sooner say "Sorry, Debian 10 isn't supported!"
> 
> (Or encourage users to upgrade their pip/setuptools/ensurepip to 
> something that doesn't trigger the bug.)
> 
> Or, IOW, I feel like it's normal to expect ensurepip to work but mussing 
> around with symlinks to special directories created by a distribution 
> just feels way more fiddly.

No doubt about that.  It's just the balance between simple fiddly code 
and more robust code that is also longer.

Anyhow later on we will split mkvenv.py in multiple patches so it will 
be easy to revert checkpip when time comes.  For example, when Python 
3.7 is dropped for good rather than being just "untested but should 
work", this Debian 10 hack and the importlib_metadata/pkg_resources 
fallbacks go away at the same time.

Paolo



  reply	other threads:[~2023-03-31  8:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 21:11 [RFC PATCH 0/3] configure: create a python venv and install meson John Snow
2023-03-28 21:11 ` [RFC PATCH 1/3] python: add mkvenv.py John Snow
2023-03-29 12:56   ` Paolo Bonzini
2023-03-30 14:00     ` John Snow
2023-03-31  8:44       ` Paolo Bonzini [this message]
2023-03-31 10:01         ` Paolo Bonzini
2023-04-13 16:10     ` John Snow
2023-04-13 16:26     ` John Snow
2023-03-28 21:11 ` [RFC PATCH 2/3] tests: add python3-venv dependency John Snow
2023-03-28 21:11 ` [RFC PATCH 3/3] configure: install meson to a python virtual environment John Snow
2023-03-29 12:32   ` Paolo Bonzini
2023-03-29 12:53   ` Daniel P. Berrangé
2023-03-29 13:27     ` Paolo Bonzini
2023-03-29 13:31       ` Daniel P. Berrangé
2023-04-12  1:27         ` John Snow
2023-03-29 13:02 ` [RFC PATCH 0/3] configure: create a python venv and install meson Paolo Bonzini
2023-03-30 14:11   ` John Snow
2023-03-31  8:40     ` 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=7f39388b-1689-c40a-9e2f-861408dae7b8@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=bleal@redhat.com \
    --cc=crosa@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /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).