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