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