all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: fgallina@gnu.org (Fabián Ezequiel Gallina)
To: Federico Beffa <beffa@ieee.org>
Cc: 18052-done@debbugs.gnu.org
Subject: bug#18052: 24.3; python.el and ipython shell
Date: Sun, 20 Jul 2014 03:02:06 -0300	[thread overview]
Message-ID: <878unoy3dt.fsf@gnu.org> (raw)
In-Reply-To: <CAKrPhPPzyKx25XTm_=QqHc9H=6iv_ct4rgi0=cVen5yjDzy-ZQ@mail.gmail.com> (Federico Beffa's message of "Sat, 19 Jul 2014 18:25:12 +0200")

Federico Beffa <beffa@ieee.org> writes:

> Unfortunately it does not. I see the same intermittent problem as
> without the "-u" option.
>

So I tracked down what's going on.  Removing "console" from your
`python-shell-interpreter-args' should do the trick.

The "console" subcommand, starts an iPython server (AKA kernel) and then
connects the client console to it (that's the reason you see two
processes).  Removing the "console" subcommand just starts a standalone
iPython shell that doesn't suffer from this intermittent initialization
problem.

Now the reason why the console subcommand fails seems to be an iPython
bug itself.  What happens is that python.el shell setup codes are sent
quickly as soon as the inferior process starts, but it seems that
sometimes the iPython kernel startup doesn't expect that and fails to
start properly, thus causing the resulting iPython shell to be non
responsive.

This is not particularly a problem of python.el, in fact the issue can
be replicated in the commandline by spawning processes like so:

    echo "print ('yes')" | ipython console

With that, I get the same intermittent behavior observed previously.  So
my suggestion is to report this bug upstream.

In the meantime, I'll include some notes about this in the header of
python.el.


PS: As you may expect, when an iPython kernel is already started, using
"console --existing" works reliably, this may be useful in case you
really needed the client-server mode.



Cheers,
Fabián





  reply	other threads:[~2014-07-20  6:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 13:51 bug#18052: 24.3; python.el and ipython shell Federico Beffa
2014-07-18 14:07 ` Eli Zaretskii
2014-07-18 16:38   ` Federico Beffa
2014-07-18 18:04     ` Eli Zaretskii
2014-07-19 13:42 ` Fabián Ezequiel Gallina
2014-07-19 16:25 ` Federico Beffa
2014-07-20  6:02   ` Fabián Ezequiel Gallina [this message]
     [not found] ` <handler.18052.D18052.140583613030726.notifdone@debbugs.gnu.org>
2014-07-20 13:49   ` bug#18052: closed (Re: bug#18052: 24.3; python.el and ipython shell) Federico Beffa
2014-07-20 16:26     ` Federico Beffa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878unoy3dt.fsf@gnu.org \
    --to=fgallina@gnu.org \
    --cc=18052-done@debbugs.gnu.org \
    --cc=beffa@ieee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.