[ANN] IPython 3.0.0rc1

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[ANN] IPython 3.0.0rc1

MinRK

The first release candidate for IPython 3.0 is out. As with the beta, please check it out and report any problems. Hopefully this will become IPython 3.0 final by the end of the month.

As with the beta, you can install the release candidate:

pip install --pre "ipython[all]"

See the release notes for what’s new.

Thanks everyone for helping get this out.
-Min RK, on behalf of the IPython team


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Sylvain Corlay
Congrats! 

On Fri, Feb 13, 2015 at 6:17 PM, MinRK <[hidden email]> wrote:

The first release candidate for IPython 3.0 is out. As with the beta, please check it out and report any problems. Hopefully this will become IPython 3.0 final by the end of the month.

As with the beta, you can install the release candidate:

pip install --pre "ipython[all]"

See the release notes for what’s new.

Thanks everyone for helping get this out.
-Min RK, on behalf of the IPython team


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Max Linke
In reply to this post by MinRK
Hi

Thanks for all your work. The new version runs smooths besides using
extensions for the notebooks.

Is there a document describing how to migrate my custom.js to 3.0?
I currently use 'IPython.load_extensions()' in my custom.js which
produces the error 'TypeError: IPython.load_extensions() is not a
function'. Has this function been deprecated or replaced recently?

This is the full content of my custom.js

IPython.load_extensions('toc', 'gist', 'hide_input_all',
         'calico-spell-check', 'calico-document-tools', 'theme_toggle');

$([IPython.events]).on('app_initialized.NotebookApp', function(){
     require(['/nbextensions/codefolding/codefolding.js'])
});

$([IPython.events]).on('app_initialized.NotebookApp', function(){
IPython.load_extensions('macro-cell');
});

best Max

On 02/14/2015 12:17 AM, MinRK wrote:

> The first release candidate for IPython 3.0 is out. As with the beta,
> please check it out and report any problems. Hopefully this will become
> IPython 3.0 final by the end of the month.
>
> As with the beta, you can install the release candidate:
>
> pip install --pre "ipython[all]"
>
> See the release notes
> <http://ipython.org/ipython-doc/dev/whatsnew/version3.html#release-3-0> for
> what’s new.
>
> Thanks everyone for helping get this out.
> -Min RK, on behalf of the IPython team
> ​
>
>
>
> _______________________________________________
> IPython-dev mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Thomas Kluyver-2
On 16 February 2015 at 01:44, Max Linke <[hidden email]> wrote:
Is there a document describing how to migrate my custom.js to 3.0?
I currently use 'IPython.load_extensions()' in my custom.js which
produces the error 'TypeError: IPython.load_extensions() is not a
function'. Has this function been deprecated or replaced recently?

It's still the public API for loading extensions, but it might not have been loaded when your custom.js is run. I see you currently have a call to load_extensions() in your custom.js outside any event handler - if you wrap that in:

$([IPython.events]).on('app_initialized.NotebookApp', function(){ ... });

does it work?

Thomas

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Matthias Bussonnier
Instead or in supplement of listening to events, you might want to 
use requires to be sure the dependencies are loaded in the right order. 

Cheers, 
-- 
M


Le 16 févr. 2015 à 10:37, Thomas Kluyver <[hidden email]> a écrit :

On 16 February 2015 at 01:44, Max Linke <[hidden email]> wrote:
Is there a document describing how to migrate my custom.js to 3.0?
I currently use 'IPython.load_extensions()' in my custom.js which
produces the error 'TypeError: IPython.load_extensions() is not a
function'. Has this function been deprecated or replaced recently?

It's still the public API for loading extensions, but it might not have been loaded when your custom.js is run. I see you currently have a call to load_extensions() in your custom.js outside any event handler - if you wrap that in:

$([IPython.events]).on('app_initialized.NotebookApp', function(){ ... });

does it work?

Thomas
_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Michael Waskom
In reply to this post by MinRK
Hi Min,

It looks like the scaling of figures that are larger than the cell output div has changed in version 3.

Previously the scaling would preserve the aspect ratio of the figure, but now it seems to just be scaling the width, and not the height.

This change can make it a lot harder to predict what a large figure is going to look like, and is likely to confuse people who don't realize that IPython, not matplotlib is applying the scaling.

Is this on purpose?

Best,
Michael

On Fri, Feb 13, 2015 at 3:17 PM, MinRK <[hidden email]> wrote:

The first release candidate for IPython 3.0 is out. As with the beta, please check it out and report any problems. Hopefully this will become IPython 3.0 final by the end of the month.

As with the beta, you can install the release candidate:

pip install --pre "ipython[all]"

See the release notes for what’s new.

Thanks everyone for helping get this out.
-Min RK, on behalf of the IPython team


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Matthias Bussonnier
No, it does not seem to be on purpose. 

It is a weird interaction between preventing image to be wider than notebook area and the JS that allow you to resize images. 
-- 
M


Le 17 févr. 2015 à 10:57, Michael Waskom <[hidden email]> a écrit :

Hi Min,

It looks like the scaling of figures that are larger than the cell output div has changed in version 3.

Previously the scaling would preserve the aspect ratio of the figure, but now it seems to just be scaling the width, and not the height.

This change can make it a lot harder to predict what a large figure is going to look like, and is likely to confuse people who don't realize that IPython, not matplotlib is applying the scaling.

Is this on purpose?

Best,
Michael

On Fri, Feb 13, 2015 at 3:17 PM, MinRK <[hidden email]> wrote:

The first release candidate for IPython 3.0 is out. As with the beta, please check it out and report any problems. Hopefully this will become IPython 3.0 final by the end of the month.

As with the beta, you can install the release candidate:

pip install --pre "ipython[all]"

See the release notes for what’s new.

Thanks everyone for helping get this out.
-Min RK, on behalf of the IPython team


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Brian Granger-3
In reply to this post by Michael Waskom
Thanks for the report, we have made some changes to this stuff recently and will get this fixed.

Brian

On Tue, Feb 17, 2015 at 10:57 AM, Michael Waskom <[hidden email]> wrote:
Hi Min,

It looks like the scaling of figures that are larger than the cell output div has changed in version 3.

Previously the scaling would preserve the aspect ratio of the figure, but now it seems to just be scaling the width, and not the height.

This change can make it a lot harder to predict what a large figure is going to look like, and is likely to confuse people who don't realize that IPython, not matplotlib is applying the scaling.

Is this on purpose?

Best,
Michael

On Fri, Feb 13, 2015 at 3:17 PM, MinRK <[hidden email]> wrote:

The first release candidate for IPython 3.0 is out. As with the beta, please check it out and report any problems. Hopefully this will become IPython 3.0 final by the end of the month.

As with the beta, you can install the release candidate:

pip install --pre "ipython[all]"

See the release notes for what’s new.

Thanks everyone for helping get this out.
-Min RK, on behalf of the IPython team


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev




--
Brian E. Granger
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[hidden email] and [hidden email]

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Michael Waskom
Awesome, thanks guys!

One other thing I have noticed is that, when shift-TABing to get the function docstring popover in the notebook, the help seems often bound to objects that have been added as arguments, and not  to the function itself., i.e.

func(a, b, [shift-TAB]

will show me the docstring for the object that `b` points at, although this seems to only happen when an variable is being used. In other words, 

func(a, "b", [shift-TAB]

will show me the docstring for `a`.

Previously this would happen when using a function within the call, ie.e.

func1(a, func2(b), [shift=TAB]

would should me the docs for `func2` (even if I had closed parens on it). But the behavior has changed somewhat.

On Tue, Feb 17, 2015 at 11:10 AM, Brian Granger <[hidden email]> wrote:
Thanks for the report, we have made some changes to this stuff recently and will get this fixed.

Brian

On Tue, Feb 17, 2015 at 10:57 AM, Michael Waskom <[hidden email]> wrote:
Hi Min,

It looks like the scaling of figures that are larger than the cell output div has changed in version 3.

Previously the scaling would preserve the aspect ratio of the figure, but now it seems to just be scaling the width, and not the height.

This change can make it a lot harder to predict what a large figure is going to look like, and is likely to confuse people who don't realize that IPython, not matplotlib is applying the scaling.

Is this on purpose?

Best,
Michael

On Fri, Feb 13, 2015 at 3:17 PM, MinRK <[hidden email]> wrote:

The first release candidate for IPython 3.0 is out. As with the beta, please check it out and report any problems. Hopefully this will become IPython 3.0 final by the end of the month.

As with the beta, you can install the release candidate:

pip install --pre "ipython[all]"

See the release notes for what’s new.

Thanks everyone for helping get this out.
-Min RK, on behalf of the IPython team


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev




--
Brian E. Granger
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[hidden email] and [hidden email]

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Max Linke
In reply to this post by Matthias Bussonnier
Thanks for the help I found a way now that works reliable for me.

require([
     'base/js/namespace',
     'base/js/events'
], function(IPython, events) {
     events.on('app_initialized.NotebookApp', function(){
         require(['/nbextensions/codefolding/codefolding.js']);
         IPython.load_extensions('toc', 'hide_input_all', 'macro-cell',
                 'calico-spell-check', 'calico-document-tools',
                 'theme_toggle');
     });
});

I got it working through the tips here and looking at the examples of
the current custom.js template. But since I don't know javascript or the
libraries (require, jquery) used this is not really straight forward to
arrive at this.

In 2.4. I just needed to use 'IPython.load_extensions()' which was nice
and really straight forward.

Is it documented somewhere what the recommended way is of enabling
extensions in the notebook? I can't find anything in the online docs and
most extensions I find seem to use another way to load it.

best Max

On 02/16/2015 07:51 PM, Matthias Bussonnier wrote:

> Instead or in supplement of listening to events, you might want to
> use requires to be sure the dependencies are loaded in the right order.
>
> Cheers,
>
>
>
> _______________________________________________
> IPython-dev mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Max Linke
In reply to this post by Matthias Bussonnier
Isn't there a guarantee about which functions are available when
custom.js is loaded?

The custom.js installed with the rc version says that classes and
functions are available at load time and shows an example to add a
custom keybinding like this.

      IPython.Cell.options_default.cm_config.extraKeys['Home']
          ='goLineLeft';

I tried to read the old behavior of 'ctrl-j' and 'ctrl-k' with:

     IPython.Cell.options_default.cm_config.extraKeys['ctrl-j']
         ='move_cell_down';

this gives the error "IPython.Cell undefined" and now new keybindings
are defined.

Wrapping it in a require statement like this also doesn't help

     require([
         'base/js/namespace',
     ], function(IPython) {
         IPython.Cell.options_default.cm_config.extraKeys['ctrl-j'] =
             'move_cell_down';
     });

I still get the same error that "IPython.Cell" is not defined.

best Max

On 02/16/2015 07:51 PM, Matthias Bussonnier wrote:

> Instead or in supplement of listening to events, you might want to
> use requires to be sure the dependencies are loaded in the right order.
>
> Cheers,
>
>
>
> _______________________________________________
> IPython-dev mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Thomas Kluyver-2
On 17 February 2015 at 13:43, Max Linke <[hidden email]> wrote:
Isn't there a guarantee about which functions are available when
custom.js is loaded?

Currently, as far as I'm aware, no, there isn't. Possibly we should give one, though I think that's too late for 3.0 now.
 
I tried to read the old behavior of 'ctrl-j' and 'ctrl-k' with:

     IPython.Cell.options_default.cm_config.extraKeys['ctrl-j']

There's a code snippet to restore Ctrl-J/Ctrl-K here: https://github.com/ipython/ipython/pull/7732#issuecomment-74519970

The shortcuts set in cm_config are only for Codemirror, i.e. they act within a single cell. Notebook shortcuts, e.g. for moving cells around, are defined elsewhere.

> Is it documented somewhere what the recommended way is of enabling
> extensions in the notebook? I can't find anything in the online docs and
> most extensions I find seem to use another way to load it.

Basically nothing about the JS API is documented yet, and this is kind of deliberate - most of it is still changing pretty fast, and we don't want to give a false impression of stability.

In IPython 3, there is a way of storing declarative frontend config, including a set of extensions to load, so you don't have to manually edit custom.js to enable them. There is an extension built on top of this to provide a GUI for enabling and disabling extensions:

https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/config-extension

Thomas

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Michael Waskom
Ooop one more thing I've noticed. ctrl-j/k no longer appears to move cells, although that shortcut is still referenced here: http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/Notebook/Notebook%20Basics.ipynb (not in the help popup though, so maybe those have been removed, which would  make me sad).

On Tue, Feb 17, 2015 at 1:53 PM, Thomas Kluyver <[hidden email]> wrote:
On 17 February 2015 at 13:43, Max Linke <[hidden email]> wrote:
Isn't there a guarantee about which functions are available when
custom.js is loaded?

Currently, as far as I'm aware, no, there isn't. Possibly we should give one, though I think that's too late for 3.0 now.
 
I tried to read the old behavior of 'ctrl-j' and 'ctrl-k' with:

     IPython.Cell.options_default.cm_config.extraKeys['ctrl-j']

There's a code snippet to restore Ctrl-J/Ctrl-K here: https://github.com/ipython/ipython/pull/7732#issuecomment-74519970

The shortcuts set in cm_config are only for Codemirror, i.e. they act within a single cell. Notebook shortcuts, e.g. for moving cells around, are defined elsewhere.

> Is it documented somewhere what the recommended way is of enabling
> extensions in the notebook? I can't find anything in the online docs and
> most extensions I find seem to use another way to load it.

Basically nothing about the JS API is documented yet, and this is kind of deliberate - most of it is still changing pretty fast, and we don't want to give a false impression of stability.

In IPython 3, there is a way of storing declarative frontend config, including a set of extensions to load, so you don't have to manually edit custom.js to enable them. There is an extension built on top of this to provide a GUI for enabling and disabling extensions:

https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/config-extension

Thomas

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Matthias Bussonnier

Le 17 févr. 2015 à 14:45, Michael Waskom <[hidden email]> a écrit :

Ooop one more thing I've noticed. ctrl-j/k no longer appears to move cells, although that shortcut is still referenced here: http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/Notebook/Notebook%20Basics.ipynb (not in the help popup though, so maybe those have been removed, which would  make me sad).

Yes you are right. The shortcut are conflicting with FF windows, so we removed them. 
You can add them back in your custom.js though. 
-- 
M


On Tue, Feb 17, 2015 at 1:53 PM, Thomas Kluyver <[hidden email]> wrote:
On 17 February 2015 at 13:43, Max Linke <[hidden email]> wrote:
Isn't there a guarantee about which functions are available when
custom.js is loaded?

Currently, as far as I'm aware, no, there isn't. Possibly we should give one, though I think that's too late for 3.0 now.
 
I tried to read the old behavior of 'ctrl-j' and 'ctrl-k' with:

     IPython.Cell.options_default.cm_config.extraKeys['ctrl-j']

There's a code snippet to restore Ctrl-J/Ctrl-K here: https://github.com/ipython/ipython/pull/7732#issuecomment-74519970

The shortcuts set in cm_config are only for Codemirror, i.e. they act within a single cell. Notebook shortcuts, e.g. for moving cells around, are defined elsewhere.

> Is it documented somewhere what the recommended way is of enabling
> extensions in the notebook? I can't find anything in the online docs and
> most extensions I find seem to use another way to load it.

Basically nothing about the JS API is documented yet, and this is kind of deliberate - most of it is still changing pretty fast, and we don't want to give a false impression of stability.

In IPython 3, there is a way of storing declarative frontend config, including a set of extensions to load, so you don't have to manually edit custom.js to enable them. There is an extension built on top of this to provide a GUI for enabling and disabling extensions:

https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/config-extension

Thomas

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Michael Waskom
Hi, sorry to be a nuisance, but I'm worried this part of my second email may have been overlooked, and it's been bugging me a lot as I've been working with the release candidate:

One other thing I have noticed is that, when shift-TABing to get the function docstring popover in the notebook, the help seems often bound to objects that have been added as arguments, and not  to the function itself., i.e.

func(a, b, [shift-TAB]

will show me the docstring for the object that `b` points at, although this seems to only happen when an variable is being used. In other words, 

func(a, "b", [shift-TAB]

will show me the docstring for `a`.

Previously this would happen when using a function within the call, ie.e.

func1(a, func2(b), [shift=TAB]

would should me the docs for `func2` (even if I had closed parens on it). But the behavior has changed somewhat.

On Tue, Feb 17, 2015 at 2:56 PM, Matthias Bussonnier <[hidden email]> wrote:

Le 17 févr. 2015 à 14:45, Michael Waskom <[hidden email]> a écrit :

Ooop one more thing I've noticed. ctrl-j/k no longer appears to move cells, although that shortcut is still referenced here: http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/Notebook/Notebook%20Basics.ipynb (not in the help popup though, so maybe those have been removed, which would  make me sad).

Yes you are right. The shortcut are conflicting with FF windows, so we removed them. 
You can add them back in your custom.js though. 
-- 
M


On Tue, Feb 17, 2015 at 1:53 PM, Thomas Kluyver <[hidden email]> wrote:
On 17 February 2015 at 13:43, Max Linke <[hidden email]> wrote:
Isn't there a guarantee about which functions are available when
custom.js is loaded?

Currently, as far as I'm aware, no, there isn't. Possibly we should give one, though I think that's too late for 3.0 now.
 
I tried to read the old behavior of 'ctrl-j' and 'ctrl-k' with:

     IPython.Cell.options_default.cm_config.extraKeys['ctrl-j']

There's a code snippet to restore Ctrl-J/Ctrl-K here: https://github.com/ipython/ipython/pull/7732#issuecomment-74519970

The shortcuts set in cm_config are only for Codemirror, i.e. they act within a single cell. Notebook shortcuts, e.g. for moving cells around, are defined elsewhere.

> Is it documented somewhere what the recommended way is of enabling
> extensions in the notebook? I can't find anything in the online docs and
> most extensions I find seem to use another way to load it.

Basically nothing about the JS API is documented yet, and this is kind of deliberate - most of it is still changing pretty fast, and we don't want to give a false impression of stability.

In IPython 3, there is a way of storing declarative frontend config, including a set of extensions to load, so you don't have to manually edit custom.js to enable them. There is an extension built on top of this to provide a GUI for enabling and disabling extensions:

https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/config-extension

Thomas

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

rossant
2015-02-19 17:35 GMT+01:00 Michael Waskom <[hidden email]>:
> Hi, sorry to be a nuisance, but I'm worried this part of my second email may
> have been overlooked, and it's been bugging me a lot as I've been working
> with the release candidate:

I second that

> One other thing I have noticed is that, when shift-TABing to get the
> function docstring popover in the notebook, the help seems often bound to
> objects that have been added as arguments, and not  to the function itself.,
> i.e.
>
> func(a, b, [shift-TAB]
>
> will show me the docstring for the object that `b` points at, although this
> seems to only happen when an variable is being used. In other words,
>
> func(a, "b", [shift-TAB]
>
> will show me the docstring for `a`.
>
> Previously this would happen when using a function within the call, ie.e.
>
> func1(a, func2(b), [shift=TAB]
>
> would should me the docs for `func2` (even if I had closed parens on it).
> But the behavior has changed somewhat.
_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Thomas Kluyver-2
In reply to this post by Michael Waskom
Sorry, I did see that part of the message before, but I neglected to respond.

On 19 February 2015 at 08:35, Michael Waskom <[hidden email]> wrote:
One other thing I have noticed is that, when shift-TABing to get the function docstring popover in the notebook, the help seems often bound to objects that have been added as arguments, and not  to the function itself., i.e.

func(a, b, [shift-TAB]

will show me the docstring for the object that `b` points at

I think previously there was a regex in the JS that looked backwards for something like "name(". As part of the work to make the frontend more language agnostic, this was dropped - it now sends the current cell and the cursor position to the kernel and expects that to work out what it should provide information about.

The upside of this is that it's possible to do smarter things, like tokenising the code, so in your example:

> func1(a, func2(b), [shift-TAB]

it would be able to provide information on func1 rather than func2.

The downside is that we haven't implemented anything smart in the kernel yet, so it currently just gets the last name before or at the cursor.

We don't want to start messing around with this code for 3.0 now, but for 3.1 we should aim to make it at least as smart as the JS was in IPython 2.x. I'll open an issue for it.

Thomas

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

Matthias Bussonnier

Le 19 févr. 2015 à 09:54, Thomas Kluyver <[hidden email]> a écrit :

>
> I think previously there was a regex in the JS that looked backwards for something like "name(". As part of the work to make the frontend more language agnostic, this was dropped - it now sends the current cell and the cursor position to the kernel and expects that to work out what it should provide information about.

Indeed,and having a space after the comma, or not was returning different results.


> The upside of this is that it's possible to do smarter things, like tokenising the code, so in your example:
>
> > func1(a, func2(b), [shift-TAB]
>
> it would be able to provide information on func1 rather than func2.
>
> The downside is that we haven't implemented anything smart in the kernel yet, so it currently just gets the last name before or at the cursor.

You can also select and shift-tab, it should give info only on selection.

>
> We don't want to start messing around with this code for 3.0 now, but for 3.1 we should aim to make it at least as smart as the JS was in IPython 2.x. I'll open an issue for it.

It was not technically "smart", and we don't use the new message spec at all,
so I doubt this will be a simple "fix".

--
M


> Thomas
> _______________________________________________
> IPython-dev mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-dev

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

MinRK


On Thu, Feb 19, 2015 at 8:38 PM, Matthias Bussonnier <[hidden email]> wrote:

Le 19 févr. 2015 à 09:54, Thomas Kluyver <[hidden email]> a écrit :

>
> I think previously there was a regex in the JS that looked backwards for something like "name(". As part of the work to make the frontend more language agnostic, this was dropped - it now sends the current cell and the cursor position to the kernel and expects that to work out what it should provide information about.

Indeed,and having a space after the comma, or not was returning different results.


> The upside of this is that it's possible to do smarter things, like tokenising the code, so in your example:
>
> > func1(a, func2(b), [shift-TAB]
>
> it would be able to provide information on func1 rather than func2.
>
> The downside is that we haven't implemented anything smart in the kernel yet, so it currently just gets the last name before or at the cursor.

You can also select and shift-tab, it should give info only on selection.

>
> We don't want to start messing around with this code for 3.0 now, but for 3.1 we should aim to make it at least as smart as the JS was in IPython 2.x. I'll open an issue for it.

It was not technically "smart", and we don't use the new message spec at all,
so I doubt this will be a simple "fix".

I don't know what you mean by "we don't use the new message spec", but the tokenization is done entirely on the Python side with the new message spec that we use in 3.0. Right now, the IPython kernel picks the nearest token to the cursor, but we could certainly change this to pick the most recent token before an open-paren if there is one. We just need to make a decision about what token should be inspected for a given context. I think that's a relatively challenging problem, since it's guessing user intent, but implementation shouldn't be the biggest challenge.
 

--
M


> Thomas
> _______________________________________________
> IPython-dev mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-dev

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] IPython 3.0.0rc1

MinRK

On Thu, Feb 19, 2015 at 9:13 PM, MinRK <[hidden email]> wrote:



On Thu, Feb 19, 2015 at 8:38 PM, Matthias Bussonnier <[hidden email]> wrote:

Le 19 févr. 2015 à 09:54, Thomas Kluyver <[hidden email]> a écrit :

>
> I think previously there was a regex in the JS that looked backwards for something like "name(". As part of the work to make the frontend more language agnostic, this was dropped - it now sends the current cell and the cursor position to the kernel and expects that to work out what it should provide information about.

Indeed,and having a space after the comma, or not was returning different results.


> The upside of this is that it's possible to do smarter things, like tokenising the code, so in your example:
>
> > func1(a, func2(b), [shift-TAB]
>
> it would be able to provide information on func1 rather than func2.
>
> The downside is that we haven't implemented anything smart in the kernel yet, so it currently just gets the last name before or at the cursor.

You can also select and shift-tab, it should give info only on selection.

>
> We don't want to start messing around with this code for 3.0 now, but for 3.1 we should aim to make it at least as smart as the JS was in IPython 2.x. I'll open an issue for it.

It was not technically "smart", and we don't use the new message spec at all,
so I doubt this will be a simple "fix".

I don't know what you mean by "we don't use the new message spec", but the tokenization is done entirely on the Python side with the new message spec that we use in 3.0. Right now, the IPython kernel picks the nearest token to the cursor, but we could certainly change this to pick the most recent token before an open-paren if there is one. We just need to make a decision about what token should be inspected for a given context. I think that's a relatively challenging problem, since it's guessing user intent, but implementation shouldn't be the biggest challenge.

For example, here’s one implementation.

-MinRK

 

--
M


> Thomas
> _______________________________________________
> IPython-dev mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-dev

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
12