From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#59477: python-tests fail without tree-sitter Date: Mon, 28 Nov 2022 11:01:52 +0100 Message-ID: References: <207B066C-2C1F-40B3-9E13-9DFC3ABCF92F@gmail.com> <0AAD0494-CF2D-4AE1-B939-4C610CC4018A@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_31492059-9F96-4CBA-B356-7D516C241443" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34993"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Stefan Monnier , 59477@debbugs.gnu.org To: kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 28 11:03:21 2022 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 1ozayv-0008xT-5r for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Nov 2022 11:03:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozayj-0002O8-AX; Mon, 28 Nov 2022 05:03:09 -0500 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 1ozayh-0002N1-Pp for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 05:03:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozayc-0002Xk-PE for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 05:03:07 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozayc-0008Tk-5S for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 05:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Nov 2022 10:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59477 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 59477-submit@debbugs.gnu.org id=B59477.166962972532584 (code B ref 59477); Mon, 28 Nov 2022 10:03:02 +0000 Original-Received: (at 59477) by debbugs.gnu.org; 28 Nov 2022 10:02:05 +0000 Original-Received: from localhost ([127.0.0.1]:47612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozaxg-0008TU-Gd for submit@debbugs.gnu.org; Mon, 28 Nov 2022 05:02:04 -0500 Original-Received: from mail-lj1-f182.google.com ([209.85.208.182]:47100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozaxe-0008T7-IK for 59477@debbugs.gnu.org; Mon, 28 Nov 2022 05:02:02 -0500 Original-Received: by mail-lj1-f182.google.com with SMTP id l8so12472420ljh.13 for <59477@debbugs.gnu.org>; Mon, 28 Nov 2022 02:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=QPse/98o/sFeviRPky6Cs1TCTdZJjYVeljB6GRPHMeQ=; b=kzPZcBUum3lYOU3vnQy8LUg8G/kM5JZcqARVIjgeqBMj0P7D3oTFXvaHaQtnZDys2z YquLFXVlfaYurolt2E1ziYqE7EK6gFDO2Icwj96a3abRM33KiSWE7LwdOcvTCCyRQ3+t YZy7/cfTCD0m83JSTSHXX4dxs/l5C8LsvCN69frixGLL/vGYDdtRGEaJ8yp1TXjbnACq fo1jIgn7kzzTbtiN9jfCygwDJykg04KVGHN030tRjNaqiRyNFlnZgT7Ykcu4j1ntw/Ye XksBIlvVFqRqbMt/c/mZXMJzXbZ0vETTYEffudwXztK3AoXEMtKtrauB97rJxXEJQUd/ Q5XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QPse/98o/sFeviRPky6Cs1TCTdZJjYVeljB6GRPHMeQ=; b=CY1MfRF7FU/ftSAYidhyy8oLMKbSY4BIiqX2UV+DImkreMpE2ygw4Zyu4ZDAJgNOiD jrOs6JS3wT8YUzgLOyhItaIB4IrYtgWDo4Q8wsPOA5UefXVtonwBeWZAZMxRzD1sq/Mp I2ziBrVNh6ODbNpVD17gDmFfRBeA6FJnbIKDXt6QTPIMK0DmNnuH3CC4fQcB08JqQym/ PJK+jK6zifB8p9b6YiC7QxpXYdUJC8D4lvGwBvvWnDrchmXuVlkrkr4YOLSObcgZWJmw qALDR8VbBfJ4gesOIXKxi/oL9MqQbDWIQ/USxbUC/yDNodNno4gyheEQGHZLmx+wAgX1 BdWQ== X-Gm-Message-State: ANoB5pnYqcYcFDI4r0NOShlLMJ6QpHNGlzaycUujCjWx3maaUzsWbSP6 b4Bpvxd+1szif6ZOVCAUuNY= X-Google-Smtp-Source: AA0mqf6FT5m59iI5+/vZeSW95pJzqvLLFotL3eBQavivcnliY8C1urfIsHUS1CilIb+mFwY+yT1VXw== X-Received: by 2002:a2e:3a07:0:b0:279:43be:97d6 with SMTP id h7-20020a2e3a07000000b0027943be97d6mr13761943lja.33.1669629716091; Mon, 28 Nov 2022 02:01:56 -0800 (PST) Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se. [188.150.171.209]) by smtp.gmail.com with ESMTPSA id q21-20020a0565123a9500b0049936272173sm1671289lfu.204.2022.11.28.02.01.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2022 02:01:55 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) 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:249274 Archived-At: --Apple-Mail=_31492059-9F96-4CBA-B356-7D516C241443 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 27 nov. 2022 kl. 15.48 skrev kobarity : > It seems to me that `python-ffap-module-path' or > `python-shell-send-string-no-output' is not working as expected on > your environment. Indeed, something in Emacs is making incorrect assumptions. > 1. emacs -Q > 2. Open Python file. (Empty file is OK) > 3. C-c C-p (M-x run-python) > 4. C-x o (Back to the Python mode buffer) > 5. M-: (python-shell-send-string-no-output "print('a')") >=20 > My expectation is "a". The result here is "__PYTHON_EL_eval(\"print('a')\", = \"/Users/mattias/emacs/asdf.py\")\r\na" which is consistent with the test failure -- something in python-mode is = having trouble parsing the reply. I traced `python-shell-output-filter`; = see attached file. This might be bug#25753 again (via a comment in etc/PROBLEMS). Even if = no effort is made to fix the bug properly, we should make sure the test = doesn't fail. --Apple-Mail=_31492059-9F96-4CBA-B356-7D516C241443 Content-Disposition: attachment; filename=python-shell-output-filter-trace.log Content-Type: application/octet-stream; x-unix-mode=0644; name="python-shell-output-filter-trace.log" Content-Transfer-Encoding: quoted-printable =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A1=20->=20= (python-shell-output-filter=20"exec(\"def=20__PYTHON_EL_eval(source,=20= filename):\\n=20=20=20=20import=20ast,=20sys\\n=20=20=20=20if=20= sys.version_info[0]=20=3D=3D=202:\\n=20=20=20=20=20=20=20=20from=20= __builtin__=20import=20compile,=20eval,=20globals\\n=20=20=20=20else:\\n=20= =20=20=20=20=20=20=20from=20builtins=20import=20compile,=20eval,=20= globals\\n=20=20=20=20try:\\n=20=20=20=20=20=20=20=20p,=20e=20=3D=20= ast.parse(source,=20filename),=20None\\n=20=20=20=20except=20= SyntaxError:\\n=20=20=20=20=20=20=20=20t,=20v,=20tb=20=3D=20= sys.exc_info()\\n=20=20=20=20=20=20=20=20sys.excepthook(t,=20v,=20= tb.tb_next)\\n=20=20=20=20=20=20=20=20return\\n=20=20=20=20if=20p.body=20= and=20isinstance(p.body[-1],=20ast.Expr):\\n=20=20=20=20=20=20=20=20e=20= =3D=20p.body.pop()\\n=20=20=20=20try:\\n=20=20=20=20=20=20=20=20g=20=3D=20= globals()\\n=20=20=20=20=20=20=20=20exec(compile(p,=20filename,=20= 'exec'),=20g,=20g)\\n=20=20=20=20=20=20=20=20if=20e:\\n=20=20=20=20=20=20= =20=20=20=20=20=20return=20eval(compile(ast.Expression(e.value),=20= filename,=20'eval'),=20g,=20g)\\n=20=20=20=20except=20Exception:\\n=20=20= =20=20=20=20=20=20t,=20v,=20tb=20=3D=20sys.exc_info()\\n=20=20=20=20=20=20= =20=20sys.excepthook(t,=20v,=20tb.tb_next)\")=0D\n")=0A1=20<-=20= python-shell-output-filter:=20""=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A1=20->=20= (python-shell-output-filter=20">>>=20")=0A1=20<-=20= python-shell-output-filter:=20""=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A1=20->=20= (python-shell-output-filter=20"exec(\"def=20= __PYTHON_EL_eval_file(filename,=20tempname,=20delete):\\n=20=20=20=20= import=20codecs,=20os,=20re\\n=20=20=20=20pattern=20=3D=20r'^[=20= \\t\\f]*#.*?coding[:=3D][=20\\t]*([-_.a-zA-Z0-9]+)'\\n=20=20=20=20with=20= codecs.open(tempname=20or=20filename,=20encoding=3D'latin-1')=20as=20= file:\\n=20=20=20=20=20=20=20=20match=20=3D=20re.match(pattern,=20= file.readline())\\n=20=20=20=20=20=20=20=20match=20=3D=20match=20or=20= re.match(pattern,=20file.readline())\\n=20=20=20=20=20=20=20=20encoding=20= =3D=20match.group(1)=20if=20match=20else=20'utf-8'\\n=20=20=20=20with=20= codecs.open(tempname=20or=20filename,=20encoding=3Dencoding)=20as=20= file:\\n=20=20=20=20=20=20=20=20source=20=3D=20= file.read().encode(encoding)\\n=20=20=20=20if=20delete=20and=20= tempname:\\n=20=20=20=20=20=20=20=20os.remove(tempname)\\n=20=20=20=20= return=20__PYTHON_EL_eval(source,=20filename)\")=0D\n")=0A1=20<-=20= python-shell-output-filter:=20""=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A1=20->=20= (python-shell-output-filter=20">>>=20")=0A1=20<-=20= python-shell-output-filter:=20""=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A1=20->=20= (python-shell-output-filter=20= "__PYTHON_EL_eval_file(\"/var/folders/qy/zstv16390nlcs47kz8nff_mm0000gn/T/= pyDjIqzH\",=20= \"/var/folders/qy/zstv16390nlcs47kz8nff_mm0000gn/T/pyDjIqzH\",=20True)=0D= \n")=0A1=20<-=20python-shell-output-filter:=20""=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A1=20->=20= (python-shell-output-filter=20"python.el:=20native=20completion=20setup=20= failed,=20:=20libedit=20based=20readline=20is=20= known=20not=20to=20work,=0D\n=20=20=20=20=20=20see=20etc/PROBLEMS=20= under=20\"In=20Inferior=20Python=20mode,=20input=20is=20echoed\".=0D= \n>>>=20")=0A1=20<-=20python-shell-output-filter:=20""=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A1=20->=20= (python-shell-output-filter=20"__PYTHON_EL_eval(\"print('a')\",=20= \"/Users/mattias/emacs/asdf.py\")=0D\na=0D\n>>>=20")=0A1=20<-=20= python-shell-output-filter:=20""=0A= --Apple-Mail=_31492059-9F96-4CBA-B356-7D516C241443--