Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] data/gentoo-news:master commit in: 2021-01-30-python-preference-to-follow-PYTHON-TARGETS/
Date: Sat, 30 Jan 2021 12:17:09
Message-Id: 1612009013.22323b8313dbe3f0b08f5b1ce2fb2f7ae26ee642.mgorny@gentoo
1 commit: 22323b8313dbe3f0b08f5b1ce2fb2f7ae26ee642
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 30 12:16:35 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 30 12:16:53 2021 +0000
6 URL: https://gitweb.gentoo.org/data/gentoo-news.git/commit/?id=22323b83
7
8 2021-01-30-python-preference-to-follow-PYTHON-TARGETS: add
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 ...thon-preference-to-follow-PYTHON-TARGETS.en.txt | 48 ++++++++++++++++++++++
13 1 file changed, 48 insertions(+)
14
15 diff --git a/2021-01-30-python-preference-to-follow-PYTHON-TARGETS/2021-01-30-python-preference-to-follow-PYTHON-TARGETS.en.txt b/2021-01-30-python-preference-to-follow-PYTHON-TARGETS/2021-01-30-python-preference-to-follow-PYTHON-TARGETS.en.txt
16 new file mode 100644
17 index 0000000..dbdf2a7
18 --- /dev/null
19 +++ b/2021-01-30-python-preference-to-follow-PYTHON-TARGETS/2021-01-30-python-preference-to-follow-PYTHON-TARGETS.en.txt
20 @@ -0,0 +1,48 @@
21 +Title: Python preference to follow PYTHON_TARGETS
22 +Author: Michał Górny <mgorny@g.o>
23 +Posted: 2021-01-30
24 +Revision: 1
25 +News-Item-Format: 2.0
26 +
27 +On 2021-02-01 stable users will switch to a new method of updating
28 +the preferred Python versions that employs the configuration update
29 +mechanism in order to follow PYTHON_TARGETS. We will also deprecate
30 +app-eselect/eselect-python, and it will stop being installed by default
31 +after 2021-07-01. If you wish to use the newest Python version present
32 +in your PYTHON_TARGETS, you only have to accept configuration changes.
33 +If you wish to customize the behavior, read on.
34 +
35 +Since 2017, /usr/bin/python and the related non-versioned symlinks
36 +are wrapped through dev-lang/python-exec. The list of preferred Python
37 +implementations is stored in /etc/python-exec/python-exec.conf and/or
38 +per-program /etc/python-exec/<basename>.conf configuration files.
39 +To preserve backwards compatibility, app-eselect/eselect-python remained
40 +a wrapper that updated this file.
41 +
42 +However, this mechanism alone has proven inconvenient to end users who
43 +had to update python-exec.conf whenever the default PYTHON_TARGETS
44 +changed. Thanks to the fallback logic, this was not a major problem
45 +for software installed via Gentoo packages that always ensure that
46 +a supported implementation is used. However, users have reported that
47 +whenever the preference for /usr/bin/python mismatched their
48 +PYTHON_TARGETS, their custom scripts would break due to unsatisfied
49 +dependencies. This does not follow the principle of least surprise.
50 +
51 +For this reason, we have decided to change the default python-exec
52 +configuration to match PYTHON_TARGETS by default, in the eclass
53 +preference order, that is from the newest CPython version to oldest,
54 +with alternative Python implementations coming afterwards. This change
55 +will be propagated via the configuration protection mechanism whenever
56 +dev-lang/python-exec-conf is installed or rebuilt due to PYTHON_TARGETS
57 +changes. This will permit the users to interactively confirm
58 +the updates.
59 +
60 +If the new default is not correct for you, please use your preferred
61 +configuration update tool to discard or edit the new configuration file.
62 +
63 +Furthermore, dev-lang/python will no longer attempt to automatically
64 +update the Python interpreter preference, or pull in eselect-python
65 +automatically. If you wish to continue using it, please install/record
66 +it explicitly to ensure that it is not unmerged, e.g.:
67 +
68 + emerge -n app-eselect/eselect-python