From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Liu Hui Newsgroups: gmane.emacs.bugs Subject: bug#68559: [PATCH] Improve Python shell completion Date: Fri, 16 Feb 2024 12:06:38 +0800 Message-ID: References: <6BAFD8BF-8F18-4D9F-9DB3-A185AEF2EBCA@gmail.com> <867cj5wuo6.fsf@gnu.org> 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="19947"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , kobarity@gmail.com, 68559@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 16 05:09:07 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 1rapX9-0004xW-Nr for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Feb 2024 05:09:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rapWn-0001So-Ed; Thu, 15 Feb 2024 23:08:45 -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 1rapWl-0001SV-Uj for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 23:08:43 -0500 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 1rapWl-0001Q2-Lo for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 23:08:43 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rapX4-0008RS-3b for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 23:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Liu Hui Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Feb 2024 04:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68559-submit@debbugs.gnu.org id=B68559.170805649832383 (code B ref 68559); Fri, 16 Feb 2024 04:09:02 +0000 Original-Received: (at 68559) by debbugs.gnu.org; 16 Feb 2024 04:08:18 +0000 Original-Received: from localhost ([127.0.0.1]:57739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rapWL-0008QD-Nn for submit@debbugs.gnu.org; Thu, 15 Feb 2024 23:08:18 -0500 Original-Received: from mail-ua1-f52.google.com ([209.85.222.52]:44175) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rapWJ-0008Pz-3N for 68559@debbugs.gnu.org; Thu, 15 Feb 2024 23:08:16 -0500 Original-Received: by mail-ua1-f52.google.com with SMTP id a1e0cc1a2514c-7d5c890c67fso821787241.0 for <68559@debbugs.gnu.org>; Thu, 15 Feb 2024 20:07:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708056410; x=1708661210; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qXmumEQ6vns8pT+J52knRN9F6Rn4II8LlvrTrMDYuuI=; b=ByX/38dWLbTSaTxTkavBuSOYgh/ZU3TSk/SgaDhPcngnic4dUuRhvy0RhlvA4t8YQi iO08r76CBVmDhtOmjZBtLkmFsGugmtEV5+cR8ExCcsQqSI9zyxXZ92CvMRs7LGYCHh9o c3rV6ZgaBGSNTqD+V8zaey1KRVAtHrl2Wo4sBAkveaiM7nbRrcPRKNMIjPWaDIB8AnCz ZaQD/1mrQWZcJTAal6bUUp0nz1YMqBFfPDy3/adSQy6x9cNQ4+RbBMMLOQBZulkZ5hXV kDpRo6Xh1IgQnszcoFuuEd1mhRO9E3m+XuK28UND6DRTp0KiXs+qiVLLq0KYdCN26l4S t8Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708056410; x=1708661210; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qXmumEQ6vns8pT+J52knRN9F6Rn4II8LlvrTrMDYuuI=; b=Ke4dPqaFOB1oCA2Vn+1RnD1Vs8G4YbAG6TnCfnnG9+oo8tEGWWharyNulYIPijZDUM 0qTAVUf6WzDD1raM4FCSL433WbD5jK0Y2i2nrr6aBFp6n7p/5mS5Hts6RmYZ18YpYv1r cHoZPaEkspxhuiwHH0O+rFm5OpPAM/JaZxpA756xTT2qB1fl2N1pr3jtg0LEC5Q7zGWw WkKB5YYLmbInqDxHpIKtbdj7uFPLTwznEHUP0Dkl5tL5BkbFmVFYLgaN5lXA277LwOHh iBMQD8F7HrLM42zHpq4FpFhN+6Ru/dSejV+jS4f3sE7q6Fi78IGKB5dVXIhauHs8wrvL ZIYw== X-Forwarded-Encrypted: i=1; AJvYcCUrbt0sd4/S+GOYxNNq+u0wISG1bcfA+qH0KVx+FL6CO8v/EeUDylXQLvVv/GKbE/S3G1HwW6kFsnWzwbK8GmJ651JurYM= X-Gm-Message-State: AOJu0YyWHK+RHtnXsks2YPjBThXIVHjqshv2qA+jdFYmQ/JJ3UdQEXk1 pNf41pX2rihDMv2afjd/W7iS/yy0vpQAwh+pr1eyZ1rHX8Ip8jTaS2ZD2+5Mwxq8HWKypA5npqk T6ZUc44p2y+krLvIMrCvzl+gktqg= X-Google-Smtp-Source: AGHT+IHCnD5TVDO0eSjdRA3GMn5HkTZ+D6HakvP/R0sH3XWM5/Lhg7xaSHypHEUpNomQXMeB8NvdOy+Jk+9gKVTePis= X-Received: by 2002:a67:fdd5:0:b0:46e:ba3b:7b16 with SMTP id l21-20020a67fdd5000000b0046eba3b7b16mr3944980vsq.16.1708056410353; Thu, 15 Feb 2024 20:06:50 -0800 (PST) In-Reply-To: <867cj5wuo6.fsf@gnu.org> 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:280088 Archived-At: On Fri, Feb 16, 2024 at 12:37=E2=80=AFAM Eli Zaretskii wrote= : > > > From: Mattias Engdeg=C3=A5rd > > Date: Thu, 15 Feb 2024 15:43:32 +0100 > > Cc: Eli Zaretskii , > > kobarity@gmail.com, > > 68559@debbugs.gnu.org > > The recent change on master, 0b9c7148fd, causes several failures in pyt= hon-tests here (macOS). Log attached. > > > > It seems to have something to do with completion. Maybe the new code is= sensitive to details of Python's command line editor? The standard Python = interpreter is unlikely to use GNU readline, for example. > > The python-*-completion-at-point-* tests never worked for me, and I > always assumed it was something specific to MS-Windows. But maybe > not. There was no change in the tests that fail for me before and > after the recent changes related to Python. The Python shell completion relies on the readline module, which is not available for Python on MS-Windows. According to the instruction in python.el: ;; readline based shell (it's known to work with PyPy). If your ;; Python installation lacks readline (like CPython for Windows), ;; installing pyreadline (URL `https://ipython.org/pyreadline.html') ;; should suffice. To troubleshoot why you are not getting any ;; completions, you can try the following in your Python shell: ;; >>> import readline, rlcompleter ;; If you see an error, then you need to either install pyreadline or ;; setup custom code that avoids that dependency. It may be necessary to install pyreadline (for Python 2.7) or pyreadline3 (for Python 3).