From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: python-mode: Why python-interpreter defaults to "python" instead of looking for python/python3 Date: Thu, 16 Mar 2023 10:18:02 +0000 Message-ID: <87o7otf19h.fsf@posteo.net> References: <874jqv3uab.fsf@gmail.com> <87ilf1atyx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2403"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Mart=C3=ADn_Fern=C3=A1ndez?= , emacs-devel@gnu.org To: Augusto Stoffel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 16 11:18:36 2023 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 1pckgu-0000QC-I9 for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Mar 2023 11:18:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pckgG-00074W-Dm; Thu, 16 Mar 2023 06:17:56 -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 1pckg8-00073v-HR for emacs-devel@gnu.org; Thu, 16 Mar 2023 06:17:49 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pckg2-0002uU-Nq for emacs-devel@gnu.org; Thu, 16 Mar 2023 06:17:48 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 91D922403CE for ; Thu, 16 Mar 2023 11:17:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1678961859; bh=yLoidZO3V3BgMY3QYRJf2GsesBgTDD7WT+WscA+cSDc=; h=From:To:Cc:Subject:Date:From; b=fCflWnNJPlza2/H+Yo4HSR0m3ecLADESj6jZrNxT2Wo613gu752wl0gZGwx/VHYFE d25G/Fn16v4ErcxxjwU9TEPKhA+0o6TUVRMijZDYUgZH6MxVqov86Oq18WHFr7RIEe G2kAC7DF+vrGJv4BDtG1scPTr6FkEF2ngmc75SYrnbNYm0kQ99lXEVonrJ2U+tYqVX 0vcTUByYuGCahp0zBLhHOJn9jrr2yzG4ilUko+PKFt2DhPMKPK+s5uWYSCH24uQG9k AGWKy8yuu499j98pCFn2m84Kd6ZozpObw4ASD+C306fLfjOz5qZyiG5YqZHj6rWM0B 9xexLbOIFk6SQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Pcjr305qlz6tqv; Thu, 16 Mar 2023 11:17:38 +0100 (CET) In-Reply-To: <87ilf1atyx.fsf@gmail.com> (Augusto Stoffel's message of "Thu, 16 Mar 2023 11:09:10 +0100") Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:304515 Archived-At: Augusto Stoffel writes: > Hi again Mart=C3=ADn, > > On Wed, 8 Mar 2023 at 20:41, Augusto Stoffel wrote: > >> On Wed, 8 Mar 2023 at 11:03, Mart=C3=ADn Fern=C3=A1ndez wrote: >> >>> Hey, >>> >>> I'm wondering why there is no logic to find the latest python >>> executable installed (python vs python3) when setting >>> `python-interpreter`, as it is done with `python-shell-interpreter`. >>> >>> I think it should be added, but since it is a straightforward change I >>> assume there are reasons for it. Otherwise I'm happy to send a patch. > > Can you expand a bit on why you think so? I just noticed that Debian > doesn't provide a `python' command by default, so indeed some logic > might be needed.=20=20 That depends on your version. According to [0], Debian 11 has a package called "python2-is-python" that just create a symlink between python and python2. This has been removed with Debian 12, now you'd have to install python-is-python3 to have python symlink'ed to python3. [0] https://wiki.debian.org/Python/FAQ#Python_2_support >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > But then it should look for python, then python3, and > finally fall back to python. Still, doing so has its downsides, as I > mentioned in my previous message. > >> IMO the logic to choose `python-shell-interpreter' is misguided. The >> default value should be just "python", since if you are doing anything >> with Python and "python" doesn't point to the right version, then you >> are in trouble anyway. OTOH, if you really need to work with Python 2 >> and symlink "python" accordingly then the current default proactively >> puts you in trouble. >> >> Personally I'd be happy to see a patch fixing `python-shell-interpreter'.