These are chat archives for ipython/ipython

13th
Jun 2015
Brian E. Granger
@ellisonbg
Jun 13 2015 05:41
When Jon and I were thinking about integrating notebooks into sphinx, we were thinking of converting them to rst and linking to the original on nbviewer, rather than trying to integrate the html converted output into the RTD build
David P. Sanders
@dpsanders
Jun 13 2015 12:09
Hi all, a quick question that I haven't found the answer to by googling (and I haven't seen mentioned): how can I open a Jupyter notebook with a different kernel (i.e. not the one it was created with)?
Could there perhaps be a dropdown for this when you open a given notebook for instance? Or from the Jupyter front page?
Kyle Kelley
@rgbkrk
Jun 13 2015 12:39
From the notebook's page can you click Kernel-> Change Kernel
David P. Sanders
@dpsanders
Jun 13 2015 17:48
@rgbkrk That worked, thanks a lot!
Sylvain Corlay
@SylvainCorlay
Jun 13 2015 21:04
hello
ipykernel and jupyter_client both have a connect.py with a find_connection_file function.
although jupyter_client's version does not take a profile argument anymore, only an optional path variable
Min RK
@minrk
Jun 13 2015 21:08
Right, since profiles don't exist for Jupyter.
Sylvain Corlay
@SylvainCorlay
Jun 13 2015 21:08
when importing through the shim in IPython.kernel.connect, the latter overrides the former.
although, IPython.lib.kernel was a shim to IPython.kernel.connect since 1.0, but now, it only imports the version from ipykernel.
Hence I am a bit confused about the right way to do it.
shouldn't IPython.lib.kernel have the same content as IPython.kernel.connect?
(maybe with a deprecation warning)
Min RK
@minrk
Jun 13 2015 21:12
IPython.lib.kernel has had a deprecation warning since 1.0
Sylvain Corlay
@SylvainCorlay
Jun 13 2015 21:13
ok, it is being swallowed by spyder, sorry
Min RK
@minrk
Jun 13 2015 21:14
DeprecationWarnings are hidden by default in Python. It's super unhelpful.
#8535 should make IPython.kernel.connect more like it used to be.
Sylvain Corlay
@SylvainCorlay
Jun 13 2015 21:20
Thanks, I just opened spyder-ide/spyder#2486 to be compatible with 4.0.
With #8535, find_connection_file will look into .ipython which might not be what we want.
at least in Spyder
since the qtconsole will use .jupyter
Min RK
@minrk
Jun 13 2015 21:23
Good point.
So the question is: Should IPython.kernel.connect.find_connection_file preserve signature, or be the right call for the client-side.
Sylvain Corlay
@SylvainCorlay
Jun 13 2015 21:24
I am fine with the new version, we were passing profile='default'all the time which was not doing anything
Min RK
@minrk
Jun 13 2015 21:24
I can add an ignored profile kwarg to the jupyter_client version.
Sylvain Corlay
@SylvainCorlay
Jun 13 2015 21:25
The docstring still mentions the profile argument btw.
what is the utility of ipykernel.kernel.connect.find_connection_file ?
I am not sure about adding an unused argument. It might be misleading.
Min RK
@minrk
Jun 13 2015 21:28
I made jupyter/jupyter_client#30 as an alternative.
@SylvainCorlay The use with profile arg is not really relevant anymore. The primary remaining use is finding the connection file of the current running application from within the kernel.
Sylvain Corlay
@SylvainCorlay
Jun 13 2015 21:32
yes, that would work, and avoid breaking client code.
Min RK
@minrk
Jun 13 2015 21:32
I'll work on ipykernel.find_connection_file to remove the search by profile, and make it call jupyter_client.find_connection_file instead.
Sylvain Corlay
@SylvainCorlay
Jun 13 2015 21:33
ok, that would make sense
btw, you might want to edit the docstring in jupyter/jupyter_client#30
since it still mentions profile.
Min RK
@minrk
Jun 13 2015 21:46
Thanks.