Fail to send class definitions from interactive session to engines namespaces #2754

ogrisel opened this Issue Jan 7, 2013 · 3 comments


None yet
2 participants

ogrisel commented Jan 7, 2013

Here is a sample notebook to demonstrate the issue.

Please note that I don't get any unpickling error message when calling:

rc[:]['AClass'] = AClass

While @minrk is reporting a DummyModule AttributeError in this SO question.

I will see if I can come up with a pull request for a can_class / uncan_class along the lines of this gist.


minrk commented Jan 7, 2013

You probably don't get an error because that call is non-blocking by default.

rc[:].push(dict(AClass=AClass), block=True)

should show you an error.

If you don't want to bother with a PR, I can whip it up - you have already figured out what needs to be done in your gist.


ogrisel commented Jan 7, 2013

Alright, I was reading the source for IPython.utils.pickleutil and indeed it seems that mapping in can_map from type to CannedClass should work by reusing the stuff from my PR.

I let you do it as you will be probably be faster than I to write the tests in the right place.


minrk commented Jan 7, 2013

give PR #2755 a look

@minrk minrk closed this in e8c3ce5 Jan 11, 2013

@minrk minrk added this to the 1.0 milestone Mar 26, 2014

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

Merge pull request #2755 from minrk/canclass
can interactively defined classes

*Only* interactively defined classes are canned.

closes #2754
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment