From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: kobarity Newsgroups: gmane.emacs.bugs Subject: bug#70815: [PATCH] ; Enahnce python-tests.el to adapt different python interpreters Date: Wed, 29 May 2024 00:17:27 +0900 Message-ID: References: <6057C283-20C5-4A91-9CD4-EBA521B8C893@gmail.com> <7CF65AE1-B3AC-40C5-AC82-CE575E5E1831@gmail.com> <86h6ekwoxb.fsf@gnu.org> <7440E11E-25EF-44C4-A2D8-7F95C2C20466@gmail.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29210"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: Eli Zaretskii , Lin Sun , Stefan Kangas , 70815@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 28 17:19:17 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 1sBybc-0007Qy-QW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 May 2024 17:19:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBybH-0006dq-3h; Tue, 28 May 2024 11:18:55 -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 1sBybF-0006d4-AE for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 11:18:53 -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 1sBybF-0001Rw-0n for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 11:18:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sBybN-0004Qr-Sy for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 11:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 May 2024 15:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70815 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70815-submit@debbugs.gnu.org id=B70815.171690953017020 (code B ref 70815); Tue, 28 May 2024 15:19:01 +0000 Original-Received: (at 70815) by debbugs.gnu.org; 28 May 2024 15:18:50 +0000 Original-Received: from localhost ([127.0.0.1]:46799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBybB-0004QS-Mu for submit@debbugs.gnu.org; Tue, 28 May 2024 11:18:50 -0400 Original-Received: from mail-pl1-f174.google.com ([209.85.214.174]:42115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sByb9-0004QE-Lc for 70815@debbugs.gnu.org; Tue, 28 May 2024 11:18:48 -0400 Original-Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1f4a6a54416so6530165ad.0 for <70815@debbugs.gnu.org>; Tue, 28 May 2024 08:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716909452; x=1717514252; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=j69oWGozojl02tw/87vYQsuUWJwNsOEyoba0xcxkU3M=; b=W30Nh5tJk7Mu5J526coYuga1LIKXi0atlAoz9wSZWwMO/b8maUN0CgPVn29sjYr+Jy 1SeOlK2EbuMrZ7ZqPfI467p3Nr+2/OSPF6srFPjw/KPo9q0VOpkNyS27ayiB1oFpimhc Fxf5wsN+FosvQr65Twu+S/nc5OaRLLQ7OkbEWbiBjEIAH+6MhKjWbUaTilawmeQKgP2h hW0R6G8H23MDs0XkqfiA3As7oYqr5R3AYIP479DrnsZHyXj2SBMdOzA8Q1FSMIsU3F5n 22JLB6Brtk3TiiYCwtEblRUNZli9b9N3iFznR4sCFOfGIxdZ5RttLqBTZuXUjJCkwKsF p93w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716909452; x=1717514252; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=j69oWGozojl02tw/87vYQsuUWJwNsOEyoba0xcxkU3M=; b=Z/d9EQB2FOnBttmxA/M823hul1MJxT6+C3q18gcibziU0ofhfpX2Wg2N8zXRphS/h9 jNj2UpOoIOVantpur/eEaHN+PlUhbfVjnKLS1zEdZV1PXqx/c2nLzWDis4D2lRTX+TsR hQNp9t7mnR3fG0OCzZWMhkP7qV9sRK7IjJeUzUi6eKZnkmBIhTCIIcB9oWoTE1ly80lj C66/09Ufc2ox6LweFIoeRJ2HOg8OfrXpN4JTC0myzy5c7qaXIykbJJC4v/rxy/whAEY7 Ei2HICJMaqSoOi2EVrOi/VaRPNl+k9D9c4iplkG1HQvtiLaos3ha4wPijS/kaFeK4l7K VdGA== X-Forwarded-Encrypted: i=1; AJvYcCUcL2GoHYnfiI1NxEBUTRc2KADJhIvQvYQvpiTZNWNnCV+xbapPUV8TiFJV52/ysIbDFzrNRXyRSNxYOVlSLRChnIvfwJM= X-Gm-Message-State: AOJu0Yywh9QhhJqiqSZvP7pVr1ys7QOtJGi29H+EVVVTCb7BOQMHWN0O IVBQ8VDzaLEkxzjzP6uqwZid7B3JaZspwKrNEm9JuoWtbPggVSCm X-Google-Smtp-Source: AGHT+IHA9FE5V3iAKxg/PSY4ne8YtwgEMnmKQxcPXVwnPpxal/jz2r0mhi7HlWkoDlJed+KxwK2d9w== X-Received: by 2002:a17:902:e804:b0:1e2:45f3:2d57 with SMTP id d9443c01a7336-1f448125aa6mr173430075ad.6.1716909452053; Tue, 28 May 2024 08:17:32 -0700 (PDT) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f471f127c2sm61555125ad.13.2024.05.28.08.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 08:17:31 -0700 (PDT) In-Reply-To: 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:286091 Archived-At: Mattias Engdeg=E5rd wrote: >=20 > 27 maj 2024 kl. 14.33 skrev kobarity : >=20 > > We probably have found the bug with Python 2 on Mac, unless > > there is a bug on the ERTs. >=20 > It could just be a mismatch of expectations. With python-shell-interprete= r set to "python2", tab-completion in the Python interactive shell works bu= t in a diminished capacity. For example, 'pri' completes to 'print' bu= t 'math.sq' does not complete to 'math.sqrt(' as it does in Python 3. I think it is a "bug". Because it is working with Python 2 on Linux (with native and non-native completions), and I believe many would expect it to work. In any case, to accommodate the ERTs for such differences, a mechanism to skip an ERT based on the interpreter version (or some other property) is needed. > > Changing the order of the interpreters to find or skipping > > some ERTs does not solve the problem. >=20 > But it does fix a different problem: it tests python-mode with Python 3, = which is more important. As I mentioned before, I am not opposed to prioritize "python3". I don't think anyone is arguing that "python" should precede "python3" anymore. > > However, it seems that only a > > limited number of people can pursue the problem on Mac, and fewer > > people will have trouble with Python 2 issues. So for now, I think it > > is better to skip these ERTs for Python 2 on Mac only. >=20 > We can probably agree that absent explicit information about what version= the user wants tested, we should test python-mode with Python 3 on macOS a= nd other platforms. >=20 > If you think it is important we can also test it with Python 2 if availab= le. Rejigging the tests to run for multiple Python versions is certainly po= ssible but would be some work. >=20 > Meanwhile I'm just going to make the tests use the same logic as python.e= l for selecting the binary to use, as there does not seem to be a reason wh= y this would make anything worse. >=20 You have an option to set EMACS_PYTHON_INTERPRETER environment variable to "python3", just for now.