From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pankaj Jangid Newsgroups: gmane.emacs.bugs Subject: bug#45655: Please use 'python3' command instead of 'python' Date: Mon, 11 Jan 2021 10:47:59 +0530 Message-ID: References: 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="11546"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: Balint Reczey , 45655@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 11 06:19:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kypbp-0002ti-Qf for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jan 2021 06:19:17 +0100 Original-Received: from localhost ([::1]:41374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kypbo-0001J3-Mh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jan 2021 00:19:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kypba-0001I1-Hs for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 00:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kypba-0003R5-B2 for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 00:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kypba-00075L-5X for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 00:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pankaj Jangid Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2021 05:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45655 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 45655-submit@debbugs.gnu.org id=B45655.161034229227176 (code B ref 45655); Mon, 11 Jan 2021 05:19:02 +0000 Original-Received: (at 45655) by debbugs.gnu.org; 11 Jan 2021 05:18:12 +0000 Original-Received: from localhost ([127.0.0.1]:55355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kypam-00074G-Bb for submit@debbugs.gnu.org; Mon, 11 Jan 2021 00:18:12 -0500 Original-Received: from mail-pg1-f172.google.com ([209.85.215.172]:46082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kypaj-000743-VV for 45655@debbugs.gnu.org; Mon, 11 Jan 2021 00:18:10 -0500 Original-Received: by mail-pg1-f172.google.com with SMTP id c22so11804056pgg.13 for <45655@debbugs.gnu.org>; Sun, 10 Jan 2021 21:18:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Uz6syD1gmerlLCVsSiJzbptwHKzULM8448IiA7k1JXU=; b=ZUuXfX0rQv0Ru0jLWIl3awPRQzztw9wKOL8g98y6+7kzo+yEsc+WQ5Sr8JWLHjmcYs d+YG0ZvnkbH9nQ+HQDLsFsUHYqvwxomy+CbzwRIfoaujoWj5dBjDqe37kf5A+Kn0CMU5 jFF/jjZFb4ti8ns2T18CB8rLDyHkfqCoFbnqVPMgysccFo87b1M8f+MxNkX5bnD5emI1 N5T0/hz1JUhxG55sfEkRT4iRxWjKzyxKKbek8WTw6mERDZt9lfX/JEpOjuvlGKj0Ul+z UF8n88aFZxr5SM1Vtcr43NLhHoaCwtpu5QY61ms3rGabVLWpgczc4PWmVVg3N2RNQ7k6 eiNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Uz6syD1gmerlLCVsSiJzbptwHKzULM8448IiA7k1JXU=; b=spaQtlBOLAaIqqm6KI+BrZH+yrfi0EsRAyvlDwnsuMPqJBYsXMNrXMQOQOGlbpVLCe B1W4ZHNpaCZepOU4hqgPS46lBR1hhaMeWALvN6O+HTvFJau2dSGVBfhGrpYeoW0XBSTJ aurzIpORwCNIYRxEBjXIPMTzRY0ESNhhgRRXO7F5Ykr02CEHcIpF5+zFdAlCQEOgVEbj bLA23vyJOZGfvmWG8UA6hsudUrBKw6ZcxHl6f1T++m4YpCZZa6hV39nle7zNSeB5Ueca j+bbGo+x7X6DR8eCTmQYXUMvikxzGvPc1pCl+G6a7yPkvZfCeKDfBXzkDmaEHSIqj/p1 IKRw== X-Gm-Message-State: AOAM531SvffvZ97o4J5BdULM5pgI4/j9Qp4ROuurK1EllZ+1+uTxxAyJ ao0T6CJshUw0xatzr1z/sheexE6HReDAYg== X-Google-Smtp-Source: ABdhPJz7fsvR7rPG/PL320IYcHtQng4qRKqrUhV5qehtuKHJSnF31oaWJ9CWAwq5TuFPYY4Nxg7tFw== X-Received: by 2002:a63:6686:: with SMTP id a128mr18052177pgc.96.1610342283858; Sun, 10 Jan 2021 21:18:03 -0800 (PST) Original-Received: from mb2.local ([2405:201:5c06:70bb:39ce:11cc:a555:7b63]) by smtp.gmail.com with ESMTPSA id y189sm17185235pfb.155.2021.01.10.21.18.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jan 2021 21:18:03 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sun, 10 Jan 2021 15:48:52 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197675 Archived-At: Stefan Monnier writes: > In contrast the question at hand is "which version of Python should one > start when the user wants to run a Python subprocess". I think it's > reasonable to consider that *if* there is a `python` executable in > $PATH, it makes sense to considered it as the preferred version > of Python. We need to consider multiple scenarios: 1. Both, =E2=80=98python=E2=80=99 as well as =E2=80=98python3=E2=80=99 exec= utables, are in PATH. 1.1 =E2=80=98python=E2=80=99 pointing to Python v2 1.2 =E2=80=98python=E2=80=99 pointing to Python v3 2. Only =E2=80=98python=E2=80=99 is in PATH - This is surely Python v2 otherwise =E2=80=98python3=E2=80=99 will also= be in PATH 3. Only =E2=80=98python3=E2=80=99 is in PATH In (2) and (3), we have only one choice to pick. The point of discussion are (1.1) and (1.2). In (1.2), user has somehow customized the system PATH and made Python v3 as default. So we can obey what the user wants - pick =E2=80=98python=E2=80=99. Although, I don=E2=80=99t know if there is a stan= dard prescription on =E2=80=98python2=E2=80=99 executable, but on some systems this is available= (macOS). In case of (1.2), we can simply pick =E2=80=98python=E2=80=99. (1.1) is the case where both Python v2 and Python v3 are installed and we don=E2=80=99t know what the user wants. =E2=80=98python=E2=80=99 and =E2= =80=98python3=E2=80=99 (and may be =E2=80=98python2=E2=80=99) are in PATH. In (1.1), my opinion is that we should pick the version which is officially supported by the Python Community - pick =E2=80=98python3=E2=80= =99.