GNU bug report logs - #50669
28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error

Previous Next

Package: emacs;

Reported by: Michael-David Fiszer <sguibor <at> gmail.com>

Date: Sun, 19 Sep 2021 02:42:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 50669 <at> debbugs.gnu.org (full text, mbox):

From: Michael-David Fiszer <sguibor <at> gmail.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 50669 <at> debbugs.gnu.org
Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting
 exceeds `max-lisp-eval-depth`" error
Date: Wed, 22 Sep 2021 00:17:27 +0300
[Message part 1 (text/plain, inline)]
Hi!

- I'm pretty sure I'm on the master branch. I don't clone from git, but I
compared my version of python.el with this
https://github.com/emacs-mirror/emacs/commit/6cfc312d7196d7c7c70e7030b344891ecea8c4f1#diff-f808b0589744f83f41d9f581e8b07001145598d2a2aa07fd40c1d20ee35df762
and it looks up to date.

- Regarding the recursive calls, I tried to look into it, and what I found
was very confusing.
  - The tests I sent on number of characters, I believe establish that the
issue only arises when the string is long enough for
python-shell-send-string to save to a file and call python-shell-send file.
  - The backtrace - I sent to you. I suppose it's hard to decipher.
  - I then tried setting a breakpoint in 'python-shell-send-string. If I
step through commands there, I see myself looping through this function
again and again (creating more and more files, which is eventually what
leads to the error). Buf *if* I step into 'python-shell-send-file when
going through the difference expressions of 'python-shell-send-string, I
get into the function (which indeed calls 'comint-send-string, not
'python-shell-send-string... and at this point, instead of returning to the
*beginning* of python-shell-send string, I end up exiting
python-shell-send-string and everything works.
      - In other words, the problem does not arise in edebug mode *if* I
step into python-shell-send-file when python-shell-send-string calls it.

This is very weird, sounds like perhaps some async issue... Very odd.

On Sun, Sep 19, 2021 at 7:13 PM Augusto Stoffel <arstoffel <at> gmail.com> wrote:

> Hi David,
>
> So, I think the main thing is to figure out which functions are calling
> themselves recursively.  'python-shell-send-file' doesn't call
> 'python-shell-send-string' anymore, so that can't be it (are you sure
> you are using today's master branch?).
>
> Another crazy attempt would be this:
>
>      (let ((process-connection-type nil)
>            (python-shell-completion-native-enable nil))
>        (run-python))
>
> Nevermind the initial warnings, does it work for you afterwards?
>
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 333 days ago.

Previous Next


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