GNU bug report logs - #68559
[PATCH] Improve Python shell completion

Previous Next

Package: emacs;

Reported by: Liu Hui <liuhui1610 <at> gmail.com>

Date: Thu, 18 Jan 2024 04:50:01 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Liu Hui <liuhui1610 <at> gmail.com>
Cc: mattias.engdegard <at> gmail.com, kobarity <at> gmail.com, 68559 <at> debbugs.gnu.org
Subject: bug#68559: [PATCH] Improve Python shell completion
Date: Fri, 16 Feb 2024 09:41:37 +0200
> From: Liu Hui <liuhui1610 <at> gmail.com>
> Date: Fri, 16 Feb 2024 12:06:38 +0800
> Cc: Mattias Engdegård <mattias.engdegard <at> gmail.com>, 
> 	kobarity <at> gmail.com, 68559 <at> debbugs.gnu.org
> 
> On Fri, Feb 16, 2024 at 12:37 AM Eli Zaretskii <eliz <at> gnu.org> 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.




This bug report was last modified 1 year and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.