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.bugs Subject: bug#70440: [PATCH] Use -P switch when calling 'python-interpreter' Date: Thu, 18 Apr 2024 18:57:38 +0300 Message-ID: <86wmoud5ot.fsf@gnu.org> References: <87h6fzj1b1.fsf@gmail.com> <861q73hkeq.fsf@gnu.org> <87sezihdmy.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27795"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70440@debbugs.gnu.org, kobarity@gmail.com To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 18 17:59:11 2024 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 1rxUAI-0006sU-Bd for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Apr 2024 17:59:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxUA0-0004LF-38; Thu, 18 Apr 2024 11:58:52 -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 1rxU9y-0004L7-V6 for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 11:58:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxU9y-0004Nr-Mo for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 11:58:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rxUAB-00038G-S6 for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 11:59:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Apr 2024 15:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70440-submit@debbugs.gnu.org id=B70440.171345590211772 (code B ref 70440); Thu, 18 Apr 2024 15:59:03 +0000 Original-Received: (at 70440) by debbugs.gnu.org; 18 Apr 2024 15:58:22 +0000 Original-Received: from localhost ([127.0.0.1]:53194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxU9U-00033c-Vu for submit@debbugs.gnu.org; Thu, 18 Apr 2024 11:58:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxU9S-00032M-0f for 70440@debbugs.gnu.org; Thu, 18 Apr 2024 11:58:19 -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 1rxU93-0004Iy-SG; Thu, 18 Apr 2024 11:57:55 -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=XCt6Ig6Fxmw9/YarWoy8uctgR0Fsr+5h3q/oZPtdN8c=; b=qcYkAMU2jE4N iqnp5tDSb63y1n23r5bZC+PULs4e1B9htB1oqT0lkXcLIB1kL0y/QHiuZdAhdcANpLwrbTIs+BTIb AJl7HErBa+dyH+imPQOaBgpSPql4qTkJW8QbLvDBbwUDlpgRgIz3QzZbP4z6Y+FlwurVENImLSwxJ 4qrgZW1vXWYaohGzcisLoFT0OiyI6AmR6pcb7tav+Dty6zwPfjCL1wPtNQWOHTWDZYRX5OKUQATN4 LB3i6KW9Zhmrs6qpr1pi/2kgEpFO90NcIn/MRrL8cmAeUeVMZtX4hIdGxXcDZ+md+bIC8aSOCKGMv x4P/2ArYEA+fz5l1mCwVXQ==; In-Reply-To: <87sezihdmy.fsf@gmail.com> (message from Augusto Stoffel on Thu, 18 Apr 2024 17:52:21 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283579 Archived-At: > From: Augusto Stoffel > Cc: Eli Zaretskii , 70440@debbugs.gnu.org > Date: Thu, 18 Apr 2024 17:52:21 +0200 > > On Fri, 19 Apr 2024 at 00:25, kobarity wrote: > > > The -P switch is new, introduced in CPython 3.11, so I don't think it > > can be added unconditionally. Furthermore, `python-interpreter' may > > not be CPython. Isn't it enough to customize > > `python-interpreter-args'? > > Ah, too bad. So let's send that option via environment variables. I'll > make a new patch when I get the chance. Maybe we should discuss this before you sit down to write and text the code. Pushing things into the environment has its downsides: those environment variables then affect all the subordinate processes, including their children, grandchildren etc. This is not always wanted. One alternative to environment variables would be detecting whether -P is supported before the first time we invoke Python. We do similar stuff for Grep and other programs we invoke.