From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OE/SCvVAV2N6GwEAbAwnHQ (envelope-from ) for ; Tue, 25 Oct 2022 03:50:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2DIDC/VAV2MESAAA9RJhRA (envelope-from ) for ; Tue, 25 Oct 2022 03:50:45 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 732D9D77B for ; Tue, 25 Oct 2022 03:50:44 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1on95C-0005n8-TT; Mon, 24 Oct 2022 21:50:22 -0400 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 1omyno-0003xX-4K for emacs-orgmode@gnu.org; Mon, 24 Oct 2022 10:51:44 -0400 Received: from mail-40130.protonmail.ch ([185.70.40.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omynj-0002F7-9i for emacs-orgmode@gnu.org; Mon, 24 Oct 2022 10:51:43 -0400 Date: Mon, 24 Oct 2022 14:51:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=utkk7hsm3bhpnj7hdhyepy6bdm.protonmail; t=1666623094; x=1666882294; bh=CXcass2A2Gkm5caiu2mEWqPtUd/VTgeVbgkLnrWkrEk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Ufiv5LCtJRvIkq4tjkR5o2/Z0M/Rtkooo/XsPeNy2wy6d8P/ThFDmafJjtSAVvvMY pFvgcu4D9qrXwFjpn1HTR1zYonnO46StQims5OHJX9DCefQCSeXNWEtrEFwtX6Gx11 oS387geos745gHo7fUPAhcHEcpxeVzYgrELTGuE44gVcj7YuzCfqAKfL8B2KZkynDQ bBKJMSWDvlch5Oq8LjPPHGrfNPWi7/86y1x1HMc5jjHvlPMYajTgA8ulIyoG3mpa1o grsXRxbiDa+g1wfosroWV7OCx5bEA8ELxg2ERrHyxQtjNGcJr8y+Vg8QPePbT4Cki2 d1qJApJQ8Nt4Q== To: Ihor Radchenko From: Sergey Cc: emacs-orgmode@gnu.org, 58678@debbugs.gnu.org Subject: Re: bug#58678: 28.2; :session in org-babel for python unexpected output Message-ID: <05d53841TFY_y3sPHPfKe88XSEzzLagSxlSsb5CN-2ph0LpnlsSPXRZzjZivgR2RLz0PPM457qIDR46q9NDcJCPnScKQaWFE_B3Ujo8dwlc=@proton.me> In-Reply-To: <87zgdo1jsc.fsf@localhost> References: <87zgdo1jsc.fsf@localhost> Feedback-ID: 45233733:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.130; envelope-from=srg.koshelev@proton.me; helo=mail-40130.protonmail.ch 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 24 Oct 2022 21:50:14 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666662644; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=CXcass2A2Gkm5caiu2mEWqPtUd/VTgeVbgkLnrWkrEk=; b=eTO1ZXKjJOb5MfVHLuvB/Inj6SBYV4hciBd/8s+IcsedheM9AkYOVKrKmbTnQnEvXuy/IR Oiumq6EcSyYZycJJWwJWeTrj48bwH54x2tTBpN18CSNdWp4TzpGZLgTeb6ude69paVNUkh KCzB1v66hKvQ0iUQc1nVpux+AUVzAogpAxYmot+u6k6brerKX/66FJwdiuNIDyFinLYGdS cxNRDLp+IF6jpik82CwbFlAPrz7li8aVlHNtezsKdolJSwn8SJ9Ty3ehSqogWPJIAbpapc 6ByzmZFVxKqlhUiMJ8GQto9hJuCaX/ugzJF4W2d07lF2cTh6O4IYHAUVrVAAiA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666662644; a=rsa-sha256; cv=none; b=S2tkTb/2HV5akhTtGVyMpMzyahErxypodRTst9sXjqVyx1t8fAFoO+KE9740rkUNA9mzs0 dP+uxUzM5yqzFq1iFP54MzTcpZ9ru8je3BmKvaoUe096DAy3E3pbiq0zK2f9bMYGLmayQG NgoMyyZOeIDtmSlG6hJ0cLarZ+RmWhVeCqBISDcWdIntGWHhCg/bzLfohozWc/j25Uzgpf 43MlObwa8fb26L/krmOyFHUbGOb6p0pqMuyQ3SmGQvacX4LrPcfRJu9DbkCnJT+Nr2xpNs EibMlB/y46BOuRRS3BtFAm8ezy11jVLUVzrbvEHJ/VymVs2wteGF0dpFKYcJsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=proton.me header.s=utkk7hsm3bhpnj7hdhyepy6bdm.protonmail header.b=Ufiv5LCt; dmarc=pass (policy=quarantine) header.from=proton.me; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.91 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=proton.me header.s=utkk7hsm3bhpnj7hdhyepy6bdm.protonmail header.b=Ufiv5LCt; dmarc=pass (policy=quarantine) header.from=proton.me; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 732D9D77B X-Spam-Score: -3.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: pcXKrGfaIP3W I have traced this to org-bable issue with MacOS python readline and native= completion. Similar issues discussed in=20 https://github.com/jorgenschaefer/elpy/issues/887 and=20 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25753 The solution proposed in those threads, i.e., installing python from homebr= ew, which has gnureadline, helps for emacs 27 but causes freezing in emacs = 28 after displaying following message: ``` Warning (python): Your =E2=80=98python-shell-interpreter=E2=80=99 doesn= =E2=80=99t seem to support readline, yet =E2=80=98python-shell-completion-n= ative-enable=E2=80=99 was t and "python3" is not part of the =E2=80=98pytho= n-shell-completion-native-disabled-interpreters=E2=80=99 list. Native compl= etions have been disabled locally. ``` Setting ~python-shell-completion-native-enable~ to nil removes the warning = but doesn't prevent freezing. This behaviour persists with minimal org setu= p as well (although, I believe my emacs comes with org pre-packaged). Cheers, Sergey. ------- Original Message ------- On Saturday, October 22nd, 2022 at 12:58 AM, Ihor Radchenko wrote: > [Redirecting from Emacs bugs] > [See the quote below for the original report] >=20 > > #+RESULTS: > > : >>> __PYTHON_EL_eval("try:\nwith open('/var/folders/dk/3btmprj123b_31= jsp30thzrm0000gq/T/babel-9tY6uv/python-92ZLVe') as __org_babel_python_tmpfi= le:\nexec(compile(__org_babel_python_tmpfile.read(), __org_babel_python_tmp= file.name, 'exec'))\nexcept:\nraise\nfinally:\nprint(' > > ``` >=20 >=20 > I am unable to reproduce with the latest main on Linux. > Sergey, could you please try to reproduce with the latest Org version > from Git? See https://orgmode.org/manual/Feedback.html#Feedback >=20 > Best, > Ihor >=20 > Sergey via "Bug reports for GNU Emacs, the Swiss army knife of text > editors" bug-gnu-emacs@gnu.org writes: >=20 > > Running the following org file in 'emacs -Q' leads to an unexpected > > output as demonstrated below: > > ``` > > #+begin_src elisp > > (setq org-babel-python-command "python3") > > (setq python-shell-interpreter "/usr/bin/python3") > > (org-babel-do-load-languages > > 'org-babel-load-languages > > '( > > (python . t))) > > #+end_src > >=20 > > #+begin_src python :results output > > print(2) > > #+end_src > >=20 > > #+RESULTS: > > : 2 > >=20 > > #+begin_src python :results output :session python-test > > print(2) > > #+end_src > >=20 > > #+RESULTS: > > : >>> __PYTHON_EL_eval("try:\nwith open('/var/folders/dk/3btmprj123b_31= jsp30thzrm0000gq/T/babel-9tY6uv/python-92ZLVe') as __org_babel_python_tmpfi= le:\nexec(compile(__org_babel_python_tmpfile.read(), __org_babel_python_tmp= file.name, 'exec'))\nexcept:\nraise\nfinally:\nprint(' > > ``` > >=20 > > In GNU Emacs 28.2 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.= 60 Version 12.6 (Build 21G115)) > > of 2022-10-12 built on MAC-140754 > > Windowing system distributor 'Apple', version 10.3.2113 > > System Description:macOS 12.6 > >=20 > > Configured using: > > 'configure --disable-dependency-tracking --disable-silent-rules > > --enable-locallisppath=3D/opt/homebrew/share/emacs/site-lisp > > --infodir=3D/opt/homebrew/Cellar/emacs-plus@28/28.2/share/info/emacs > > --prefix=3D/opt/homebrew/Cellar/emacs-plus@28/28.2 --with-xml2 > > --with-gnutls --without-dbus --without-imagemagick --with-modules > > --with-rsvg --with-ns --disable-ns-self-contained 'CFLAGS=3D-Os -w -pip= e > > -mmacosx-version-min=3D12 > > -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk > > -DFD_SETSIZE=3D10000 -DDARWIN_UNLIMITED_SELECT' > > 'CPPFLAGS=3D-I/opt/homebrew/opt/icu4c/include > > -I/opt/homebrew/opt/openssl@1.1/include > > -I/opt/homebrew/opt/readline/include -isystem/opt/homebrew/include > > -F/opt/homebrew/Frameworks > > -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk' > > 'LDFLAGS=3D-L/opt/homebrew/opt/icu4c/lib > > -L/opt/homebrew/opt/openssl@1.1/lib -L/opt/homebrew/opt/readline/lib > > -L/opt/homebrew/lib -F/opt/homebrew/Frameworks > > -Wl,-headerpad_max_install_names > > -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'' > >=20 > > Configured features: > > ACL GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS > > PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB > >=20 > > Important settings: > > value of $LANG: en_US.UTF-8 > > locale-coding-system: utf-8-unix > >=20 > > Major mode: Info > >=20 > > Minor modes in effect: > > shell-dirtrack-mode: t > > tooltip-mode: t > > global-eldoc-mode: t > > show-paren-mode: t > > electric-indent-mode: t > > mouse-wheel-mode: t > > tool-bar-mode: t > > menu-bar-mode: t > > file-name-shadow-mode: t > > global-font-lock-mode: t > > font-lock-mode: t > > blink-cursor-mode: t > > auto-composition-mode: t > > auto-encryption-mode: t > > auto-compression-mode: t > > buffer-read-only: t > > line-number-mode: t > > indent-tabs-mode: t > > transient-mark-mode: t > >=20 > > Load-path shadows: > > None found. > >=20 > > Features: > > (shadow sort mail-extr emacsbug sendmail info warnings compile ob-pytho= n > > python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x > > tramp-compat shell ls-lisp vc-git diff-mode vc-dispatcher org-element > > avl-tree generator ol-eww eww xdg url-queue thingatpt mm-url ol-rmail > > ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt cl-extra > > help-mode speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view > > mml-smime smime dig gnus-sum shr kinsoku svg dom browse-url url > > url-proxy url-privacy url-expand url-methods url-history url-cookie > > url-domsuf url-util url-parse url-vars mailcap gnus-group gnus-undo > > gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 > > netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny > > rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode > > mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader > > gnus-win gnus nnheader gnus-util rmail rmail-loaddefs auth-source cl-se= q > > eieio eieio-core cl-macs eieio-loaddefs password-cache rfc2047 rfc2045 > > ietf-drums text-property-search mail-utils mm-util mail-prsvr wid-edit > > ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs > > ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref > > ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint > > org-pcomplete pcomplete comint ansi-color ring org-list org-faces > > org-entities noutline outline easy-mmode org-version ob-emacs-lisp > > ob-core ob-eval org-table oc-basic json map bibtex iso8601 time-date > > subr-x ol rx org-keys oc seq byte-opt gv bytecomp byte-compile cconv > > org-compat advice org-macs org-loaddefs format-spec find-func cal-menu > > calendar cal-loaddefs cl-loaddefs cl-lib iso-transl tooltip eldoc paren > > electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel > > term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd > > fontset image regexp-opt fringe tabulated-list replace newcomment > > text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshado= w > > isearch easymenu timer select scroll-bar mouse jit-lock font-lock synta= x > > font-core term/tty-colors frame minibuffer cl-generic cham georgian > > utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean > > japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european > > ethiopic indian cyrillic chinese composite emoji-zwj charscript charpro= p > > case-table epa-hook jka-cmpr-hook help simple abbrev obarray > > cl-preloaded nadvice button loaddefs faces cus-face macroexp files > > window text-properties overlay sha1 md5 base64 format env code-pages > > mule custom widget hashtable-print-readable backquote threads kqueue > > cocoa ns lcms2 multi-tty make-network-process emacs) > >=20 > > Memory information: > > ((conses 16 217410 17812) > > (symbols 48 22121 1) > > (strings 32 80449 5421) > > (string-bytes 1 2659099) > > (vectors 16 40607) > > (vector-slots 8 454675 43035) > > (floats 8 276 108) > > (intervals 56 1253 0) > > (buffers 992 19)) > >=20 > > Sent with Proton Mail secure email. >=20 >=20 > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at https://orgmode.org/. >=20 > Support Org development at https://liberapay.com/org-mode, >=20 > or support my work at https://liberapay.com/yantar92