From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 18 22:41:56 2021 Received: (at submit) by debbugs.gnu.org; 19 Sep 2021 02:41:56 +0000 Received: from localhost ([127.0.0.1]:37239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRmmC-0005D7-1h for submit@debbugs.gnu.org; Sat, 18 Sep 2021 22:41:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:54484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRklE-0002ET-SK for submit@debbugs.gnu.org; Sat, 18 Sep 2021 20:32:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRklE-0001ye-Jl for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2021 20:32:48 -0400 Received: from mail-vs1-xe30.google.com ([2607:f8b0:4864:20::e30]:44574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRklB-0006q9-5p for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2021 20:32:47 -0400 Received: by mail-vs1-xe30.google.com with SMTP id c28so13062763vsh.11 for ; Sat, 18 Sep 2021 17:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=xxtcpmCFyjWUu9CyIvxn1vggsiHvTaxSdjXgWJkrl+k=; b=nbvKRgLGFWW89/RbKdGJaM9bho3xc3VW+di1xM6zB2goOBo0ruNGovdSrIxXL4PtXe ypPnsOthKPN3reg5kjPPRCJDHjHyGrZi07radsl+5R3HsePJe2bcLUjt/yIX8BPcT3/1 8uHfEoa63vbSURJBAT30AKlmg9aJs3f4tsj8FANClx9yohenbMQHv8QXf/v9j2KJbRex UK7jbXLZ399JHhoSbhGx529s48ELzX5L+3cjFx2w5dKfiA8vt/ueQvRZwnnuf0bN9A9p HfDm7JxLPNGSpBY2HlEFlUMiH/VcmqzvaV9Bg2Xf7qCK92ST/q33NfmVViK4QwTnWVL6 pVJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xxtcpmCFyjWUu9CyIvxn1vggsiHvTaxSdjXgWJkrl+k=; b=CQ7uizxKaWc4GuIFS0eWKI/4fxi7oGYRC6va9/xAH3bdUCJ7HObUewP8Mhp86uyHey xIkwdzvIDJwBXEyw4bCjjNtjLTZb7Z/iVuBBUSARwai80gQsPrBaRV4bRwfdNXgXk4u6 KNLs4VLXYdby/S/y/O3u7L8e39b/RKMvx4OVocxyb7InIfrGlH4dsFzcLJEKiZFI4fSA KV8/3yheNFJE5R2ZXFksTEJX2/z+dQD/mHkyW0diqJzHKby03NcOS/dEsBkg8WDiyiVC UYHROodi0WXhn4EGwIqoC9qJUPzRJyznG7l8/g8GF/w+1O98+UjWKUBEw6o6gHl6mbNZ Cs/Q== X-Gm-Message-State: AOAM530mEEnOCN/AnlbjerTb4qCWr5EzzLnBR5qOMoMmXYcWNx/Q0Zer kMsvk2iVbtUf4BoHQsw0gqxK8uhOUkn30r4Jjf0G1aogL9Y= X-Google-Smtp-Source: ABdhPJwbYSqhorSin3dv47nqR7+9yAq1TY66D64kbLOHswrfGA2rfVexleQEGM5azrSU6xX9ZljvvlT5lSqHPJWBW/s= X-Received: by 2002:a67:32c2:: with SMTP id y185mr1565529vsy.21.1632011561930; Sat, 18 Sep 2021 17:32:41 -0700 (PDT) MIME-Version: 1.0 From: Michael-David Fiszer Date: Sun, 19 Sep 2021 03:32:30 +0300 Message-ID: Subject: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="0000000000006b175305cc4e4dd8" Received-SPF: pass client-ip=2607:f8b0:4864:20::e30; envelope-from=sguibor@gmail.com; helo=mail-vs1-xe30.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 18 Sep 2021 22:41:54 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --0000000000006b175305cc4e4dd8 Content-Type: text/plain; charset="UTF-8" Hi, I'm not an expert in how python.el internals work, but I started getting this error every time I would send a statement to the shell. In addition I would get these weird printouts of blocks of the form ``` def __PYDOC_get_help(obj): try: import inspect try: str_type = basestring argspec_function = inspect.getargspec except NameError: str_type = str ``` while just moving the point in my .py file. My current workaround was to simply override python-shell-send-string from 28.0.50 with the one I had with my emacs 27 version, which was: ``` (defun python-shell-send-string (string &optional process msg) "Send STRING to inferior Python PROCESS. When optional argument MSG is non-nil, forces display of a user-friendly message if there's no process running; defaults to t when called interactively." (interactive (list (read-string "Python command: ") nil t)) (let ((process (or process (python-shell-get-process-or-error msg)))) (if (string-match ".\n+." string) ;Multiline. (let* ((temp-file-name (python-shell--save-temp-file string)) (file-name (or (buffer-file-name) temp-file-name))) (python-shell-send-file file-name process temp-file-name t)) (when (or (not (string-match "\n\\'" string)) (string-match "\n[ \t].*\n?\\'" string)) (comint-send-string process "\n"))))) ``` And this seems to solve the problem... In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6 (Build 20G165)) of 2021-09-17 built on mdfz-macbookpro4.roam.corp.google.com Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.6 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2 --with-gnutls --without-dbus --with-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained' Configured features: ACL GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: mu4e-headers Memory information: ((conses 16 1905022 1639005) (symbols 48 123242 97) (strings 32 433582 151543) (string-bytes 1 14825386) (vectors 16 192606) (vector-slots 8 3165377 831342) (floats 8 1100 6586) (intervals 56 34684 19693) (buffers 992 60)) --0000000000006b175305cc4e4dd8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I'm not an expert in how python.el internal= s work, but I started getting this error every time I would send a statemen= t to the shell. In addition I would get these weird printouts of blocks of = the form

```
=C2=A0 def __PYDOC_get_help(obj):
=C2=A0 =C2=A0 t= ry:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 import inspect
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 try:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 str_type =3D bases= tring
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 argspec_function =3D ins= pect.getargspec
=C2=A0 =C2=A0 =C2=A0 =C2=A0 except NameError:
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 str_type =3D str
```

while just moving the point in my .py file.

My = current workaround was to simply override python-shell-send-string from 28.= 0.50 with the one I had with my emacs 27 version, which was:

=
```
(defun python-shell-send-string (string &optio= nal process msg)
=C2=A0 "Send STRING to inferior Python PROCESS.When optional argument MSG is non-nil, forces display of a
user-friendl= y message if there's no process running; defaults to
t when called i= nteractively."
=C2=A0 (interactive
=C2=A0 =C2=A0(list (read-stri= ng "Python command: ") nil t))
=C2=A0 (let ((process (or proce= ss (python-shell-get-process-or-error msg))))
=C2=A0 =C2=A0 (if (string-= match ".\n+." string) =C2=A0 ;Multiline.
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 (let* ((temp-file-name (python-shell--save-temp-file string))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(file-name (or (buffer-= file-name) temp-file-name)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (python-= shell-send-file file-name process temp-file-name t))
=C2=A0 =C2=A0 =C2= =A0 (when (or (not (string-match "\n\\'" string))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (string-match "\n[ \t= ].*\n?\\'" string))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (comint-send-st= ring process "\n")))))
```

And this seems to solve the = problem...


In GNU Emacs 28.0.50 (build 1, x86_= 64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6 (Build 20G165))
= =C2=A0of 2021-09-17 built on mdfz-macbookpro4.roam.corp.google.com
Windowing system di= stributor 'Apple', version 10.3.2022
System Description: =C2=A0m= acOS 11.6

Configured using:
=C2=A0'configure --disable-depend= ency-tracking --disable-silent-rules
=C2=A0--enable-locallisppath=3D/usr= /local/share/emacs/site-lisp
=C2=A0--infodir=3D/usr/local/Cellar/emacs-p= lus@28/28.0.50/share/info/emacs
=C2=A0--prefix=3D/usr/local/Cellar/emacs= -plus@28/28.0.50 --with-xml2 --with-gnutls
=C2=A0--without-dbus --with-i= magemagick --with-modules --with-rsvg --with-ns
=C2=A0--disable-ns-self-= contained'

Configured features:
ACL GLIB GMP GNUTLS IMAGEMAGI= CK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
PDUMPER PNG RSVG THR= EADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB

Important settings:
=C2=A0= value of $LC_ALL: en_US.UTF-8
=C2=A0 value of $LC_CTYPE: en_US.UTF-8=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-u= nix

Major mode: mu4e-headers

Memory information:
((conses = 16 1905022 1639005)
=C2=A0(symbols 48 123242 97)
=C2=A0(strings 32 43= 3582 151543)
=C2=A0(string-bytes 1 14825386)
=C2=A0(vectors 16 192606= )
=C2=A0(vector-slots 8 3165377 831342)
=C2=A0(floats 8 1100 6586)=C2=A0(intervals 56 34684 19693)
=C2=A0(buffers 992 60))
--0000000000006b175305cc4e4dd8-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 19 05:10:10 2021 Received: (at 50669) by debbugs.gnu.org; 19 Sep 2021 09:10:10 +0000 Received: from localhost ([127.0.0.1]:37454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRspu-0006yN-5K for submit@debbugs.gnu.org; Sun, 19 Sep 2021 05:10:10 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:33484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRsps-0006y5-Ha for 50669@debbugs.gnu.org; Sun, 19 Sep 2021 05:10:08 -0400 Received: by mail-ed1-f49.google.com with SMTP id c21so47911239edj.0 for <50669@debbugs.gnu.org>; Sun, 19 Sep 2021 02:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=HRc96u0ZQRRCofg4BiWlS2LxdB/KSTDiAcjnCq/Ksh0=; b=k1mtSqL8+zOcUFRoehybvBExYFo3/N0N2H4aDOvD8upgh4Z67o6u22vf8XG0ln0z6T vCtwDXt0UFlZrAU+Ce3RSXnoLwwIDDbf3dfGcPdQr15yiQ2Jrw3qwLDw9fclYUl67jVv Qsu/03wlXgz21geSaX4kWTbNc6NFPZFQJWz5wE+kLYwlnSHRP+UgCVSV4u2TrRgg1+qg Cm1sKKCQdqOe9gVn7pXsoLpSmthL57b3ZhGdKhKMMozKvM8IJUXgW+mk1KLKEyKyNZ6n CLMmS/zufabHydTwISWJLiP3GRBKCa+RAj1uI3Y/qiGAUxcbxjp83VwDtRvdw8ioxjW4 HShQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=HRc96u0ZQRRCofg4BiWlS2LxdB/KSTDiAcjnCq/Ksh0=; b=shmi0iM7CXC7jmimnuO4We++7//wryuVlKf0vvdwHoF5kcKHMf3xRvKw5GQTC8YCV3 WqIWzJespUpIHrYii/LCzhL6MdMESLba/bT3n/lzSKGcqkFOElkX4htKd38v/GB4pWB+ MpowdMVhTgrIqJEKlPSil2aVbs1GsJaI9wygHj0lXu5+8JIhKZSa7C9qcEHPJ5M2OqEv CjryAjTGVROHFS6o1hJQzyRjmLPKr3aOk71he3nIPR4WDOIzeUFidEqY5srl5V6WXqDQ icLUwCWOI/j5V1rAndIarHn6k55tToKg5ZfZ3cbkwfQq9VFPvqffHaWsXTFGLS/q56r8 aZzQ== X-Gm-Message-State: AOAM533qv+HdjkMy97M2Zx9NfzpTFqjpqhcH6X+thNRH4BIQsPJWaWMD hlRfR9HyPc/klfkj+eZQbUXVSSZ3Qsg= X-Google-Smtp-Source: ABdhPJwWVdv48IVLa7ic/lYtxxwjaffC7F0XZMxX0UpiGIf47JhHWYoXEukaGynqw/HdLryCoJXzlg== X-Received: by 2002:a17:906:5f96:: with SMTP id a22mr9721793eju.58.1632042602422; Sun, 19 Sep 2021 02:10:02 -0700 (PDT) Received: from ars3 ([2a02:8109:8ac0:56d0::2f72]) by smtp.gmail.com with ESMTPSA id by26sm5301333edb.69.2021.09.19.02.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 02:10:02 -0700 (PDT) From: Augusto Stoffel To: Michael-David Fiszer Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error References: Date: Sun, 19 Sep 2021 11:10:00 +0200 In-Reply-To: (Michael-David Fiszer's message of "Sun, 19 Sep 2021 03:32:30 +0300") Message-ID: <87zgs9gcd3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50669 Cc: 50669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sun, 19 Sep 2021 at 03:32, Michael-David Fiszer wrote: > Hi, Hi, Can you try 'M-x toggle-debug-on-error', or maybe tracing some functions, to discover what is being called repeatedly? Also, what happens if you (setq python-eldoc-get-doc nil) in the .py file's buffer? Some more macos-related things that would be helpful to know: * On a freshly started python-shell, is are the functions __PYTHON_EL_eval and __PYTHON_EL_eval_file defined? * If you do M-x python-shell-send-string RET x="aaa...aaa" or something like that, can you evaluate Python statements that are, say, 900 and 1100 characters long? > > I'm not an expert in how python.el internals work, but I started getting this error every time I would > send a statement to the shell. In addition I would get these weird printouts of blocks of the form > > ``` > def __PYDOC_get_help(obj): > try: > import inspect > try: > str_type = basestring > argspec_function = inspect.getargspec > except NameError: > str_type = str > ``` > > while just moving the point in my .py file. > > My current workaround was to simply override python-shell-send-string from 28.0.50 with the one > I had with my emacs 27 version, which was: > > ``` > (defun python-shell-send-string (string &optional process msg) > "Send STRING to inferior Python PROCESS. > When optional argument MSG is non-nil, forces display of a > user-friendly message if there's no process running; defaults to > t when called interactively." > (interactive > (list (read-string "Python command: ") nil t)) > (let ((process (or process (python-shell-get-process-or-error msg)))) > (if (string-match ".\n+." string) ;Multiline. > (let* ((temp-file-name (python-shell--save-temp-file string)) > (file-name (or (buffer-file-name) temp-file-name))) > (python-shell-send-file file-name process temp-file-name t)) > (when (or (not (string-match "\n\\'" string)) > (string-match "\n[ \t].*\n?\\'" string)) > (comint-send-string process "\n"))))) > ``` > > And this seems to solve the problem... > > In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6 > (Build 20G165)) > of 2021-09-17 built on mdfz-macbookpro4.roam.corp.google.com > Windowing system distributor 'Apple', version 10.3.2022 > System Description: macOS 11.6 > > Configured using: > 'configure --disable-dependency-tracking --disable-silent-rules > --enable-locallisppath=/usr/local/share/emacs/site-lisp > --infodir=/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/emacs > --prefix=/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2 --with-gnutls > --without-dbus --with-imagemagick --with-modules --with-rsvg --with-ns > --disable-ns-self-contained' > > Configured features: > ACL GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE > NS > PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB > > Important settings: > value of $LC_ALL: en_US.UTF-8 > value of $LC_CTYPE: en_US.UTF-8 > value of $LANG: en_US.UTF-8 > locale-coding-system: utf-8-unix > > Major mode: mu4e-headers > > Memory information: > ((conses 16 1905022 1639005) > (symbols 48 123242 97) > (strings 32 433582 151543) > (string-bytes 1 14825386) > (vectors 16 192606) > (vector-slots 8 3165377 831342) > (floats 8 1100 6586) > (intervals 56 34684 19693) > (buffers 992 60)) From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 19 05:28:24 2021 Received: (at 50669) by debbugs.gnu.org; 19 Sep 2021 09:28:24 +0000 Received: from localhost ([127.0.0.1]:37472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRt7X-0007RB-Vq for submit@debbugs.gnu.org; Sun, 19 Sep 2021 05:28:24 -0400 Received: from mail-vs1-f52.google.com ([209.85.217.52]:44012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRt7W-0007Qy-FY for 50669@debbugs.gnu.org; Sun, 19 Sep 2021 05:28:23 -0400 Received: by mail-vs1-f52.google.com with SMTP id n17so13022829vsr.10 for <50669@debbugs.gnu.org>; Sun, 19 Sep 2021 02:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F8n/BYZmUfNcQPLwsttELMzGgG2krdw0gaoTWK9EYJs=; b=fHUjkfsquqJHqOZ4WlTHtb2DPiecyJJGmo29mr1ZOiCS6J2OPOXoBCvbSk2QupbmhM HJovN1oBkmhJDxQfpx96ezVl3KcOMkaGTZ9I7xWiv8D0wsaJ7TLWWqbrlcPg8LdOa2Wj birVouwwQfLv2mL6LYYKF0U4KYbj9xpHytW8TKRnVYxTNsK/1nVhxsGgHyagvzWcQ9l3 KBJRKeK7mvHW2X+XJi3BeFgV6tPsO+wOYzRmzcxbKSm8SGfdL8gz9+0bojiAHjAB+Jyk sNaz/hQJxQNFmlCBQ7MCGX2BcmYhlc+xehkZXILN2uCfx/sdkFHs6dB5iZ34LKWuSwY0 tk9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F8n/BYZmUfNcQPLwsttELMzGgG2krdw0gaoTWK9EYJs=; b=lpj5JgccmdGAcoQyNOmAWy1MSpGmEqNxbBkbdI9aASWlY5yk9dvoCc1uASQYY8R9SB btwXI0TDs2cneFp5BBiYJjXwBOvx9RlsXXA+0XGibFI+tah/hJw+9HSIGwlgqfNyl42Y 4OkYpiR2SKVAUdybAjzFR2yWNlsfEJpE8Pdae9WPjiB5idFfOqSwMEDP+6GeufJyS5uR bWrzMhfHEy4oSfP/sPr2s+TN/0iI4rTWWrY/6qeGnPYIr8yovpxEvLp40X4FL51X8JGx 8Zv38ME5I7Sh0WHu+EmsiKXa7J5rrPLETrcuV1NXUTjkIP37jqHCjvd7b4SNdxkcJ6Ct 5Yyw== X-Gm-Message-State: AOAM5305VNRWRYOlZgpyT7sAJ+HEM3YdmF9Dw2Q7+ci7pwU0d9Sl3F4c 4noR7fVlNCEBprGwzKJfQm0gr0Yowvl/GJU5hpI= X-Google-Smtp-Source: ABdhPJwpotb4MGZyn1uRf3P7NMZXetPFeT+l0WmkRPXOaCQihJ3gmfasnQjMnclABm86G61zMz9C+1GNlrf6Uq4TBM4= X-Received: by 2002:a67:441:: with SMTP id 62mr13538278vse.54.1632043696777; Sun, 19 Sep 2021 02:28:16 -0700 (PDT) MIME-Version: 1.0 References: <87zgs9gcd3.fsf@gmail.com> In-Reply-To: <87zgs9gcd3.fsf@gmail.com> From: Michael-David Fiszer Date: Sun, 19 Sep 2021 12:28:04 +0300 Message-ID: Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error To: Augusto Stoffel Content-Type: multipart/alternative; boundary="000000000000cdf07505cc55c840" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50669 Cc: 50669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000cdf07505cc55c840 Content-Type: text/plain; charset="UTF-8" Hi! Thanks for the response! I'll fill in the details shortly. I wanted to add to the bug, that the functions being called repeatedly were `python-shell-send-string` and `python-shell-send-file`. They call one another and create more and more temporary files before I get the recursion error. As a side note, python.el really rocks. Thanks so much for the amazing work. On Sun, Sep 19, 2021 at 12:10 PM Augusto Stoffel wrote: > On Sun, 19 Sep 2021 at 03:32, Michael-David Fiszer > wrote: > > > Hi, > > Hi, > > Can you try 'M-x toggle-debug-on-error', or maybe tracing some > functions, to discover what is being called repeatedly? > > Also, what happens if you (setq python-eldoc-get-doc nil) in the .py > file's buffer? > I'll try this asap. I thought it was eldoc, but then tried turning off 'eldoc-mode' off and I still had the same problem with the infinite recursion (and I think I still saw the weird PYDOC strings, but not sure). But I will try this today. > > Some more macos-related things that would be helpful to know: > > * On a freshly started python-shell, is are the functions > __PYTHON_EL_eval and __PYTHON_EL_eval_file defined? > I just checked, and they both are. > > * If you do M-x python-shell-send-string RET x="aaa...aaa" or something > like that, can you evaluate Python statements that are, say, 900 and > 1100 characters long? Will try this immediately > > > > > > I'm not an expert in how python.el internals work, but I started getting > this error every time I would > > send a statement to the shell. In addition I would get these weird > printouts of blocks of the form > > > > ``` > > def __PYDOC_get_help(obj): > > try: > > import inspect > > try: > > str_type = basestring > > argspec_function = inspect.getargspec > > except NameError: > > str_type = str > > ``` > > > > while just moving the point in my .py file. > > > > My current workaround was to simply override python-shell-send-string > from 28.0.50 with the one > > I had with my emacs 27 version, which was: > > > > ``` > > (defun python-shell-send-string (string &optional process msg) > > "Send STRING to inferior Python PROCESS. > > When optional argument MSG is non-nil, forces display of a > > user-friendly message if there's no process running; defaults to > > t when called interactively." > > (interactive > > (list (read-string "Python command: ") nil t)) > > (let ((process (or process (python-shell-get-process-or-error msg)))) > > (if (string-match ".\n+." string) ;Multiline. > > (let* ((temp-file-name (python-shell--save-temp-file string)) > > (file-name (or (buffer-file-name) temp-file-name))) > > (python-shell-send-file file-name process temp-file-name t)) > > (when (or (not (string-match "\n\\'" string)) > > (string-match "\n[ \t].*\n?\\'" string)) > > (comint-send-string process "\n"))))) > > ``` > > > > And this seems to solve the problem... > > > > In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.6.0, NS > appkit-2022.60 Version 11.6 > > (Build 20G165)) > > of 2021-09-17 built on mdfz-macbookpro4.roam.corp.google.com > > Windowing system distributor 'Apple', version 10.3.2022 > > System Description: macOS 11.6 > > > > Configured using: > > 'configure --disable-dependency-tracking --disable-silent-rules > > --enable-locallisppath=/usr/local/share/emacs/site-lisp > > --infodir=/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/emacs > > --prefix=/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2 > --with-gnutls > > --without-dbus --with-imagemagick --with-modules --with-rsvg --with-ns > > --disable-ns-self-contained' > > > > Configured features: > > ACL GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY > KQUEUE > > NS > > PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB > > > > Important settings: > > value of $LC_ALL: en_US.UTF-8 > > value of $LC_CTYPE: en_US.UTF-8 > > value of $LANG: en_US.UTF-8 > > locale-coding-system: utf-8-unix > > > > Major mode: mu4e-headers > > > > Memory information: > > ((conses 16 1905022 1639005) > > (symbols 48 123242 97) > > (strings 32 433582 151543) > > (string-bytes 1 14825386) > > (vectors 16 192606) > > (vector-slots 8 3165377 831342) > > (floats 8 1100 6586) > > (intervals 56 34684 19693) > > (buffers 992 60)) > --000000000000cdf07505cc55c840 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

Thanks for the res= ponse!

I'll fill in the details shortly. I wan= ted to add to the bug, that the functions being called repeatedly were `pyt= hon-shell-send-string` and `python-shell-send-file`.

They call one another and create more and more temporary files before I = get the recursion error.

As a side note, python.el= really rocks. Thanks so much for the amazing work.

On Sun, Sep 19, 20= 21 at 12:10 PM Augusto Stoffel <a= rstoffel@gmail.com> wrote:
On Sun, 19 Sep 2021 at 03:32, Michael-David Fiszer <sguibor@gmail.com&= gt; wrote:

> Hi,

Hi,

Can you try 'M-x toggle-debug-on-error', or maybe tracing some
functions, to discover what is being called repeatedly?

Also, what happens if you (setq python-eldoc-get-doc nil) in the .py
file's buffer?

I'll try this as= ap. I thought it was eldoc, but then tried turning off 'eldoc-mode'= off and I still had the same problem with the infinite recursion (and I th= ink I still saw the weird=C2=A0PYDOC strings, but not sure).

=
But I will try this today.
=C2=A0

Some more macos-related things that would be helpful to know:

* On a freshly started python-shell, is are the functions
=C2=A0 __PYTHON_EL_eval and __PYTHON_EL_eval_file defined?
=

I just checked, and they both are.

=
<function __main__.__PYTHON_EL_eval(source, filename)>
=
<function __main__.__PYTHON_EL_eval_file(filename, tempname, delete= )>

* If you do M-x python-shell-send-string RET x=3D"aaa...aaa" or s= omething
=C2=A0 like that, can you evaluate Python statements that are, say, 900 and=
=C2=A0 1100 characters long?

Will try this = immediately=C2=A0
= =C2=A0


>
> I'm not an expert in how python.el internals work, but I started g= etting this error every time I would
> send a statement to the shell. In addition I would get these weird pri= ntouts of blocks of the form
>
> ```
>=C2=A0 =C2=A0def __PYDOC_get_help(obj):
>=C2=A0 =C2=A0 =C2=A0try:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0import inspect
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0try:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0str_type =3D basestring=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0argspec_function =3D in= spect.getargspec
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0except NameError:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0str_type =3D str
> ```
>
> while just moving the point in my .py file.
>
> My current workaround was to simply override python-shell-send-string = from 28.0.50 with the one
> I had with my emacs 27 version, which was:
>
> ```
> (defun python-shell-send-string (string &optional process msg)
>=C2=A0 =C2=A0"Send STRING to inferior Python PROCESS.
> When optional argument MSG is non-nil, forces display of a
> user-friendly message if there's no process running; defaults to > t when called interactively."
>=C2=A0 =C2=A0(interactive
>=C2=A0 =C2=A0 (list (read-string "Python command: ") nil t))<= br> >=C2=A0 =C2=A0(let ((process (or process (python-shell-get-process-or-er= ror msg))))
>=C2=A0 =C2=A0 =C2=A0(if (string-match ".\n+." string)=C2=A0 = =C2=A0;Multiline.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((temp-file-name (python-shell-= -save-temp-file string))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-name (or = (buffer-file-name) temp-file-name)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(python-shell-send-file file-n= ame process temp-file-name t))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(when (or (not (string-match "\n\\'= " string))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(string-m= atch "\n[ \t].*\n?\\'" string))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(comint-send-string process "\n&= quot;)))))
> ```
>
> And this seems to solve the problem...
>
> In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.6.0, NS appkit-20= 22.60 Version 11.6
> (Build 20G165))
>=C2=A0 of 2021-09-17 built on mdfz-macbookpro4.roam.= corp.google.com
> Windowing system distributor 'Apple', version 10.3.2022
> System Description:=C2=A0 macOS 11.6
>
> Configured using:
>=C2=A0 'configure --disable-dependency-tracking --disable-silent-ru= les
>=C2=A0 --enable-locallisppath=3D/usr/local/share/emacs/site-lisp
>=C2=A0 --infodir=3D/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/e= macs
>=C2=A0 --prefix=3D/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2 -= -with-gnutls
>=C2=A0 --without-dbus --with-imagemagick --with-modules --with-rsvg --w= ith-ns
>=C2=A0 --disable-ns-self-contained'
>
> Configured features:
> ACL GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY= KQUEUE
> NS
> PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB
>
> Important settings:
>=C2=A0 =C2=A0value of $LC_ALL: en_US.UTF-8
>=C2=A0 =C2=A0value of $LC_CTYPE: en_US.UTF-8
>=C2=A0 =C2=A0value of $LANG: en_US.UTF-8
>=C2=A0 =C2=A0locale-coding-system: utf-8-unix
>
> Major mode: mu4e-headers
>
> Memory information:
> ((conses 16 1905022 1639005)
>=C2=A0 (symbols 48 123242 97)
>=C2=A0 (strings 32 433582 151543)
>=C2=A0 (string-bytes 1 14825386)
>=C2=A0 (vectors 16 192606)
>=C2=A0 (vector-slots 8 3165377 831342)
>=C2=A0 (floats 8 1100 6586)
>=C2=A0 (intervals 56 34684 19693)
>=C2=A0 (buffers 992 60))
--000000000000cdf07505cc55c840-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 19 05:43:08 2021 Received: (at 50669) by debbugs.gnu.org; 19 Sep 2021 09:43:08 +0000 Received: from localhost ([127.0.0.1]:37477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRtLo-0007oG-Lw for submit@debbugs.gnu.org; Sun, 19 Sep 2021 05:43:08 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:47091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRtLj-0007ni-OD for 50669@debbugs.gnu.org; Sun, 19 Sep 2021 05:43:06 -0400 Received: by mail-ed1-f43.google.com with SMTP id j13so48458558edv.13 for <50669@debbugs.gnu.org>; Sun, 19 Sep 2021 02:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=CVF7TezS2izK48ftxSuwNUla6mm0mpJJPYdDD6iJ3PA=; b=T8Ic+q68/OgLdo94/BebPqGurYxYTpnTV5qvP6NZV2qTSQnalCyQAJIB+so6zyPd9F wkXkAk+M7k8DtOgWuOEwj0OBhY/sY+5AySIBrJpeUP3ZDgpzvyiG6ZB9gH2eEnzHTn4x 2U6hv+GFMZ3GmmxiHXvns6anorganECYR6ap/lThQkUOj1ral/E8fPhorH75sWM6RMPP 1VmGs7fkbuAULcpn6SjFzBuMIQYfpDldkJHqGYv+MQryy1pQtXKFm+qJNXaJu7KK4F9b tWQOYQ/0r3VQIQ95rdOlFd8f5uvr1STziaGxJi7uXCFfEfRu43Rt4zuhd6XasuaO1QXy mF4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=CVF7TezS2izK48ftxSuwNUla6mm0mpJJPYdDD6iJ3PA=; b=hXletYU9KJp54tVBZ4R2b7yUhD7HeU232a2FYPvEvX4PrcCrbct3oJzS9VsX9KQEjY xwa/40096Gj7AUXJlvovgq+0SKv8/c/s77wuqHoUxb81FrJxOlcLBXtIORT3P5oJnwYE 38ku8Jx12AHAkS6zH51wX3VKbYIYBJW4Yf7DfXS+BO03f8yDwIkdpw3Ts+tTWeRYPTqT H7oENWB2sscn7AQNmDwc1Rcy2iGDPLbDe1vNwsnhMFMGQN6Qtuafm0ZsH2lo6fAdVE6W rDanDTtepdR2CnoeYRdiHH5pj6ieFr3nYeIz/cGkJJilSXktq2ifOfvY+OOcDK5LCf4L Q3iw== X-Gm-Message-State: AOAM530nSgl+xLV/1HZqBgvIjqpxvHwiPwMdwQbS7seCzDKhe0MRPnGP L8sUW5b17VemgM/sbpjUcEQBwZJFWgA= X-Google-Smtp-Source: ABdhPJx0A27rv+fWSKtYUXoEHJ5pa6nsUBsMUNRdxccAxEJboiCm5YMgAud8FsEQmwPDh94Zrg1lmg== X-Received: by 2002:a17:906:d787:: with SMTP id pj7mr17844039ejb.197.1632044577553; Sun, 19 Sep 2021 02:42:57 -0700 (PDT) Received: from ars3 ([2a02:8109:8ac0:56d0::2f72]) by smtp.gmail.com with ESMTPSA id p24sm527177edq.27.2021.09.19.02.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 02:42:57 -0700 (PDT) From: Augusto Stoffel To: Michael-David Fiszer Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error References: <87zgs9gcd3.fsf@gmail.com> Date: Sun, 19 Sep 2021 11:42:56 +0200 In-Reply-To: (Michael-David Fiszer's message of "Sun, 19 Sep 2021 12:28:04 +0300") Message-ID: <87v92whpen.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50669 Cc: 50669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sun, 19 Sep 2021 at 12:28, Michael-David Fiszer wrote: > Hi! > > Thanks for the response! > > I'll fill in the details shortly. I wanted to add to the bug, that the functions being called repeatedly > were `python-shell-send-string` and `python-shell-send-file`. > > They call one another and create more and more temporary files before I get the recursion error. > Are you on the current master? These two functions used to be entangled, but now only -send-string calls -send-file. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 19 05:52:47 2021 Received: (at 50669) by debbugs.gnu.org; 19 Sep 2021 09:52:47 +0000 Received: from localhost ([127.0.0.1]:37482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRtV8-00084y-JU for submit@debbugs.gnu.org; Sun, 19 Sep 2021 05:52:47 -0400 Received: from mail-vk1-f174.google.com ([209.85.221.174]:39898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRtV5-00084h-Jx for 50669@debbugs.gnu.org; Sun, 19 Sep 2021 05:52:45 -0400 Received: by mail-vk1-f174.google.com with SMTP id f73so3616265vkf.6 for <50669@debbugs.gnu.org>; Sun, 19 Sep 2021 02:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TgAfmfEJd5hhg2WtLsfRMl3rL2XuadCvEJVl/7Z5WXs=; b=MbGYHWVGsbJ3ef1gSST3TlFFBySMYmixY+VJAsiQvgsFcyWr9Q15dAkJQ/QpxaplMQ y/Vz8h9Zy/iLeYa+LVB65TI5v7mc8S/5wVsAQeXRggP1WL3pLeK5zvtD/3knPRoQuO1V TxA7XFC/fhP2+zj4PSEuqAUhfZIqEGOaAprarRDR5cVhF1u6H6QsRhmv52i/bHQileVK eWsfnU7ct+KpcJRBHzowmnoEhNqI92JjENz9bJMlBv7W4U9DM8LykqyLGclPVnLhHMFZ PksJybA1CYKpMnXnkrkhWqAqcUKm7q7I/DOTSkWTocMseNC33tbxyU3L2U/+/DpYqa2e WBTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TgAfmfEJd5hhg2WtLsfRMl3rL2XuadCvEJVl/7Z5WXs=; b=nzHpWBV56xClTuZkkfDTI/34cu6GIVWHhgVczWVcstaJLVQKpe+Z8F8HqmOR7rsMS5 wEdS/JZ8LsV9CZjiFKP1F9KzaY52vJOW+1t2nBDAKlqbkG9nkruCoiOLSlXfr23KepZI AIrOfJ9dQ0x/6h9HWZCqDZbN/nE3T5CWogKJA3K4Iv1ctvJyf9b5x/BeTYQKVxGCVzz5 3hJJk2tgdVDy0BJCsxOMl6hqVTS/97ZxijKveJRttLxqEv999eq0lYOkCrW3mIP5eV36 4W5bdLtMlevB0DiLh1WRqmo2zfkgYSKqtd0k3RjEESo3mdTuugPDkM8p8BXFsvUUB19t TPxg== X-Gm-Message-State: AOAM530Lvr8vN84nVWx9XzRQ+tOPJOZYWOD0lgPE2YxRhjNWuEBJzZBC LHmwGRsA36K/f8/dPRUgqCpg8sz2w6npTWCEl8VV0xDT5QQ= X-Google-Smtp-Source: ABdhPJzi9nJe+xnm+yAwJatWXxszuPI2j58thiMPOCVQ1bb5G5naAumN7cOR2q+Se3CIE+/bwr//p3a0r4IMZRVc7M4= X-Received: by 2002:a1f:d943:: with SMTP id q64mr12424045vkg.23.1632045157600; Sun, 19 Sep 2021 02:52:37 -0700 (PDT) MIME-Version: 1.0 References: <87zgs9gcd3.fsf@gmail.com> <87v92whpen.fsf@gmail.com> In-Reply-To: <87v92whpen.fsf@gmail.com> From: Michael-David Fiszer Date: Sun, 19 Sep 2021 12:52:26 +0300 Message-ID: Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error To: Augusto Stoffel Content-Type: multipart/alternative; boundary="000000000000e0514605cc561f80" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50669 Cc: 50669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000e0514605cc561f80 Content-Type: text/plain; charset="UTF-8" You are right. They are not calling one another (python-shell-send-file calls comint). I think that it may that something is making them be called one after another (my bad). Backtrace looks like this (I changed the file name to `a_file_name` since it's a company path) string-match-p("magit-.*: .*" "rider_now_utils.py") (not (string-match-p useless-regexp buf-name)) (setq --cl-flag-- (not (string-match-p useless-regexp buf-name))) (progn (setq useless-regexp (car --cl-var--)) (setq --cl-flag-- (not (string-match-p useless-regexp buf-name)))) (and (consp --cl-var--) (progn (setq useless-regexp (car --cl-var--)) (setq --cl-flag-- (not (string-match-p useless-regexp buf-name))))) (while (and (consp --cl-var--) (progn (setq useless-regexp (car --cl-var--)) (setq --cl-flag-- (not (string-match-p useless-regexp buf-name))))) (setq --cl-var-- (cdr --cl-var--))) (let* ((--cl-var-- spacemacs-useless-buffers-regexp) (useless-regexp nil) (--cl-flag-- t)) (while (and (consp --cl-var--) (progn (setq useless-regexp (car --cl-var--)) (setq --cl-flag-- (not (string-match-p useless-regexp buf-name))))) (setq --cl-var-- (cdr --cl-var--))) (if --cl-flag-- (progn t) nil)) (or (provided-mode-derived-p (buffer-local-value 'major-mode buffer) 'comint-mode) (let* ((--cl-var-- spacemacs-useful-buffers-regexp) (useful-regexp nil) (--cl-flag-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq useful-regexp (car --cl-var--)) (setq --cl-flag-- (not (setq --cl-var-- ...))))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--) (let* ((--cl-var-- spacemacs-useless-buffers-regexp) (useless-regexp nil) (--cl-flag-- t)) (while (and (consp --cl-var--) (progn (setq useless-regexp (car --cl-var--)) (setq --cl-flag-- (not (string-match-p useless-regexp buf-name))))) (setq --cl-var-- (cdr --cl-var--))) (if --cl-flag-- (progn t) nil))) (let ((buf-name (buffer-name buffer))) (or (provided-mode-derived-p (buffer-local-value 'major-mode buffer) 'comint-mode) (let* ((--cl-var-- spacemacs-useful-buffers-regexp) (useful-regexp nil) (--cl-flag-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq useful-regexp (car --cl-var--)) (setq --cl-flag-- (not ...)))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--) (let* ((--cl-var-- spacemacs-useless-buffers-regexp) (useless-regexp nil) (--cl-flag-- t)) (while (and (consp --cl-var--) (progn (setq useless-regexp (car --cl-var--)) (setq --cl-flag-- (not ...)))) (setq --cl-var-- (cdr --cl-var--))) (if --cl-flag-- (progn t) nil)))) spacemacs/useful-buffer-p(#) kill-buffer(#) #f(compiled-function () #)() python-shell-send-file("a_file_name..." # "/var/folders/gx/6fqj2t4x5tn4zml2qp9__9mr00j58f/T/p..." t) #f(compiled-function (string &optional process msg) "Send STRING to inferior Python PROCESS.\nWhen optional argument MSG is non-nil, forces display of a\nuser-friendly message if there's no process running; defaults to\nt when called interactively." (interactive #f(compiled-function () #)) #)("import sys, codecs, os, ast;__pyfile = codecs.open..." #) apply(#f(compiled-function (string &optional process msg) "Send STRING to inferior Python PROCESS.\nWhen optional argument MSG is non-nil, forces display of a\nuser-friendly message if there's no process running; defaults to\nt when called interactively." (interactive #f(compiled-function () #)) #) ("import sys, codecs, os, ast;__pyfile = codecs.open..." #)) python-shell-send-string("import sys, codecs, os, ast;__pyfile = codecs.open..." #) python-shell-send-file("a_file_name..." # "/var/folders/gx/6fqj2t4x5tn4zml2qp9__9mr00j58f/T/p..." t) #f(compiled-function (string &optional process msg) "Send STRING to inferior Python PROCESS.\nWhen optional argument MSG is non-nil, forces display of a\nuser-friendly message if there's no process running; defaults to\nt when called interactively." (interactive #f(compiled-function () #)) #)("import sys, codecs, os, ast;__pyfile = codecs.open..." #) apply(#f(compiled-function (string &optional process msg) "Send STRING to inferior Python PROCESS.\nWhen optional argument MSG is non-nil, forces display of a\nuser-friendly message if there's no process running; defaults to\nt when called interactively." (interactive #f(compiled-function () #)) #) ("import sys, codecs, os, ast;__pyfile = codecs.open..." #)) python-shell-send-string("import sys, codecs, os, ast;__pyfile = codecs.open..." #) python-shell-send-file("a_file_name..." # "/var/folders/gx/6fqj2t4x5tn4zml2qp9__9mr00j58f/T/p..." t) #f(compiled-function (string &optional process msg) "Send STRING to inferior Python PROCESS.\nWhen optional argument MSG is non-nil, forces display of a\nuser-friendly message if there's no process running; defaults to\nt when called interactively." (interactive #f(compiled-function () #)) #)("import sys, codecs, os, ast;__pyfile = codecs.open..." #) apply(#f(compiled-function (string &optional process msg) "Send STRING to inferior Python PROCESS.\nWhen optional argument MSG is non-nil, forces display of a\nuser-friendly message if there's no process running; defaults to\nt when called interactively." (interactive #f(compiled-function () #)) #) ("import sys, codecs, os, ast;__pyfile = codecs.open..." #)) python-shell-send-string("import sys, codecs, os, ast;__pyfile = codecs.open..." #) python-shell-send-file("a_file_name..." # "/var/folders/gx/6fqj2t4x5tn4zml2qp9__9mr00j58f/T/p..." t) On Sun, Sep 19, 2021 at 12:42 PM Augusto Stoffel wrote: > On Sun, 19 Sep 2021 at 12:28, Michael-David Fiszer > wrote: > > > Hi! > > > > Thanks for the response! > > > > I'll fill in the details shortly. I wanted to add to the bug, that the > functions being called repeatedly > > were `python-shell-send-string` and `python-shell-send-file`. > > > > They call one another and create more and more temporary files before I > get the recursion error. > > > > Are you on the current master? These two functions used to be > entangled, but now only -send-string calls -send-file. > --000000000000e0514605cc561f80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
You are right. They are not calling one another (python-sh= ell-send-file calls comint). I think that it may that something is making t= hem be called one after another (my bad).

Bac= ktrace looks like this (I changed the file name to `a_file_name` since it&#= 39;s a company path)

=C2=A0 string-match-p("m= agit-.*: .*" "rider_now_utils.py")
=C2=A0 (not (string-ma= tch-p useless-regexp buf-name))
=C2=A0 (setq --cl-flag-- (not (string-ma= tch-p useless-regexp buf-name)))
=C2=A0 (progn (setq useless-regexp (car= --cl-var--)) (setq --cl-flag-- (not (string-match-p useless-regexp buf-nam= e))))
=C2=A0 (and (consp --cl-var--) (progn (setq useless-regexp (car --= cl-var--)) (setq --cl-flag-- (not (string-match-p useless-regexp buf-name))= )))
=C2=A0 (while (and (consp --cl-var--) (progn (setq useless-regexp (c= ar --cl-var--)) (setq --cl-flag-- (not (string-match-p useless-regexp buf-n= ame))))) (setq --cl-var-- (cdr --cl-var--)))
=C2=A0 (let* ((--cl-var-- s= pacemacs-useless-buffers-regexp) (useless-regexp nil) (--cl-flag-- t)) (whi= le (and (consp --cl-var--) (progn (setq useless-regexp (car --cl-var--)) (s= etq --cl-flag-- (not (string-match-p useless-regexp buf-name))))) (setq --c= l-var-- (cdr --cl-var--))) (if --cl-flag-- (progn t) nil))
=C2=A0 (or (p= rovided-mode-derived-p (buffer-local-value 'major-mode buffer) 'com= int-mode) (let* ((--cl-var-- spacemacs-useful-buffers-regexp) (useful-regex= p nil) (--cl-flag-- t) --cl-var--) (while (and (consp --cl-var--) (progn (s= etq useful-regexp (car --cl-var--)) (setq --cl-flag-- (not (setq --cl-var--= ...))))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--) (let* ((--cl-var-= - spacemacs-useless-buffers-regexp) (useless-regexp nil) (--cl-flag-- t)) (= while (and (consp --cl-var--) (progn (setq useless-regexp (car --cl-var--))= (setq --cl-flag-- (not (string-match-p useless-regexp buf-name))))) (setq = --cl-var-- (cdr --cl-var--))) (if --cl-flag-- (progn t) nil)))
=C2=A0 (l= et ((buf-name (buffer-name buffer))) (or (provided-mode-derived-p (buffer-l= ocal-value 'major-mode buffer) 'comint-mode) (let* ((--cl-var-- spa= cemacs-useful-buffers-regexp) (useful-regexp nil) (--cl-flag-- t) --cl-var-= -) (while (and (consp --cl-var--) (progn (setq useful-regexp (car --cl-var-= -)) (setq --cl-flag-- (not ...)))) (setq --cl-var-- (cdr --cl-var--))) --cl= -var--) (let* ((--cl-var-- spacemacs-useless-buffers-regexp) (useless-regex= p nil) (--cl-flag-- t)) (while (and (consp --cl-var--) (progn (setq useless= -regexp (car --cl-var--)) (setq --cl-flag-- (not ...)))) (setq --cl-var-- (= cdr --cl-var--))) (if --cl-flag-- (progn t) nil))))
=C2=A0 spacemacs/use= ful-buffer-p(#<buffer rider_now_utils.py>)
=C2=A0 kill-buffer(#<= ;buffer =C2=A0*temp*-957895>)
=C2=A0 #f(compiled-function () #<byt= ecode -0x1c1e1505371ddc2b>)()
=C2=A0 python-shell-send-file("a_f= ile_name..." #<process Python> "/var/folders/gx/6fqj2t4x5tn= 4zml2qp9__9mr00j58f/T/p..." t)
=C2=A0 #f(compiled-function (string = &optional process msg) "Send STRING to inferior Python PROCESS.\nW= hen optional argument MSG is non-nil, forces display of a\nuser-friendly me= ssage if there's no process running; defaults to\nt when called interac= tively." (interactive #f(compiled-function () #<bytecode 0x14ff04c7= 03dd2bc5>)) #<bytecode -0x168dce9d6e1d8f8e>)("import sys, cod= ecs, os, ast;__pyfile =3D codecs.open..." #<process Python>)
= =C2=A0 apply(#f(compiled-function (string &optional process msg) "= Send STRING to inferior Python PROCESS.\nWhen optional argument MSG is non-= nil, forces display of a\nuser-friendly message if there's no process r= unning; defaults to\nt when called interactively." (interactive #f(com= piled-function () #<bytecode 0x14ff04c703dd2bc5>)) #<bytecode -0x1= 68dce9d6e1d8f8e>) ("import sys, codecs, os, ast;__pyfile =3D codecs= .open..." #<process Python>))
=C2=A0 python-shell-send-string= ("import sys, codecs, os, ast;__pyfile =3D codecs.open..." #<p= rocess Python>)
=C2=A0 python-shell-send-file("a_file_name...&qu= ot; #<process Python> "/var/folders/gx/6fqj2t4x5tn4zml2qp9__9mr0= 0j58f/T/p..." t)
=C2=A0 #f(compiled-function (string &optional = process msg) "Send STRING to inferior Python PROCESS.\nWhen optional a= rgument MSG is non-nil, forces display of a\nuser-friendly message if there= 's no process running; defaults to\nt when called interactively." = (interactive #f(compiled-function () #<bytecode 0x14ff04c703dd2bc5>))= #<bytecode -0x168dce9d6e1d8f8e>)("import sys, codecs, os, ast;_= _pyfile =3D codecs.open..." #<process Python>)
=C2=A0 apply(#= f(compiled-function (string &optional process msg) "Send STRING to= inferior Python PROCESS.\nWhen optional argument MSG is non-nil, forces di= splay of a\nuser-friendly message if there's no process running; defaul= ts to\nt when called interactively." (interactive #f(compiled-function= () #<bytecode 0x14ff04c703dd2bc5>)) #<bytecode -0x168dce9d6e1d8f8= e>) ("import sys, codecs, os, ast;__pyfile =3D codecs.open..."= #<process Python>))
=C2=A0 python-shell-send-string("import = sys, codecs, os, ast;__pyfile =3D codecs.open..." #<process Python&= gt;)
=C2=A0 python-shell-send-file("a_file_name..." #<proce= ss Python> "/var/folders/gx/6fqj2t4x5tn4zml2qp9__9mr00j58f/T/p...&q= uot; t)
=C2=A0 #f(compiled-function (string &optional process msg) &= quot;Send STRING to inferior Python PROCESS.\nWhen optional argument MSG is= non-nil, forces display of a\nuser-friendly message if there's no proc= ess running; defaults to\nt when called interactively." (interactive #= f(compiled-function () #<bytecode 0x14ff04c703dd2bc5>)) #<bytecode= -0x168dce9d6e1d8f8e>)("import sys, codecs, os, ast;__pyfile =3D co= decs.open..." #<process Python>)
=C2=A0 apply(#f(compiled-fun= ction (string &optional process msg) "Send STRING to inferior Pyth= on PROCESS.\nWhen optional argument MSG is non-nil, forces display of a\nus= er-friendly message if there's no process running; defaults to\nt when = called interactively." (interactive #f(compiled-function () #<bytec= ode 0x14ff04c703dd2bc5>)) #<bytecode -0x168dce9d6e1d8f8e>) ("= import sys, codecs, os, ast;__pyfile =3D codecs.open..." #<process = Python>))
=C2=A0 python-shell-send-string("import sys, codecs, o= s, ast;__pyfile =3D codecs.open..." #<process Python>)
=C2=A0= python-shell-send-file("a_file_name..." #<process Python> = "/var/folders/gx/6fqj2t4x5tn4zml2qp9__9mr00j58f/T/p..." t)
=C2= =A0


On Sun, Sep 19, 2021 at 12:42 PM Augusto Stof= fel <arstoffel@gmail.com> = wrote:
On Sun, 1= 9 Sep 2021 at 12:28, Michael-David Fiszer <sguibor@gmail.com> wrote:

> Hi!
>
> Thanks for the response!
>
> I'll fill in the details shortly. I wanted to add to the bug, that= the functions being called repeatedly
> were `python-shell-send-string` and `python-shell-send-file`.
>
> They call one another and create more and more temporary files before = I get the recursion error.
>

Are you on the current master?=C2=A0 These two functions used to be
entangled, but now only -send-string calls -send-file.
--000000000000e0514605cc561f80-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 19 06:36:53 2021 Received: (at 50669) by debbugs.gnu.org; 19 Sep 2021 10:36:53 +0000 Received: from localhost ([127.0.0.1]:37526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRuBp-0000xN-7m for submit@debbugs.gnu.org; Sun, 19 Sep 2021 06:36:53 -0400 Received: from mail-ua1-f49.google.com ([209.85.222.49]:34350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRuBm-0000x6-F5 for 50669@debbugs.gnu.org; Sun, 19 Sep 2021 06:36:51 -0400 Received: by mail-ua1-f49.google.com with SMTP id v9so9154438uak.1 for <50669@debbugs.gnu.org>; Sun, 19 Sep 2021 03:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ie7u0houRSExGG/wT4Wjt5EArmLVfHi08tD89clbI1k=; b=FFUZDvDEko+tsufemB32b/lYzngfeimHl2DRd/AmB+D+9GdNNjMzTFy6sWVdBIkiyh UQBZlO+kA/aaP+6TTrYK1UDL8/9b0iVvLiuZfMkZnWzTje49+2Os6Z7leswA+tIIiKCW 83LaeF6F2at6esmopKU/B+9u8D+RT0Ful+vJodzKsxC3WXCKZa7seURpyiHKb2DJ90BI WNcUdSw8wx7+96gHGZzjle/RJIhdeP1LAFBAOdKBQuxG1+cs0IY8HQzAnryDrIOJ0iYw 1o8/ZnMS2RNFT7T23S1S+uuJ9vT1okgFu5KYSwMiejBM1V1kFhtPK7tG3vejzjQ08UCW 1hbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ie7u0houRSExGG/wT4Wjt5EArmLVfHi08tD89clbI1k=; b=36CCjNv+CHiil5R0m9Al0uTxa9GE36rjnKZUuCgcXGHT18ezm07duNscKG5C3qGAMs T3d+gfwAf+6SuT1f244TovQ5F2MViv+/yUomillXnL3vUJZgczmOtPNTHHkRIYKuNHEE F8J6Vb+yp4l2u7QCoSTXIA/wz5ar+usLN7jX0q2ZAIwEq97sIUQDcqG9qMIby0HpB3Bd mDXJANRZKNZS0+muQT8PeyqPCZlFj0v6g8mI3TECCbtzUw6FG9NNfS1Em0BVAbUxfs+T 2yDuRcVWag+ij7YAZngPlMgOijce9qtfTxTnSVOBvCKbKnA5diRx8H8f3SvAn9+/GXGi gpqA== X-Gm-Message-State: AOAM5331AbaiYD8cxBgV8j1fqDLuWcf3i+EpHsOqsTIfelUWyvgs4DFR 5o++PC+gOnQsiMQ2oGmF5tgmzatjFHicoxkelwtukMVN X-Google-Smtp-Source: ABdhPJzEVQKsGNEoz/kMuTBdi9OHpgeEI3S9BfjX3dNLLJCeqVVEfZU102U1/fTgfr/amfV7TUN8NrCZtI5OkG+/JNQ= X-Received: by 2002:a9f:309d:: with SMTP id j29mr932022uab.38.1632047804774; Sun, 19 Sep 2021 03:36:44 -0700 (PDT) MIME-Version: 1.0 References: <87zgs9gcd3.fsf@gmail.com> In-Reply-To: From: Michael-David Fiszer Date: Sun, 19 Sep 2021 13:36:33 +0300 Message-ID: Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error To: Augusto Stoffel Content-Type: multipart/alternative; boundary="000000000000a8fc0a05cc56bd4b" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50669 Cc: 50669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000a8fc0a05cc56bd4b Content-Type: text/plain; charset="UTF-8" Adding more details. BTW, no issues at all (none of the two, as it looks like there may be two different issues) if I just do: (advice-add 'python-shell-send-string :override #'python-shell-send-string27) where 'python-shell-send-string27 is the python-shell-send-string function from emacs 27.2. (regarding the backtrace, I realize it's hard to read - is there a better way to send it formatted in this thread?) On Sun, Sep 19, 2021 at 12:28 PM Michael-David Fiszer wrote: > Hi! > > Thanks for the response! > > I'll fill in the details shortly. I wanted to add to the bug, that the > functions being called repeatedly were `python-shell-send-string` and > `python-shell-send-file`. > > They call one another and create more and more temporary files before I > get the recursion error. > > As a side note, python.el really rocks. Thanks so much for the amazing > work. > > On Sun, Sep 19, 2021 at 12:10 PM Augusto Stoffel > wrote: > >> On Sun, 19 Sep 2021 at 03:32, Michael-David Fiszer >> wrote: >> >> > Hi, >> >> Hi, >> >> Can you try 'M-x toggle-debug-on-error', or maybe tracing some >> functions, to discover what is being called repeatedly? >> >> Also, what happens if you (setq python-eldoc-get-doc nil) in the .py >> file's buffer? >> > > I'll try this asap. I thought it was eldoc, but then tried turning off > 'eldoc-mode' off and I still had the same problem with the infinite > recursion (and I think I still saw the weird PYDOC strings, but not sure). > > But I will try this today. > This did not change anything to the nested lisp error, but does remove the prints of "def __PYDOC_get_help(obj)". So it looks like there may have been two different issues here. > > >> >> Some more macos-related things that would be helpful to know: >> >> * On a freshly started python-shell, is are the functions >> __PYTHON_EL_eval and __PYTHON_EL_eval_file defined? >> > > I just checked, and they both are. > > > > >> >> * If you do M-x python-shell-send-string RET x="aaa...aaa" or something >> like that, can you evaluate Python statements that are, say, 900 and >> 1100 characters long? > > > Will try this immediately > So, interesting, if I write x = "aaa....a" in my py file (calling python-shell-send-string interactively doesn't work like that, shoud it?), it works for len(x) = 422 and not for len(x)=423 (same error "nesting exceeds"). > > > >> >> > >> > I'm not an expert in how python.el internals work, but I started >> getting this error every time I would >> > send a statement to the shell. In addition I would get these weird >> printouts of blocks of the form >> > >> > ``` >> > def __PYDOC_get_help(obj): >> > try: >> > import inspect >> > try: >> > str_type = basestring >> > argspec_function = inspect.getargspec >> > except NameError: >> > str_type = str >> > ``` >> > >> > while just moving the point in my .py file. >> > >> > My current workaround was to simply override python-shell-send-string >> from 28.0.50 with the one >> > I had with my emacs 27 version, which was: >> > >> > ``` >> > (defun python-shell-send-string (string &optional process msg) >> > "Send STRING to inferior Python PROCESS. >> > When optional argument MSG is non-nil, forces display of a >> > user-friendly message if there's no process running; defaults to >> > t when called interactively." >> > (interactive >> > (list (read-string "Python command: ") nil t)) >> > (let ((process (or process (python-shell-get-process-or-error msg)))) >> > (if (string-match ".\n+." string) ;Multiline. >> > (let* ((temp-file-name (python-shell--save-temp-file string)) >> > (file-name (or (buffer-file-name) temp-file-name))) >> > (python-shell-send-file file-name process temp-file-name t)) >> > (when (or (not (string-match "\n\\'" string)) >> > (string-match "\n[ \t].*\n?\\'" string)) >> > (comint-send-string process "\n"))))) >> > ``` >> > >> > And this seems to solve the problem... >> > >> > In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.6.0, NS >> appkit-2022.60 Version 11.6 >> > (Build 20G165)) >> > of 2021-09-17 built on mdfz-macbookpro4.roam.corp.google.com >> > Windowing system distributor 'Apple', version 10.3.2022 >> > System Description: macOS 11.6 >> > >> > Configured using: >> > 'configure --disable-dependency-tracking --disable-silent-rules >> > --enable-locallisppath=/usr/local/share/emacs/site-lisp >> > --infodir=/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/emacs >> > --prefix=/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2 >> --with-gnutls >> > --without-dbus --with-imagemagick --with-modules --with-rsvg --with-ns >> > --disable-ns-self-contained' >> > >> > Configured features: >> > ACL GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY >> KQUEUE >> > NS >> > PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB >> > >> > Important settings: >> > value of $LC_ALL: en_US.UTF-8 >> > value of $LC_CTYPE: en_US.UTF-8 >> > value of $LANG: en_US.UTF-8 >> > locale-coding-system: utf-8-unix >> > >> > Major mode: mu4e-headers >> > >> > Memory information: >> > ((conses 16 1905022 1639005) >> > (symbols 48 123242 97) >> > (strings 32 433582 151543) >> > (string-bytes 1 14825386) >> > (vectors 16 192606) >> > (vector-slots 8 3165377 831342) >> > (floats 8 1100 6586) >> > (intervals 56 34684 19693) >> > (buffers 992 60)) >> > --000000000000a8fc0a05cc56bd4b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Adding more details. BTW, no issues at al= l (none of the two, as it looks like there may be two different issues) if = I just do:

(advice-add 'python-shell-send-stri= ng :override #'python-shell-send-string27)

where 'python-shell-send-string27 is the python-shell-send-string func= tion from emacs 27.2.

(regarding the backtrace, I = realize it's hard to read - is there a better way to send it formatted = in this thread?)


On Sun, Sep 19, 2021 at 12:28 PM Michael-Dav= id Fiszer <sguibo= r@gmail.com> wrote:
Hi!

Thanks = for the response!

I'll fill in the details sho= rtly. I wanted to add to the bug, that the functions being called repeatedl= y were `python-shell-send-string` and `python-shell-send-file`.
<= br>
They call one another and create more and more temporary file= s before I get the recursion error.

As a side note= , python.el really rocks. Thanks so much for the amazing work.
<= br>
On Sun,= Sep 19, 2021 at 12:10 PM Augusto Stoffel <arstoffel@gmail.com> wrote:
On Sun, 19 Sep 2021 at 03:32= , Michael-David Fiszer <sguibor@gmail.com> wrote:

> Hi,

Hi,

Can you try 'M-x toggle-debug-on-error', or maybe tracing some
functions, to discover what is being called repeatedly?

Also, what happens if you (setq python-eldoc-get-doc nil) in the .py
file's buffer?

I'll try this as= ap. I thought it was eldoc, but then tried turning off 'eldoc-mode'= off and I still had the same problem with the infinite recursion (and I th= ink I still saw the weird=C2=A0PYDOC strings, but not sure).

=
But I will try this today.
This did not change anything to the nested lisp error, but doe= s remove the prints of "def __PYDOC_get_help(obj)". So it looks l= ike there may have been two different issues here.
=C2=A0

Some more macos-related things that would be helpful to know:

* On a freshly started python-shell, is are the functions
=C2=A0 __PYTHON_EL_eval and __PYTHON_EL_eval_file defined?
=

I just checked, and they both are.

=
<function __main__.__PYTHON_EL_eval(source, filename)>
=
<function __main__.__PYTHON_EL_eval_file(filename, tempname, delete= )>

* If you do M-x python-shell-send-string RET x=3D"aaa...aaa" or s= omething
=C2=A0 like that, can you evaluate Python statements that are, say, 900 and=
=C2=A0 1100 characters long?

Will try this = immediately=C2=A0

So, int= eresting, if I write

x =3D "aaa....a" in= my py file (calling python-shell-send-string interactively doesn't wor= k like that, shoud it?), it works for len(x) =3D 422 and not for len(x)=3D4= 23 (same error "nesting exceeds").
=C2=A0
=C2=A0


>
> I'm not an expert in how python.el internals work, but I started g= etting this error every time I would
> send a statement to the shell. In addition I would get these weird pri= ntouts of blocks of the form
>
> ```
>=C2=A0 =C2=A0def __PYDOC_get_help(obj):
>=C2=A0 =C2=A0 =C2=A0try:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0import inspect
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0try:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0str_type =3D basestring=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0argspec_function =3D in= spect.getargspec
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0except NameError:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0str_type =3D str
> ```
>
> while just moving the point in my .py file.
>
> My current workaround was to simply override python-shell-send-string = from 28.0.50 with the one
> I had with my emacs 27 version, which was:
>
> ```
> (defun python-shell-send-string (string &optional process msg)
>=C2=A0 =C2=A0"Send STRING to inferior Python PROCESS.
> When optional argument MSG is non-nil, forces display of a
> user-friendly message if there's no process running; defaults to > t when called interactively."
>=C2=A0 =C2=A0(interactive
>=C2=A0 =C2=A0 (list (read-string "Python command: ") nil t))<= br> >=C2=A0 =C2=A0(let ((process (or process (python-shell-get-process-or-er= ror msg))))
>=C2=A0 =C2=A0 =C2=A0(if (string-match ".\n+." string)=C2=A0 = =C2=A0;Multiline.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((temp-file-name (python-shell-= -save-temp-file string))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-name (or = (buffer-file-name) temp-file-name)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(python-shell-send-file file-n= ame process temp-file-name t))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(when (or (not (string-match "\n\\'= " string))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(string-m= atch "\n[ \t].*\n?\\'" string))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(comint-send-string process "\n&= quot;)))))
> ```
>
> And this seems to solve the problem...
>
> In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.6.0, NS appkit-20= 22.60 Version 11.6
> (Build 20G165))
>=C2=A0 of 2021-09-17 built on mdfz-macbookpro4.roam.= corp.google.com
> Windowing system distributor 'Apple', version 10.3.2022
> System Description:=C2=A0 macOS 11.6
>
> Configured using:
>=C2=A0 'configure --disable-dependency-tracking --disable-silent-ru= les
>=C2=A0 --enable-locallisppath=3D/usr/local/share/emacs/site-lisp
>=C2=A0 --infodir=3D/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/e= macs
>=C2=A0 --prefix=3D/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2 -= -with-gnutls
>=C2=A0 --without-dbus --with-imagemagick --with-modules --with-rsvg --w= ith-ns
>=C2=A0 --disable-ns-self-contained'
>
> Configured features:
> ACL GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY= KQUEUE
> NS
> PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB
>
> Important settings:
>=C2=A0 =C2=A0value of $LC_ALL: en_US.UTF-8
>=C2=A0 =C2=A0value of $LC_CTYPE: en_US.UTF-8
>=C2=A0 =C2=A0value of $LANG: en_US.UTF-8
>=C2=A0 =C2=A0locale-coding-system: utf-8-unix
>
> Major mode: mu4e-headers
>
> Memory information:
> ((conses 16 1905022 1639005)
>=C2=A0 (symbols 48 123242 97)
>=C2=A0 (strings 32 433582 151543)
>=C2=A0 (string-bytes 1 14825386)
>=C2=A0 (vectors 16 192606)
>=C2=A0 (vector-slots 8 3165377 831342)
>=C2=A0 (floats 8 1100 6586)
>=C2=A0 (intervals 56 34684 19693)
>=C2=A0 (buffers 992 60))
--000000000000a8fc0a05cc56bd4b-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 19 12:13:11 2021 Received: (at 50669) by debbugs.gnu.org; 19 Sep 2021 16:13:11 +0000 Received: from localhost ([127.0.0.1]:39642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRzRH-00023T-Hn for submit@debbugs.gnu.org; Sun, 19 Sep 2021 12:13:11 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:50773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRzRD-000235-7W for 50669@debbugs.gnu.org; Sun, 19 Sep 2021 12:13:10 -0400 Received: by mail-wm1-f44.google.com with SMTP id 140so11245594wma.0 for <50669@debbugs.gnu.org>; Sun, 19 Sep 2021 09:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=qhI+NPMLbetyYiBwNmd1+lbs2SXQyir3SOJlJ5j84Jk=; b=PwGS0CKPJdwBzTyAMnHOWL8oUQGVX92/3WFVJgqG+LEZ58DgZ6vvWBugJ4JDZkZaUh DJAaoLBc8yD4cQC9WEiyWDA3t68GenfPLX5c2hOCB7h7pFW7uqLdhuz0PJK8L7FjTn/d KqzBGHgag49TnQUx2FKMviCE4pVUTbKymOr9bsW9JSZKDLDG0UuifCv8QksAFKGk0Kay mdIbSQIWLpNkk/5mH+/3XlA5Q2E0O2G0qyPFMZdBu5YowVhzXro4KE29LcsURSWhfqnD dy0CTRQ6OfO3/pMAFxK8SNY779mBruA5jBQYm4xyGxOWWuT13EiDzhnZXXyLQt9NEXRq n0QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=qhI+NPMLbetyYiBwNmd1+lbs2SXQyir3SOJlJ5j84Jk=; b=bw3Ij5tNNbDHV65HJygRVJIzK4KgUU9xrp89df4NHzKeJFvRGms2Me+hykIEQwGnUI +MHWF00L4cUe74Xcafj+5xbC/fYdMdM8ziv0urjl0OkOnPh93iiafjlIgGV+qssWBams Xsgs+SqB09+lXo9o+lmwGHX9C36kJdfLWwZmtdUg/LLU1WJHG3fr+Ptp5IeGSmvI02Yc AzfaV+Dx+uA72U9EXbXgJNmcjscfX7jH2y1km6jpqr5n5s3wVfr8lF4m+aie93+fPRXr ZkHeDTURjvj0OAaqhpM2yarOTIaHGtonYRn2MR604eA9fdwmNXkh8Nyu5n8XxCSnCkek +lnw== X-Gm-Message-State: AOAM530W4wrJU7r5weY7Xqc3y04ZI45YCzRcbSZ1Yprdpg5j4uv1+L9J lrh0n8Jmmjiyg/PtVyP9qNkCHRgHXFQ= X-Google-Smtp-Source: ABdhPJzzk1ph5DTlWHQ6qwdMoXpMxp6GbHn3nd8h7uEoVVFMjgxQ8198Su7HatPC8y2tWGiSuhX9Bg== X-Received: by 2002:a1c:7201:: with SMTP id n1mr20108772wmc.19.1632067981120; Sun, 19 Sep 2021 09:13:01 -0700 (PDT) Received: from ars3 ([2a02:8109:8ac0:56d0::2f72]) by smtp.gmail.com with ESMTPSA id z5sm17267059wmp.26.2021.09.19.09.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 09:13:00 -0700 (PDT) From: Augusto Stoffel To: Michael-David Fiszer Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error References: <87zgs9gcd3.fsf@gmail.com> Date: Sun, 19 Sep 2021 18:12:59 +0200 In-Reply-To: (Michael-David Fiszer's message of "Sun, 19 Sep 2021 13:36:33 +0300") Message-ID: <8735q0lf1w.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50669 Cc: 50669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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? From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 21 17:17:47 2021 Received: (at 50669) by debbugs.gnu.org; 21 Sep 2021 21:17:47 +0000 Received: from localhost ([127.0.0.1]:48178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSn99-0005ha-2X for submit@debbugs.gnu.org; Tue, 21 Sep 2021 17:17:47 -0400 Received: from mail-vs1-f51.google.com ([209.85.217.51]:37410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSn97-0005dZ-M3 for 50669@debbugs.gnu.org; Tue, 21 Sep 2021 17:17:46 -0400 Received: by mail-vs1-f51.google.com with SMTP id q66so729617vsa.4 for <50669@debbugs.gnu.org>; Tue, 21 Sep 2021 14:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2j0AhYCgYSsS1+Ymy9qH/EM6c4ppnun+XyGsztXg1e8=; b=ZSxZOC7XmbDJvqE1QW3xyC2gZKJpn8qwklFZJxvHNomkD+TTeLdyfGlTL9p72Knsmx wXQ4VxxcAHYTU9OPjUqWnfvJFiFkQGnwapQcnMVNzuqNzo9weQ8+vlO8RGUCMupsTNoh rjbRVEV5ZCdxQfTC4oViy4P6jqwjHJMNEJYGR5cnWNErKJyV7V5gz0POYUCHlkHpWIk9 MH0KCp4TXt3RRJWyIon1Cb6OWyJBm1oGnbvy7PNeOi2UutFmHJUQ/BMxWtiz6/b9bkXt 5l314iRAMWgjY7TwzFiC1min8gxPFrjC8l2RuAK4HHhEnLZTShtQynT3FlYgz2fzgpbF pqCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2j0AhYCgYSsS1+Ymy9qH/EM6c4ppnun+XyGsztXg1e8=; b=VAyR46RA0KNevNqfsNrFRFU7QegZlpOLfLdilZdXRBNT7SArA3iJK3TfjeLvqrBf4V S7f26s7Z3ayhSw2WTtBWeUFKDTRPBxHgHyccGuk7DaDM5bbC1WLfwHoGlapAIJ4VFycq 3WlltRoJE/gmggUOeuhdJxlKAux40wpUFQ98ZrIIGxQmcHe1BhZcd1/77Cjf++6BJPRo SoCUBkdu/Nz5VjWhYnX7WPP51vs5HG5uT5X4IEqJnpzbmSgQ2Tqsz+zL1bkQdt3iPjut lzvwOwrP8i1nqHNIiKDDOp0jGA3NIQMuEMP0i0p9bXBcMa57OuDga8vx/8KsdEY3g2L5 UiAw== X-Gm-Message-State: AOAM532ZrmmV15apV55R5vcpUJNFKhQ0qd43M0XLsGjQZajW/je8nCPD eL6j6POrEkCY50SDbcHOLQ5kxD7Jb24y0i/bG50= X-Google-Smtp-Source: ABdhPJyFBUG06Q9UR2b3bSEJJ2k0/WM0MSNyUABMV1QodV+sUBWqJ223KKunzZBtjgTdvYInujU9C9qsjFBpZxmmQNg= X-Received: by 2002:a05:6102:22f1:: with SMTP id b17mr22977664vsh.10.1632259059601; Tue, 21 Sep 2021 14:17:39 -0700 (PDT) MIME-Version: 1.0 References: <87zgs9gcd3.fsf@gmail.com> <8735q0lf1w.fsf@gmail.com> In-Reply-To: <8735q0lf1w.fsf@gmail.com> From: Michael-David Fiszer Date: Wed, 22 Sep 2021 00:17:27 +0300 Message-ID: Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error To: Augusto Stoffel Content-Type: multipart/alternative; boundary="0000000000006dd4ae05cc87edce" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50669 Cc: 50669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000006dd4ae05cc87edce Content-Type: text/plain; charset="UTF-8" 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 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? > --0000000000006dd4ae05cc87edce Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

- I'm pretty sure I'm on the master bra= nch. 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-f808b0589744f83f41d9f581e8b0= 7001145598d2a2aa07fd40c1d20ee35df762
and it looks up to date.
- Regarding the recursive calls, I tried to look into it, and what I found= was very confusing.
=C2=A0 - The tests I sent on number of characters,= I believe establish that the issue only arises when the string is long eno= ugh for python-shell-send-string to save to a file and call python-shell-se= nd file.
=C2=A0 - The backtrace - I sent to you. I suppose it's hard= to decipher.
=C2=A0 - I then tried setting a breakpoint in 'python-= shell-send-string. If I step through commands there, I see myself looping t= hrough this function again and again (creating more and more files, which i= s eventually what leads to the error). Buf *if* I step into 'python-she= ll-send-file when going through the difference expressions of 'python-s= hell-send-string, I get into the function (which indeed calls 'comint-s= end-string, not 'python-shell-send-string... and at this point, instead= of returning to the *beginning* of python-shell-send string, I end up exit= ing python-shell-send-string and everything works.
=C2=A0 =C2=A0 =C2=A0= - In other words, the problem does not arise in edebug mode *if* I step in= to python-shell-send-file when python-shell-send-string calls it.

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

On S= un, Sep 19, 2021 at 7:13 PM Augusto Stoffel <arstoffel@gmail.com> wrote:
Hi David,

So, I think the main thing is to figure out which functions are calling
themselves recursively.=C2=A0 'python-shell-send-file' doesn't = call
'python-shell-send-string' anymore, so that can't be it (are yo= u sure
you are using today's master branch?).

Another crazy attempt would be this:

=C2=A0 =C2=A0 =C2=A0(let ((process-connection-type nil)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(python-shell-completion-native-en= able nil))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(run-python))

Nevermind the initial warnings, does it work for you afterwards?
--0000000000006dd4ae05cc87edce-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 26 07:47:08 2022 Received: (at 50669) by debbugs.gnu.org; 26 Aug 2022 11:47:08 +0000 Received: from localhost ([127.0.0.1]:52515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRXno-0006RF-4M for submit@debbugs.gnu.org; Fri, 26 Aug 2022 07:47:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRXnm-0006Ql-C9 for 50669@debbugs.gnu.org; Fri, 26 Aug 2022 07:47:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dXZbBJ7r0+bizM5QVgOWLnTPqzAqLErof9JA6MNVjtQ=; b=SdrXW5aJiyD8x808WEKIyEMB2K lJBixR5ax6XAVULYX98hLDIf1WjOzmSlF8kSzqtHWP548rj1rbnYSGvdfqoXxjD4XJL+3EPKV+rlb NfcEAOeamlyf0h6Bod6Id6QE3xujKVkHJ0mYg7HPPBPDv1vFB1qJ8s4evDO/+eL5Uh2Y=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRXne-0000kQ-7O; Fri, 26 Aug 2022 13:47:00 +0200 From: Lars Ingebrigtsen To: Michael-David Fiszer Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error In-Reply-To: (Michael-David Fiszer's message of "Sun, 19 Sep 2021 03:32:30 +0300") References: X-Now-Playing: David Sylvian's _Dead Bees on a Cake_: "Krishna Blue" Date: Fri, 26 Aug 2022 13:46:57 +0200 Message-ID: <875yifcjm6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Michael-David Fiszer writes: > I'm not an expert in how python.el internals work, but I started > getting this error every time I would send a statement to the > shell. In addition I would get these weird printouts of blocks of t [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50669 Cc: 50669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Michael-David Fiszer writes: > I'm not an expert in how python.el internals work, but I started > getting this error every time I would send a statement to the > shell. In addition I would get these weird printouts of blocks of the > form (I'm going through old bug reports that unfortunately weren't resolved at the time.) Are you still seeing these issues with the current Emacs "master" branch? There's been quite a lot of work done in this area over the last year. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 26 07:47:12 2022 Received: (at control) by debbugs.gnu.org; 26 Aug 2022 11:47:12 +0000 Received: from localhost ([127.0.0.1]:52518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRXns-0006RW-Dy for submit@debbugs.gnu.org; Fri, 26 Aug 2022 07:47:12 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRXnq-0006R7-TJ for control@debbugs.gnu.org; Fri, 26 Aug 2022 07:47:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xTBknG91+TOzQpnEoSIfoYXnaz0IoiFGbb+Uw8uzMAQ=; b=na4OhlGixlvUCoeAlHjGckWWd2 g5ouii0NfO1pvfdi71gCEr7oQFf3XyxtEWOhb3zoCSPImdHDc/1NQOrWCv7XB/WL5CgfQYgvW54N6 7UYNuq4liYsLmb2MYcBAghdRey+YKbxNKGQSvIurcN7NFORCTuszB/ZZ7GKnWmdtBZAc=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRXnj-0000ka-Dj for control@debbugs.gnu.org; Fri, 26 Aug 2022 13:47:05 +0200 Date: Fri, 26 Aug 2022 13:47:03 +0200 Message-Id: <874jxzcjm0.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50669 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 50669 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 50669 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 10:59:27 2022 Received: (at 50669) by debbugs.gnu.org; 24 Sep 2022 14:59:27 +0000 Received: from localhost ([127.0.0.1]:44933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc6co-0002xq-L8 for submit@debbugs.gnu.org; Sat, 24 Sep 2022 10:59:27 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc6cm-0002xX-5p for 50669@debbugs.gnu.org; Sat, 24 Sep 2022 10:59:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vsQi63a0PtT7P+QoEdhNxkhNqGm2B5b5OumBwy21t/4=; b=l3wrS4zWFU//6fucu+WolgqsqV bC4FfOEKxD9XJ1X30XfWeHro9c31dL0JExGUHnaNt62zORQj8DNhFLfAkFOUXcLgzyGqSxZIfj327 XEXsGeNON9RPqIjCv2S2WT/tQpaAzPqWKPcpTF9byNZfbYUZk9lsjDnul9BxELNvU9Sg=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oc6ce-0004aO-9t; Sat, 24 Sep 2022 16:59:18 +0200 From: Lars Ingebrigtsen To: Michael-David Fiszer Subject: Re: bug#50669: 28.0.50; python-shell-send-string leads to "nesting exceeds `max-lisp-eval-depth`" error In-Reply-To: <875yifcjm6.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 26 Aug 2022 13:46:57 +0200") References: <875yifcjm6.fsf@gnus.org> X-Now-Playing: Crank Sturgeon's _Rogue Pulse: Gravity Collapse (10)_: "In Lieu Of Charming Features" Date: Sat, 24 Sep 2022 16:59:15 +0200 Message-ID: <87pmfkddj0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > Are you still seeing these issues with the current Emacs "master" > branch? There's been quite a lot of work done in this area over the > last year. More information was requested, but no response was given within a month, so I'm closing this bug report. If the problem still exists, please respond to this email and we'll reopen the bug report. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50669 Cc: 50669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > Are you still seeing these issues with the current Emacs "master" > branch? There's been quite a lot of work done in this area over the > last year. More information was requested, but no response was given within a month, so I'm closing this bug report. If the problem still exists, please respond to this email and we'll reopen the bug report. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 10:59:31 2022 Received: (at control) by debbugs.gnu.org; 24 Sep 2022 14:59:31 +0000 Received: from localhost ([127.0.0.1]:44936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc6ct-0002y6-2l for submit@debbugs.gnu.org; Sat, 24 Sep 2022 10:59:31 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc6cq-0002xe-Ev for control@debbugs.gnu.org; Sat, 24 Sep 2022 10:59:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=K/I8FgYpq+USFxLb/1UDUhIYqot/gP17xS3HSXvURJc=; b=HQcJdMkvYxJIcBbJEb7brlXLj9 DA/esS2VkDr6jQMQZjP+UfdMydBbD4QLIkpSMEA79mQPDm2FeFD5E4Q+H0Oe7+/bvCllVDch6Fn/H kFr+W5Kygr8GxcSlzXGom6+pwIrLYqV75c3fKlGX3hl/QNcYH84rAaK6ldN8bC9CBGB8=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oc6ci-0004aV-UH for control@debbugs.gnu.org; Sat, 24 Sep 2022 16:59:22 +0200 Date: Sat, 24 Sep 2022 16:59:20 +0200 Message-Id: <87o7v4ddiv.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50669 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 50669 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 50669 quit From unknown Sat Sep 20 07:39:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 23 Oct 2022 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator