From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bengt Richter Subject: Re: Python 2 end-of-life? Date: Tue, 26 Nov 2019 13:51:45 -0800 Message-ID: <20191126215145.GA1044@PhantoNv4ArchGx.localdomain> References: Reply-To: Bengt Richter Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:53312) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZikn-0003ZN-MW for guix-devel@gnu.org; Tue, 26 Nov 2019 16:52:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZikl-0002iG-EV for guix-devel@gnu.org; Tue, 26 Nov 2019 16:52:12 -0500 Received: from imta-36.everyone.net ([216.200.145.36]:42390 helo=imta-38.everyone.net) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iZikj-0002eZ-KZ for guix-devel@gnu.org; Tue, 26 Nov 2019 16:52:10 -0500 Content-Disposition: inline In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Konrad Hinsen Cc: Guix Devel Hi Konrad, On +2019-11-26 17:51:52 +0100, Konrad Hinsen wrote: > Konrad Hinsen writes: > > > I'd say the very first thing we should do is look at all non-Python > > packages that depend indirectly on Python 2. > > Here is an attempt at identifying them: > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > (use-modules (guix packages) > (gnu packages) > (srfi srfi-1) > (ice-9 format)) > > (define (in-python2-ecosystem? package) > (string-prefix? "python2-" (package-name package))) > > (define python2-dependent-packages > (fold-packages (lambda (package result) > (cond ((in-python2-ecosystem? package) > result) > ((any in-python2-ecosystem? > (filter package? > (map second > (package-direct-inputs package)))) > (cons package result)) > (else result))) > '())) > > (for-each (lambda (package) > (format #t "~a~%" (package-full-name package))) > python2-dependent-packages) > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > I find 313 packages (see list below). A few of them are still Python > stuff (has "python" in the name but not "python2"), but most of them > look like packages that are not themselves Python libraries. > > Some of these packages are real heavyweights (llvm, texlive, qtwebkit, > ...), so I'd say each package deserves a bug report of its own if we > agree that a dependency on Python 2 should be considered a bug for a > non-Python package. > > Cheers, > Konrad. > > Pretty code :) Dependencies, not so much ;-/ [ ... orig list snipped ] I saved your post into file py2eol.txt and did: egrep -oh '^[^@;]+' py2eol.txt|sort|uniq -c|sort -h|tail --8<---------------cut here---------------start------------->8--- 1 zziplib 2 ffmpeg 2 ghc 2 openimageio 3 bedtools 5 mozjs 8 clang 8 clang-runtime 8 llvm 18 rust --8<---------------cut here---------------end--------------->8--- IOW, a bunch just differ by version -- I wonder how many of the packages that drew in old versions could run fine with respective latest versions of what they are dependent on? It would be really interesting if you could tweak your py2-dependent-package lister to show for each how many lines of py2 code are causing the py2 dependency! It would be a shame if half a dozen lines of python were pulling in all that weight if it could have been a few lines of guile or bash instead. The time it takes to figure out whether/how a trivial dependency can be eliminated is, ISTM, a major cause of gordian-knot dependency bloat -- which IMO in turn is a kind of RYF threat: it's effectively a free-time pay-wall. So, since memory is cheap and processors are fast, anything that "does the job" gets incorporated into our hacks, and trustworthiness dies of obesity ;-/ -- Regards, Bengt Richter