Gentoo Archives: gentoo-dev

From: Aisha Tammy <gentoo.dev@×××××.cc>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS
Date: Sun, 24 Jan 2021 15:16:46
Message-Id: a8668a02-3869-5eb1-159e-d305bd1e98ba@aisha.cc
In Reply to: Re: [gentoo-dev] [News item review v2] Python preference to follow PYTHON_TARGETS by "Michał Górny"
1 On 1/24/21 7:59 AM, Michał Górny wrote:
2 > Here's v2 with extra 'tl;dr' instructions in first para:
3 >
4 > ```
5 > Title: Python preference to follow PYTHON_TARGETS
6 > Author: Michał Górny <mgorny@g.o>
7 > Posted: 2021-01-24
8 > Revision: 1
9 > News-Item-Format: 2.0
10 >
11 > On 2021-02-01 stable users will switch to a new method of updating
12 > the preferred Python versions that employs the configuration update
13 > mechanism in order to follow PYTHON_TARGETS. We will also deprecate
14 > and stop installing app-eselect/eselect-python by default. If you wish
15 > to use the newest Python version present in your PYTHON_TARGETS, you
16 > only have to accept configuration changes. If you wish need
17 > to customize the behavior, read on.
18 >
19 > Since 2017, /usr/bin/python and the related non-versioned symlinks
20 > are wrapped through dev-lang/python-exec. The list of preferred Python
21 > implementations is stored in /etc/python-exec/python-exec.conf and/or
22 > per-program /etc/python-exec/<basename>.conf configuration files.
23 > To preserve backwards compatibility, app-eselect/eselect-python remained
24 > a wrapper that updated this file.
25 >
26 > However, this mechanism alone has proven inconvenient to end users who
27 > had to update python-exec.conf whenever the default PYTHON_TARGETS
28 > changed. Thanks to the fallback logic, this was not a major problem
29 > for software installed via Gentoo packages that always ensure that
30 > a supported implementation is used. However, users have reported that
31 > whenever the preference for /usr/bin/python mismatched their
32 > PYTHON_TARGETS, their custom scripts would break due to unsatisfied
33 > dependencies. This does not follow the principle of least surprise.
34 >
35 > For this reason, we have decided to change the default python-exec
36 > configuration to match PYTHON_TARGETS by default, in the eclass
37 > preference order, that is from the newest CPython version to oldest,
38 > with alternative Python implementations coming afterwards. This change
39 > will be propagated via the configuration protection mechanism whenever
40 > dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
41 > changes. This will permit the users to interactively confirm
42 > the updates.
43 >
44 > If the new default is not correct for you, please use your preferred
45 > configuration update tool to discard or edit the new configuration file.
46 >
47 > Furthermore, dev-lang/python will no longer attempt to automatically
48 > update the Python interpreter preference, or pull in eselect-python
49 > automatically. If you wish to continue using it, please install it
50 > manually to ensure that it is not unmerged.
51 >
52 > ```
53 >
54
55 Has this change already been pushed for unstable? I am running an unstable
56 system but I still have eselect-python, so I assume not (unless due to my side
57 error).
58
59 Thanks,
60 Aisha

Replies