From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 7f0a252f216 1/2: Prefer python3 for python-interpreter Date: Sun, 29 Sep 2024 18:31:11 +0300 Message-ID: <86bk064gu8.fsf@gnu.org> References: <86r0958t97.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17303"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 29 17:31:51 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1suvtm-0004Li-Uv for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Sep 2024 17:31:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1suvtF-0003Xl-8E; Sun, 29 Sep 2024 11:31:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suvtB-0003XP-Tt for emacs-devel@gnu.org; Sun, 29 Sep 2024 11:31:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suvtB-0002Ag-DA; Sun, 29 Sep 2024 11:31:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tIyc3FspfhQmXJrFQQbetcbDk76fyjFt7ZHii00HybU=; b=XsBEUSrITm9h RCd+6vdbWb2cs3wfWk8spGptM58bYScNnneDBH2uDFG9TuRVpMz505zPknLRZf1BlQByXUzMKR6OB 4faKzkazUP4O+6l/Mnhs7VeBo2/uaV3uH7hbJsYArNj0j98eUpICIn50Y8bKnSVpO7VAklWb6n+VS huWGPUxUAndESSRtGfIfX0NJwZlOo9qlWNAiGSH6NNmZUh2X7RmJqUS8o8g+TLuNI3YwzzZ4COiW6 BsCu02CNHIxqe3jhx01xK8NBngiB25y7td/MsYDmCSImRE11Xlpi8RSGSoVYoUDDBKgGEuoLoEtsA MecGOaldCfxORB5PglISOQ==; In-Reply-To: (message from Stefan Kangas on Sun, 29 Sep 2024 08:23:04 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324195 Archived-At: > From: Stefan Kangas > Date: Sun, 29 Sep 2024 08:23:04 -0700 > Cc: emacs-devel@gnu.org > > Eli Zaretskii writes: > > >> -(defcustom python-interpreter "python" > >> +(defcustom python-interpreter > >> + (cond ((executable-find "python3") "python3") > >> + ((executable-find "python") "python") > >> + (t "python3")) > > > > Stefan, are you sure this change is for the better? python3 is not > > guaranteed to be available (e.g., it isn't on my system), so the above > > is a net loss for such systems. Bug#70722 and bug#70815 have some > > information about this mess, as it happens on different systems. Are > > you sure this change is not specific to what you see on macOS, for > > example? We could make the default value different on different > > systems, if we really need that, but as a single value, I think > > "python" is better, as it covers many more use cases > > There is no "python" binary or symlink by default on Debian, Ubuntu, > Fedora, etc. There is a "python" (a symlink) on Trisquel, and I think someone else said here the same about another variety (Arch?). > This means that for the vast majority of GNU/Linux users, I don't think I agree with the "vast majority" part. > the commands `python-sort-imports', `python-add-import', > `python-remove-import', and `python-fix-imports' have been broken by > default. That is now fixed. We had the previous value for a long time, and I don't recollect any complaints. So calling this "broken" is too far-reaching. > On macOS, "python" is a symlink to "python3", so there is no problem there. On MS-Windows, there's no "python3", just "python". > Note that this is the same value as for `python-shell-interpreter', and > that we have had no issues with. Not everyone invokes the interpreter. > > (including Python 2.x, which you seem to exclude entirely). > > If there is no "python3", it will fall back to "python". If that > happens to be Python 2 on your machine, that is what will be used. Can we be a bit more friendly to systems where the previous default was better? (Like I said: this should have been discussed in advance.)