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#68559: [PATCH] Improve Python shell completion Date: Fri, 16 Feb 2024 09:41:37 +0200 Message-ID: <86sf1svosu.fsf@gnu.org> 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: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7524"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattias.engdegard@gmail.com, kobarity@gmail.com, 68559@debbugs.gnu.org To: Liu Hui Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 16 08:43:06 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 1rassD-0001n8-HJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Feb 2024 08:43:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rasrs-0000Gv-9o; Fri, 16 Feb 2024 02:42:44 -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 1rasrq-0000Ge-Us for bug-gnu-emacs@gnu.org; Fri, 16 Feb 2024 02:42: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 1rasrq-0004qP-LV for bug-gnu-emacs@gnu.org; Fri, 16 Feb 2024 02:42:42 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rass9-0005wL-N3 for bug-gnu-emacs@gnu.org; Fri, 16 Feb 2024 02:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Feb 2024 07:43:01 +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.170806932722744 (code B ref 68559); Fri, 16 Feb 2024 07:43:01 +0000 Original-Received: (at 68559) by debbugs.gnu.org; 16 Feb 2024 07:42:07 +0000 Original-Received: from localhost ([127.0.0.1]:57830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rasrG-0005uk-H8 for submit@debbugs.gnu.org; Fri, 16 Feb 2024 02:42:06 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rasrF-0005uG-D7 for 68559@debbugs.gnu.org; Fri, 16 Feb 2024 02:42:06 -0500 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 1rasqq-0004mM-Uv; Fri, 16 Feb 2024 02:41:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=oApy5J8kEAa/5feiuYpDORSOJCl/e2PRmYY1d8Uy7yQ=; b=iAmzTOSUZB2VW6lRAiFK NKyPH/68FlMzfs9SNUh9esxAM+cNfp5pdo+2f5QKGNRsRBZkCcRBR/mzRN0Rm0UBlN0NE8hAuWt+1 1WmGxH6gREmQ95KGJCJMqS5A/1qeAKmXxo++NXYH0bj0DhqXa7BurzqF9+c4bFm7BqXezXIteuh+C a9DJYgOpLv2ImOXVtZ/+TTfJVlFPWWJgbAmGUXbFFUk0crWZodL+u3Rh0OeedmDeMMJII83DzgDd+ GwNRhUcDpA7dwcrFkwbMDCZBn2XUsuH2tviS9DVuEnZ4ONx3fjFDYaq8JyZSVsocw3SSZCJMnLww2 y2AZ3QlyxNQImw==; In-Reply-To: (message from Liu Hui on Fri, 16 Feb 2024 12:06:38 +0800) 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:280093 Archived-At: > From: Liu Hui > Date: Fri, 16 Feb 2024 12:06:38 +0800 > Cc: Mattias Engdegård , > kobarity@gmail.com, 68559@debbugs.gnu.org > > On Fri, Feb 16, 2024 at 12:37 AM Eli Zaretskii wrote: > > > > 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. I don't know if I have CPython, but the above does show an error message. > It may be necessary to install pyreadline (for Python 2.7) or > pyreadline3 (for Python 3). I will see if I can do that, thanks. Regardless, patches to the test suite to skip the tests which rely on those modules, if they aren't installed, will be welcome.