GNU bug report logs - #58678
28.2; :session in org-babel for python unexpected output

Previous Next

Package: emacs;

Reported by: Sergey <srg.koshelev <at> proton.me>

Date: Fri, 21 Oct 2022 07:10:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58678 in the body.
You can then email your comments to 58678 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#58678; Package emacs. (Fri, 21 Oct 2022 07:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergey <srg.koshelev <at> proton.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 21 Oct 2022 07:10:02 GMT) Full text and rfc822 format available.

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

From: Sergey <srg.koshelev <at> proton.me>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 28.2; :session in org-babel for python unexpected output
Date: Thu, 20 Oct 2022 21:12:23 +0000
[Message part 1 (text/plain, inline)]
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

#+begin_src python :results output
print(2)
#+end_src

#+RESULTS:
: 2

#+begin_src python :results output :session *python-test*
print(2)
#+end_src

#+RESULTS:
: >>> __PYTHON_EL_eval("try:\nwith open('/var/folders/dk/3btmprj123b_31jsp30thzrm0000gq/T/babel-9tY6uv/python-92ZLVe') as __org_babel_python_tmpfile:\nexec(compile(__org_babel_python_tmpfile.read(), __org_babel_python_tmpfile.name, 'exec'))\nexcept:\nraise\nfinally:\nprint('
```

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

Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
--infodir=/opt/homebrew/Cellar/emacs-plus <at> 28/28.2/share/info/emacs
--prefix=/opt/homebrew/Cellar/emacs-plus <at> 28/28.2 --with-xml2
--with-gnutls --without-dbus --without-imagemagick --with-modules
--with-rsvg --with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe
-mmacosx-version-min=12
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT'
'CPPFLAGS=-I/opt/homebrew/opt/icu4c/include
-I/opt/homebrew/opt/openssl <at> 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=-L/opt/homebrew/opt/icu4c/lib
-L/opt/homebrew/opt/openssl <at> 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''

Configured features:
ACL GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB

Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix

Major mode: Info

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

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail info warnings compile ob-python
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-seq
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-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
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 charprop
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)

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))

Sent with [Proton Mail](https://proton.me/) secure email.
[Message part 2 (text/html, inline)]

bug reassigned from package 'emacs' to 'org-mode'. Request was from Ihor Radchenko <yantar92 <at> posteo.net> to control <at> debbugs.gnu.org. (Sat, 22 Oct 2022 05:55:01 GMT) Full text and rfc822 format available.

bug No longer marked as found in versions 28.2. Request was from Ihor Radchenko <yantar92 <at> posteo.net> to control <at> debbugs.gnu.org. (Sat, 22 Oct 2022 05:55:01 GMT) Full text and rfc822 format available.

Information forwarded to emacs-orgmode <at> gnu.org:
bug#58678; Package org-mode. (Sat, 22 Oct 2022 05:59:02 GMT) Full text and rfc822 format available.

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

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Sergey <srg.koshelev <at> proton.me>, emacs-orgmode <at> gnu.org
Cc: 58678 <at> debbugs.gnu.org
Subject: Re: bug#58678: 28.2; :session in org-babel for python unexpected
 output
Date: Sat, 22 Oct 2022 05:58:43 +0000
[Redirecting from Emacs bugs]
[See the quote below for the original report]

> #+RESULTS:
> : >>> __PYTHON_EL_eval("try:\nwith open('/var/folders/dk/3btmprj123b_31jsp30thzrm0000gq/T/babel-9tY6uv/python-92ZLVe') as __org_babel_python_tmpfile:\nexec(compile(__org_babel_python_tmpfile.read(), __org_babel_python_tmpfile.name, 'exec'))\nexcept:\nraise\nfinally:\nprint('
> ```

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

Best,
Ihor

Sergey via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

> 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
>
> #+begin_src python :results output
> print(2)
> #+end_src
>
> #+RESULTS:
> : 2
>
> #+begin_src python :results output :session *python-test*
> print(2)
> #+end_src
>
> #+RESULTS:
> : >>> __PYTHON_EL_eval("try:\nwith open('/var/folders/dk/3btmprj123b_31jsp30thzrm0000gq/T/babel-9tY6uv/python-92ZLVe') as __org_babel_python_tmpfile:\nexec(compile(__org_babel_python_tmpfile.read(), __org_babel_python_tmpfile.name, 'exec'))\nexcept:\nraise\nfinally:\nprint('
> ```
>
> 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
>
> Configured using:
> 'configure --disable-dependency-tracking --disable-silent-rules
> --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
> --infodir=/opt/homebrew/Cellar/emacs-plus <at> 28/28.2/share/info/emacs
> --prefix=/opt/homebrew/Cellar/emacs-plus <at> 28/28.2 --with-xml2
> --with-gnutls --without-dbus --without-imagemagick --with-modules
> --with-rsvg --with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe
> -mmacosx-version-min=12
> -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
> -DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT'
> 'CPPFLAGS=-I/opt/homebrew/opt/icu4c/include
> -I/opt/homebrew/opt/openssl <at> 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=-L/opt/homebrew/opt/icu4c/lib
> -L/opt/homebrew/opt/openssl <at> 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''
>
> Configured features:
> ACL GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
> PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB
>
> Important settings:
> value of $LANG: en_US.UTF-8
> locale-coding-system: utf-8-unix
>
> Major mode: Info
>
> 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
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr emacsbug sendmail info warnings compile ob-python
> 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-seq
> 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-eshadow
> isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
> 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 charprop
> 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)
>
> 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))
>
> Sent with [Proton Mail](https://proton.me/) secure email.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to emacs-orgmode <at> gnu.org:
bug#58678; Package org-mode. (Mon, 24 Oct 2022 14:52:02 GMT) Full text and rfc822 format available.

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

From: Sergey <srg.koshelev <at> proton.me>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: emacs-orgmode <at> gnu.org, 58678 <at> debbugs.gnu.org
Subject: Re: bug#58678: 28.2;
 :session in org-babel for python unexpected output
Date: Mon, 24 Oct 2022 14:51:23 +0000
I have traced this to org-bable issue with MacOS python readline and native completion. Similar issues discussed in 
https://github.com/jorgenschaefer/elpy/issues/887
and 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753

The solution proposed in those threads, i.e., installing python from homebrew, which has gnureadline, helps for emacs 27 but causes freezing in emacs 28 after displaying following message:
```
Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native-enable’ was t and "python3" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list. Native completions 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 setup 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 <yantar92 <at> posteo.net> wrote:


> [Redirecting from Emacs bugs]
> [See the quote below for the original report]
> 
> > #+RESULTS:
> > : >>> __PYTHON_EL_eval("try:\nwith open('/var/folders/dk/3btmprj123b_31jsp30thzrm0000gq/T/babel-9tY6uv/python-92ZLVe') as __org_babel_python_tmpfile:\nexec(compile(__org_babel_python_tmpfile.read(), __org_babel_python_tmpfile.name, 'exec'))\nexcept:\nraise\nfinally:\nprint('
> > ```
> 
> 
> 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
> 
> Best,
> Ihor
> 
> Sergey via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" bug-gnu-emacs <at> gnu.org writes:
> 
> > 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
> > 
> > #+begin_src python :results output
> > print(2)
> > #+end_src
> > 
> > #+RESULTS:
> > : 2
> > 
> > #+begin_src python :results output :session python-test
> > print(2)
> > #+end_src
> > 
> > #+RESULTS:
> > : >>> __PYTHON_EL_eval("try:\nwith open('/var/folders/dk/3btmprj123b_31jsp30thzrm0000gq/T/babel-9tY6uv/python-92ZLVe') as __org_babel_python_tmpfile:\nexec(compile(__org_babel_python_tmpfile.read(), __org_babel_python_tmpfile.name, 'exec'))\nexcept:\nraise\nfinally:\nprint('
> > ```
> > 
> > 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
> > 
> > Configured using:
> > 'configure --disable-dependency-tracking --disable-silent-rules
> > --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
> > --infodir=/opt/homebrew/Cellar/emacs-plus <at> 28/28.2/share/info/emacs
> > --prefix=/opt/homebrew/Cellar/emacs-plus <at> 28/28.2 --with-xml2
> > --with-gnutls --without-dbus --without-imagemagick --with-modules
> > --with-rsvg --with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe
> > -mmacosx-version-min=12
> > -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
> > -DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT'
> > 'CPPFLAGS=-I/opt/homebrew/opt/icu4c/include
> > -I/opt/homebrew/opt/openssl <at> 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=-L/opt/homebrew/opt/icu4c/lib
> > -L/opt/homebrew/opt/openssl <at> 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''
> > 
> > Configured features:
> > ACL GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
> > PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM ZLIB
> > 
> > Important settings:
> > value of $LANG: en_US.UTF-8
> > locale-coding-system: utf-8-unix
> > 
> > Major mode: Info
> > 
> > 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
> > 
> > Load-path shadows:
> > None found.
> > 
> > Features:
> > (shadow sort mail-extr emacsbug sendmail info warnings compile ob-python
> > 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-seq
> > 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-eshadow
> > isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
> > 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 charprop
> > 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)
> > 
> > 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))
> > 
> > Sent with Proton Mail secure email.
> 
> 
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at https://orgmode.org/.
> 
> Support Org development at https://liberapay.com/org-mode,
> 
> or support my work at https://liberapay.com/yantar92




Information forwarded to emacs-orgmode <at> gnu.org:
bug#58678; Package org-mode. (Tue, 25 Oct 2022 06:15:02 GMT) Full text and rfc822 format available.

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

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Sergey <srg.koshelev <at> proton.me>
Cc: emacs-orgmode <at> gnu.org, 58678 <at> debbugs.gnu.org
Subject: Re: bug#58678: 28.2; :session in org-babel for python unexpected
 output
Date: Tue, 25 Oct 2022 06:15:20 +0000
Sergey <srg.koshelev <at> proton.me> writes:

> I have traced this to org-bable issue with MacOS python readline and native completion. Similar issues discussed in 
> https://github.com/jorgenschaefer/elpy/issues/887
> and 
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753
>
> The solution proposed in those threads, i.e., installing python from homebrew, which has gnureadline, helps for emacs 27 but causes freezing in emacs 28 after displaying following message:
> ```
> Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native-enable’ was t and "python3" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list. Native completions 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 setup as well (although, I believe my emacs comes with org pre-packaged).

So, it looks like Emacs bug then.
Let us see what Emacs devs can suggest.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




bug reassigned from package 'org-mode' to 'emacs'. Request was from Ihor Radchenko <yantar92 <at> posteo.net> to control <at> debbugs.gnu.org. (Tue, 25 Oct 2022 06:15:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58678; Package emacs. (Thu, 02 May 2024 17:11:02 GMT) Full text and rfc822 format available.

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

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Sergey <srg.koshelev <at> proton.me>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 58678 <at> debbugs.gnu.org
Subject: Re: bug#58678: 28.2; :session in org-babel for python unexpected
 output
Date: Thu, 02 May 2024 17:11:15 +0000
Ihor Radchenko <yantar92 <at> posteo.net> writes:

>> I have traced this to org-bable issue with MacOS python readline and native completion. Similar issues discussed in 
>> https://github.com/jorgenschaefer/elpy/issues/887
>> and 
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753
>>
>> The solution proposed in those threads, i.e., installing python from homebrew, which has gnureadline, helps for emacs 27 but causes freezing in emacs 28 after displaying following message:
>> ```
>> Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native-enable’ was t and "python3" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list. Native completions 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 setup as well (although, I believe my emacs comes with org pre-packaged).
>
> So, it looks like Emacs bug then.
> Let us see what Emacs devs can suggest.

CCing Eli. It looks like my reassignment to emacs fell through the cracks.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58678; Package emacs. (Thu, 02 May 2024 18:24:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>, kobarity <kobarity <at> gmail.com>
Cc: 58678 <at> debbugs.gnu.org, srg.koshelev <at> proton.me
Subject: Re: bug#58678: 28.2; :session in org-babel for python unexpected
 output
Date: Thu, 02 May 2024 21:22:47 +0300
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: 58678 <at> debbugs.gnu.org
> Date: Thu, 02 May 2024 17:11:15 +0000
> 
> Ihor Radchenko <yantar92 <at> posteo.net> writes:
> 
> >> I have traced this to org-bable issue with MacOS python readline and native completion. Similar issues discussed in 
> >> https://github.com/jorgenschaefer/elpy/issues/887
> >> and 
> >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753
> >>
> >> The solution proposed in those threads, i.e., installing python from homebrew, which has gnureadline, helps for emacs 27 but causes freezing in emacs 28 after displaying following message:
> >> ```
> >> Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native-enable’ was t and "python3" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list. Native completions 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 setup as well (although, I believe my emacs comes with org pre-packaged).
> >
> > So, it looks like Emacs bug then.
> > Let us see what Emacs devs can suggest.
> 
> CCing Eli.

I have no idea what happens here, so I added kobarity in the hope that
he would know.

> It looks like my reassignment to emacs fell through the cracks.

It didn't fall through the cracks (see
https://debbugs.gnu.org/cgi/bugreport.cgi?msg=20;bug=58678), but
reassignment doesn't trigger any email delivery to the maintainers, so
you cannot expect anyone else to know you've reassigned, unless you CC
us.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58678; Package emacs. (Fri, 03 May 2024 08:37:02 GMT) Full text and rfc822 format available.

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

From: kobarity <kobarity <at> gmail.com>
To: srg.koshelev <at> proton.me,
	Eli Zaretskii <eliz <at> gnu.org>
Cc: Ihor Radchenko <yantar92 <at> posteo.net>, 58678 <at> debbugs.gnu.org
Subject: Re: bug#58678: 28.2;
 :session in org-babel for python unexpected output
Date: Fri, 03 May 2024 17:35:32 +0900
Eli Zaretskii wrote:
> 
> > From: Ihor Radchenko <yantar92 <at> posteo.net>
> > Cc: 58678 <at> debbugs.gnu.org
> > Date: Thu, 02 May 2024 17:11:15 +0000
> > 
> > Ihor Radchenko <yantar92 <at> posteo.net> writes:
> > 
> > >> I have traced this to org-bable issue with MacOS python readline and native completion. Similar issues discussed in 
> > >> https://github.com/jorgenschaefer/elpy/issues/887
> > >> and 
> > >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753
> > >>
> > >> The solution proposed in those threads, i.e., installing python from homebrew, which has gnureadline, helps for emacs 27 but causes freezing in emacs 28 after displaying following message:
> > >> ```
> > >> Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native-enable’ was t and "python3" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list. Native completions 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 setup as well (although, I believe my emacs comes with org pre-packaged).
> > >
> > > So, it looks like Emacs bug then.
> > > Let us see what Emacs devs can suggest.
> > 
> > CCing Eli.
> 
> I have no idea what happens here, so I added kobarity in the hope that
> he would know.

As far as I have tried on my son's MacBook, this problem was
reproduced with 29.3 but not with the latest python.el.  It was fixed
by the commit d5757178464ca51f79c7fc1ab199a1582e92ab32.

Sergey, could you try one of the following?

1. With Emacs 29, apply the changes of python.el in the commit
   d5757178464ca51f79c7fc1ab199a1582e92ab32.
2. Build Emacs on master branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58678; Package emacs. (Thu, 09 May 2024 22:29:02 GMT) Full text and rfc822 format available.

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

From: Sergey <srg.koshelev <at> proton.me>
To: kobarity <kobarity <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Ihor Radchenko <yantar92 <at> posteo.net>,
 58678 <at> debbugs.gnu.org
Subject: Re: bug#58678: 28.2;
 :session in org-babel for python unexpected output
Date: Thu, 09 May 2024 22:28:05 +0000
Hey Eli!

Thank you for reaching out!
I have Emacs 29.1 installed on my Macbook with Spacemacs config. I am not sure what commit python.el is on in Spacemacs but the python code works with :session. 

Sent with Proton Mail secure email.

On Friday, May 3rd, 2024 at 3:35 AM, kobarity <kobarity <at> gmail.com> wrote:

> Eli Zaretskii wrote:
> 
> > > From: Ihor Radchenko yantar92 <at> posteo.net
> > > Cc: 58678 <at> debbugs.gnu.org
> > > Date: Thu, 02 May 2024 17:11:15 +0000
> > > 
> > > Ihor Radchenko yantar92 <at> posteo.net writes:
> > > 
> > > > > I have traced this to org-bable issue with MacOS python readline and native completion. Similar issues discussed in
> > > > > https://github.com/jorgenschaefer/elpy/issues/887
> > > > > and
> > > > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25753
> > > > > 
> > > > > The solution proposed in those threads, i.e., installing python from homebrew, which has gnureadline, helps for emacs 27 but causes freezing in emacs 28 after displaying following message:
> > > > > `Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native-enable’ was t and "python3" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list. Native completions 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 setup as well (although, I believe my emacs comes with org pre-packaged).
> > > > 
> > > > So, it looks like Emacs bug then.
> > > > Let us see what Emacs devs can suggest.
> > > 
> > > CCing Eli.
> > 
> > I have no idea what happens here, so I added kobarity in the hope that
> > he would know.
> 
> 
> As far as I have tried on my son's MacBook, this problem was
> reproduced with 29.3 but not with the latest python.el. It was fixed
> by the commit d5757178464ca51f79c7fc1ab199a1582e92ab32.
> 
> Sergey, could you try one of the following?
> 
> 1. With Emacs 29, apply the changes of python.el in the commit
> d5757178464ca51f79c7fc1ab199a1582e92ab32.
> 2. Build Emacs on master branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58678; Package emacs. (Fri, 10 May 2024 06:01:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sergey <srg.koshelev <at> proton.me>
Cc: kobarity <at> gmail.com, yantar92 <at> posteo.net, 58678 <at> debbugs.gnu.org
Subject: Re: bug#58678: 28.2;
 :session in org-babel for python unexpected output
Date: Fri, 10 May 2024 09:00:28 +0300
> Date: Thu, 09 May 2024 22:28:05 +0000
> From: Sergey <srg.koshelev <at> proton.me>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, Ihor Radchenko <yantar92 <at> posteo.net>, 58678 <at> debbugs.gnu.org
> 
> Hey Eli!
> 
> Thank you for reaching out!
> I have Emacs 29.1 installed on my Macbook with Spacemacs config. I am not sure what commit python.el is on in Spacemacs but the python code works with :session. 

Thanks.

Does anyone know how can we make sure that Spacemacs includes the fix?




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 25 May 2024 07:46:02 GMT) Full text and rfc822 format available.

Notification sent to Sergey <srg.koshelev <at> proton.me>:
bug acknowledged by developer. (Sat, 25 May 2024 07:46:02 GMT) Full text and rfc822 format available.

Message #40 received at 58678-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: srg.koshelev <at> proton.me, kobarity <at> gmail.com, yantar92 <at> posteo.net
Cc: 58678-done <at> debbugs.gnu.org
Subject: Re: bug#58678: 28.2;
 :session in org-babel for python unexpected output
Date: Sat, 25 May 2024 10:45:04 +0300
> Cc: kobarity <at> gmail.com, yantar92 <at> posteo.net, 58678 <at> debbugs.gnu.org
> Date: Fri, 10 May 2024 09:00:28 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Thu, 09 May 2024 22:28:05 +0000
> > From: Sergey <srg.koshelev <at> proton.me>
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, Ihor Radchenko <yantar92 <at> posteo.net>, 58678 <at> debbugs.gnu.org
> > 
> > Hey Eli!
> > 
> > Thank you for reaching out!
> > I have Emacs 29.1 installed on my Macbook with Spacemacs config. I am not sure what commit python.el is on in Spacemacs but the python code works with :session. 
> 
> Thanks.
> 
> Does anyone know how can we make sure that Spacemacs includes the fix?

No further comments in 2 weeks, so I assume the bug was solved, and
I'm closing it now.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 22 Jun 2024 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 321 days ago.

Previous Next


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