Gentoo Archives: gentoo-dev

From: Sam James <sam@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH news v2] Add Python 3.9 news item
Date: Fri, 30 Apr 2021 00:50:19
Message-Id: 690E7A93-A642-4B47-9659-7D96A02B8574@gentoo.org
In Reply to: [gentoo-dev] [PATCH news v2] Add Python 3.9 news item by "Michał Górny"
1 > On 29 Apr 2021, at 22:01, Michał Górny <mgorny@g.o> wrote:
2 >
3 > Signed-off-by: Michał Górny <mgorny@g.o>
4 > ---
5 > .../2021-04-29-python3-9.en.txt | 93 +++++++++++++++++++
6 > 1 file changed, 93 insertions(+)
7 > create mode 100644 2021-04-29-python3-9/2021-04-29-python3-9.en.txt
8 >
9 > diff --git a/2021-04-29-python3-9/2021-04-29-python3-9.en.txt b/2021-04-29-python3-9/2021-04-29-python3-9.en.txt
10 > new file mode 100644
11 > index 0000000..3075d72
12 > --- /dev/null
13 > +++ b/2021-04-29-python3-9/2021-04-29-python3-9.en.txt
14 > @@ -0,0 +1,93 @@
15 > +Title: Python 3.9 to become the default on 2021-06-01
16 >
17
18 Thanks for working on this. I kept meaning to do one for 3.8 and then 3.9 got so close
19 that I felt a bit daft doing it.
20
21 > +
22 > +We are planning to switch the default Python target of Gentoo systems
23 > +on 2021-06-01, from Python 3.8 to Python 3.9. If you have not changed
24 > +the values of PYTHON_TARGETS or PYTHON_SINGLE_TARGET, the change will
25 > +have immediate effect on your system and the package manager will try
26 > +to switch automatically on the next upgrade following the change.
27
28 (Add a new line here).
29
30 > +If you did change the values, prefer a safer approach or have problems
31 > +with the update, read on.
32 > +
33 > +Please note that the default upgrade method switches packages to the new
34 > +Python versions as they are rebuilt. This means that all interdependent
35 > +packages have to support the new version for the upgrade to proceed,
36 > +and that some programs may temporarily fail to find their dependencies
37 > +throughout the upgrade (although programs that are already started
38 > +are unlikely to be affected).
39 > +
40 > +
41
42 I’d consider numbering or marking with a bullet point or ‘-‘ each of
43 the possible options, in order of likely usefulness. So, we’d do e.g.
44
45 1) If you’ve not set anything, just upgrade as normal and then depclean.
46
47 2) In order to have both Python implementations enabled temporarily for safety ,…
48
49 […]
50
51 But this isn’t required. It’s just about making it easier for people to see
52 what they need to do, and not misread it and then do silly things because
53 they just copied and pasted the stuff which looked right (it happens).
54
55 Let’s put all of the key information at the beginning, then the
56 configurability/tweaking can be later on.
57
58 > +If you wish to avoid changing Python targets at this moment, you can
59 > +force the old targets by setting your /etc/portage/package.use to e.g.:
60 > +
61 > + */* PYTHON_TARGETS: -* python3_8
62 > + */* PYTHON_SINGLE_TARGET: -* python3_8
63 > +
64 > +This will enforce Python 3.8 as the current target choice and block
65 > +any future updates. However, please note that this solution will only
66 > +be suitable for a few more months and you will eventually need to
67 > +perform the migration.
68 > +
69 > +
70 > +If you wish to use a safer approach to the migration and temporarily
71 > +preserve the support for Python 3.8 and Python 3.9 simultaneously,
72 > +set /etc/portage/package.use to:
73 > +
74 > + */* PYTHON_TARGETS: -* python3_8 python3_9
75 > + */* PYTHON_SINGLE_TARGET: -* python3_8
76 > +
77 > +Afterwards, rebuild your system with emerge's --changed-use option or
78 > +equivalent. This will cause your packages to gain Python 3.9 support
79 > +while preserving Python 3.8 support whenever possible. Then, change
80 > +the second line to:
81 > +
82 > + */* PYTHON_SINGLE_TARGET: -* python3_9
83 > +
84 > +This will switch packages that can not support two Python versions
85 > +simultaneously, to use Python 3.9. Rebuild again. Finally, switch
86 > +the first line to the final version:
87 > +
88 > + */* PYTHON_TARGETS: -* python3_9
89 > +
90 > +The next --changed-use rebuild will remove Python 3.8 support from your
91 > +packages.
92 > +
93 > +
94 > +You can also switch to Python 3.9 earlier by setting:
95 > +
96 > + */* PYTHON_TARGETS: -* python3_9
97 > + */* PYTHON_SINGLE_TARGET: -* python3_9
98 > +
99 > +If you choose to follow this or the previous approach, you may want to
100 > +remove the package.use overrides after the switch or just leave them
101 > +in place to protect your system from the next automatic upgrade
102 > +of Python.
103 > +
104
105 “It is especially important you do not forget IF you choose to add this,
106 because it interferes with the natural rolling-with-the-defaults."
107
108 > +
109 > +The Python 3.8 cleanup requires that Python 3.8 is removed from complete
110 > +dependency trees in batch. If some of the installed packages using
111 > +an older Python version are not triaged for the upgrade, the package
112 > +manager will throw dependency conflicts. This makes it important that
113 > +the upgrade is carried via a --deep --changed-use @world upgrade,
114 > +as well as that any stray packages are removed prior to it, e.g.:
115 > +
116 > + emerge --depclean
117 > + emerge -1vUD @world
118 > + emerge --depclean
119 > +
120
121 Let’s put this right at the beginning.
122
123 > +
124 > +By the time of the switch, it is quite probable that Python 3.10 will
125 > +already be available in ~arch Gentoo. Users wishing a more bleeding
126 > +edge experience may wish to switch to python3_10 target instead.
127 > +However, this is currently discouraged on stable as it will require
128 > +unmasking multiple ~arch packages as they gain Python 3.10 support.
129
130 I was in two minds about keeping this, but it’s useful to give people an idea
131 of what’s coming in the future.
132
133 > +
134 > +If you have PYTHON_TARGETS or PYTHON_SINGLE_TARGET declared
135 > +in make.conf, it is strongly recommended to remove the declarations
136 > +and use package.use as presented above. Use of make.conf to set flags
137 > +is discouraged as it does not respect package defaults.
138
139 Let’s put this towards the beginning and also note that people should, in general,
140 not really need to set any PYTHON_TARGETS at all, other than for where packages
141 are lagging for having their support updated.

Replies