-
-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
instance doesn't use pickled __class__ when same-named class exists #243
Comments
Still haven't gotten to this, but I just wanted to make it more clear what is going on. If this behavior works as expected from python, but in IPython it doesn't, I'll have to investigate what IPython is doing that is causing the stored |
So, this works:
|
You can see that the original class
|
Interesting, so you just delayed the redefinition of Foo and the problem goes away. Works for me too FWIW. |
I'm just checking some different versions -- and it doesn't seem to be either |
@piccolbo: yes, a serialized version of |
I can repro in python as well now, contrary to my original report. I may have upgraded all of the above in the meantime. Next time I will submit a reproducible docker image. ;) |
Added Try your code again with There was indeed a time (a while ago) that |
Works for me too! |
I want to save an instance of a class that is defined in a different file, and I dump the instance of that class using |
@pranav9056: please open a new issue, and provide a more detailed description (i.e. with some minimal code example) |
I'm facing the same problem as @pranav9056 but with
|
@bariod: Thanks for the example. Please repost/open this as a new issue. |
I was just reading @mmckerns answer on SO and marveling at the power of Dill. So I tried his first example and to my surprise it fails exactly like pickle would, whereas @mmckerns states "Pickle would blow up on the above." Which I think implies "dill doesn't". Then I found out that it fails in iPython but not python. Does anyone know what the cause is? Are there known limitations in using with iPython?
I reported this on SO as a comment, then I thought that thread was a bit too past its prime for anyone to pay attention, so I am reporting here and cross linking.
The text was updated successfully, but these errors were encountered: