These are chat archives for ipython/ipython

10th
Oct 2014
Jessica B. Hamrick
@jhamrick
Oct 10 2014 01:20
How does one override the %matplotlib inline rc config?
I tried:
c.InlineBackend.rc.update({
    'figure.facecolor': (1, 1, 1, 1),
    'axes.facecolor': (1, 1, 1, 1)
})
but it doesn’t appear to work
Wolfgang Kerzendorf
@wkerzendorf
Oct 10 2014 15:26
I was wondering how far the integration of the matplotlib webagg with IPython is. Last time I tried it, it was still relatively difficult to do.
Thomas Kluyver
@takluyver
Oct 10 2014 16:42
@wkerzendorf there is a mpl backend called nbagg now - that might be what you're after
Jason Grout
@jasongrout
Oct 10 2014 16:48
@jdfreder: I think we should be categorically using listenTo rather than on for backbone events
and we should be calling children view's .remove() method when a parent view is remove()d
basically, listenTo stores a reference in the listening object to the trigger object and the callback. Then the stopListening method releases all of these handlers (i.e., calling .off() for everything it knows about)
Jonathan Frederic
@jdfreder
Oct 10 2014 17:07
stopListening doesn't include on
?
Jonathan Frederic
@jdfreder
Oct 10 2014 17:17
hmmm
sounds like a good idea to me too
Jason Grout
@jasongrout
Oct 10 2014 17:28
@jdfreder: ipython/ipython#6675
that's an initial take. I want to get Sylvain's input on it too, particularly on the lifecycle management
I left old code in there in case people are using it, but inserted a deprecation warning where the old approach is likely used. I also converted .on() to .listenTo :)
I haven't tested it very much, though, so now I'm going to hammer it a bit.
of course stopListening doesn't undo the 'on' calls. The view won't know about them at all. Only the target knows about them.
the point of listenTo is that the receiver keeps track of what it has listened to, so it can call off for everything it is listening to.
Jonathan Frederic
@jdfreder
Oct 10 2014 17:45
nice!
Jason Grout
@jasongrout
Oct 10 2014 17:54
it is very much in-progress right now---it doesn't even work because various typos, etc.
Jonathan Frederic
@jdfreder
Oct 10 2014 18:05
Yeah I saw there are still quite a bit of ons left
and the do_diff code was copied, but not yet removed from its original spot
Jason Grout
@jasongrout
Oct 10 2014 18:27
okay, I think #6675 at least works now
I left the do_diff in the original spot so that it doesn't break people's code.
Perhaps I should put in a deprecation warning there too
Jonathan Frederic
@jdfreder
Oct 10 2014 18:47
do_diff can be called statically right? Why not just add a deprecation warning where the old one sits and redirect the call to the new one?
Jason Grout
@jasongrout
Oct 10 2014 19:17
sure, that makes sense.
do you think there will be other times when you'd like to diff between two lists?
but certainly, that should be a utility function anyway; it doesn't belong in WidgetView
can you add a review comment to the PR?
huh, testing...
ViewList.prototype.call(...)
Jonathan Frederic
@jdfreder
Oct 10 2014 19:23
Sure, I just left a comment
I think if we need to diff elsewhere, it should probably be a better diff method :)
Jason Grout
@jasongrout
Oct 10 2014 19:24
very true