[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Removal of Python 2?
From: |
Ludovic Courtès |
Subject: |
Re: Removal of Python 2? |
Date: |
Wed, 23 Jun 2021 17:26:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi,
Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:
>> Python 2 is dead, dead, dead like the parrot and end-of-prolonged life
>> as of more than 1 1/2 years. Anyhow, there might still be quite some
>> software not ported to Python 3 after 10 years. So I'm afraid we need to
>> keep Python 2.
>
> At this time, more than 2500 packages still depend on Python 2, and
> that's not just Python libraries. The list includes packages such as
> TeXlive, LLVM, Rust, OpenJDK, Calibre, OCaml, qemu, etc.
>
> For many of these packages, Python 2 is used only as part of the build
> procedure. Which is run in a highly protective sandbox. So I don't think
> we need to worry much about having Python 2 in Guix. To discourage
> people from installing it by accident, we could make it a hidden
> package.
I agree.
What we could do is start removing ‘python2-’ packages, especially those
with a non-negligible maintenance cost (numpy, scipy, matplotlib, etc.).
We can move them to the Guix-Past channel if there’s interest.
The attached script lists unused ‘python2-’ leaf packages:
--8<---------------cut here---------------start------------->8---
$ guix repl -- unused-python2-packages.scm | wc -l
288
--8<---------------cut here---------------end--------------->8---
Are these good candidates for removal?
Thoughts?
Ludo’.
(use-modules (gnu packages)
(guix)
(guix graph)
(guix scripts graph))
(define all
(fold-packages cons '() #:select? (const #t)))
(with-store store
(let ((back-edges (run-with-store store
(node-back-edges %bag-node-type all))))
(define (unused-python2? package)
(and (string-prefix? "python2-" (package-name package))
(zero? (node-reachable-count (list package)
back-edges))))
(for-each (lambda (package)
(when (unused-python2? package)
(format #t "~a~%" (package-name package))))
all)))
Re: Questions regarding Python packaging, Hartmut Goebel, 2021/06/22