From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 189B71382C5 for ; Wed, 5 May 2021 18:03:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4B66BE0895; Wed, 5 May 2021 18:03:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 20019E0895 for ; Wed, 5 May 2021 18:03:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7555133FE49 for ; Wed, 5 May 2021 18:02:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 022C24C3 for ; Wed, 5 May 2021 18:02:58 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1620237772.cc47cb4025356c782288994a6fb5ba9b83385b5f.mgorny@gentoo> Subject: [gentoo-commits] data/gentoo-news:master commit in: 2021-05-05-python3-9/ X-VCS-Repository: data/gentoo-news X-VCS-Files: 2021-05-05-python3-9/2021-05-05-python3-9.en.txt X-VCS-Directories: 2021-05-05-python3-9/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: cc47cb4025356c782288994a6fb5ba9b83385b5f X-VCS-Branch: master Date: Wed, 5 May 2021 18:02:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f75b366-c140-4635-bcd6-af2698830ed1 X-Archives-Hash: 8eb554958fe2e6ef921a562d781df3d0 commit: cc47cb4025356c782288994a6fb5ba9b83385b5f Author: Michał Górny gentoo org> AuthorDate: Thu Apr 29 11:43:16 2021 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed May 5 18:02:52 2021 +0000 URL: https://gitweb.gentoo.org/data/gentoo-news.git/commit/?id=cc47cb40 Add Python 3.9 news item Signed-off-by: Michał Górny gentoo.org> 2021-05-05-python3-9/2021-05-05-python3-9.en.txt | 119 +++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/2021-05-05-python3-9/2021-05-05-python3-9.en.txt b/2021-05-05-python3-9/2021-05-05-python3-9.en.txt new file mode 100644 index 0000000..f42ec91 --- /dev/null +++ b/2021-05-05-python3-9/2021-05-05-python3-9.en.txt @@ -0,0 +1,119 @@ +Title: Python 3.9 to become the default on 2021-06-01 +Author: Michał Górny +Posted: 2021-05-05 +Revision: 1 +News-Item-Format: 2.0 +Display-If-Installed: dev-lang/python:3.7 +Display-If-Installed: dev-lang/python:3.8 + +We are planning to switch the default Python target of Gentoo systems +on 2021-06-01, from Python 3.8 to Python 3.9. If you have not changed +the values of PYTHON_TARGETS or PYTHON_SINGLE_TARGET, the change will +have immediate effect on your system and the package manager will try +to switch automatically on the next upgrade following the change. + +If you did change the values, prefer a safer approach or have problems +with the update, read on. + +Please note that the default upgrade method switches packages to the new +Python versions as they are rebuilt. This means that all interdependent +packages have to support the new version for the upgrade to proceed, +and that some programs may temporarily fail to find their dependencies +throughout the upgrade (although programs that are already started +are unlikely to be affected). + + +If you have PYTHON_TARGETS or PYTHON_SINGLE_TARGET declared +in make.conf, please remove these declarations as they will interfere +with the package.use samples provided below. Using make.conf for Python +targets is discouraged as it prevents package defaults from applying +when necessary. This news item assumes using /etc/portage/package.use +or your package manager's equivalent file for configuration. + + +At this point, you have a few configuration options to choose from: + +1. If you wish Python upgrades to apply automatically, you can remove + PYTHON_TARGETS and PYTHON_SINGLE_TARGET declarations. When + the defaults change, your package manager should handle the upgrade + automatically. However, you may still need to run the update + commands if any problems arise. + +2. If you wish to defer the upgrade for the time being, you can + explicitly set the old values in package.use. + +3. If you wish to force the upgrade earlier, you can explicitly set + the new values and run the upgrade commands. + +4. If you wish to use a safer approach (i.e. less likely to temporarily + break packages during the upgrade), you can perform a multi-step + upgrade as outlined below. + +5. Finally, you can use an arbitrary combination of PYTHON_TARGETS + and PYTHON_SINGLE_TARGET. + + +Deferring the upgrade +===================== +To defer the upgrade, explicitly set the old targets: + + */* PYTHON_TARGETS: -* python3_8 + */* PYTHON_SINGLE_TARGET: -* python3_8 + +This will enforce Python 3.8 and block any future updates. However, +please note that this solution will only be suitable for a few more +months and you will eventually need to perform the migration. + + +Forcing the upgrade +=================== +To force the upgrade earlier, explicitly set Python 3.9 targets: + + */* PYTHON_TARGETS: -* python3_9 + */* PYTHON_SINGLE_TARGET: -* python3_9 + +However, it is important to remember to remove this after the defaults +change, as it will interfere with the automatic switch to the next +Python version in the future. + + +Safer upgrade procedure +======================= +A safer approach is to add Python 3.9 support to your system first, +and only then remove Python 3.8. However, note that involves two +rebuilds of all the affected packages, so it will take noticeably +longer. + +First, enable both Python 3.8 and Python 3.9, and then run the upgrade +commands: + + */* PYTHON_TARGETS: -* python3_8 python3_9 + */* PYTHON_SINGLE_TARGET: -* python3_8 + +Then switch PYTHON_SINGLE_TARGET and run a second batch of upgrades: + + */* PYTHON_TARGETS: -* python3_8 python3_9 + */* PYTHON_SINGLE_TARGET: -* python3_9 + +Finally, switch to the final version and upgrade: + + */* PYTHON_TARGETS: -* python3_9 + */* PYTHON_SINGLE_TARGET: -* python3_9 + +You may wish to remove the target overrides after the defaults switch. +Alternatively, you can keep them to block the next automatic upgrade +to Python 3.10, and upgrade manually then. + + +Upgrade commands +================ +The Python 3.8 cleanup requires that Python 3.8 is removed from complete +dependency trees in batch. If some of the installed packages using +an older Python version are not triaged for the upgrade, the package +manager will throw dependency conflicts. This makes it important that +the upgrade is carried via a --deep --changed-use @world upgrade, +as well as that any stray packages are removed prior to it, e.g.: + + emerge --depclean + emerge -1vUD @world + emerge --depclean