These are chat archives for ipython/ipython

27th
Mar 2015
Scott Sanderson
@ssanderson
Mar 27 2015 02:28 UTC
@minrk question on the contents API: should it be legal for a contents manager to delete its own root directory? The current test suite seems to very explicitly avoid that operation, but I think it "works" with the current implementation
but that leaves the notebook in a totally broken state
or rather, the notebook app
Scott Sanderson
@ssanderson
Mar 27 2015 02:37 UTC
(specifically, all requests to the root page result in a 404)
Min RK
@minrk
Mar 27 2015 03:00 UTC
It's up to the contents service to keep itself making sense. Deleting / doesn't make a lot of sense, but I guess it's allowed.
The Files implementation should probably 400 when attempting to delete root.
Scott Sanderson
@ssanderson
Mar 27 2015 03:01 UTC
I opened ipython/ipython#8168 as a suggestion
Min RK
@minrk
Mar 27 2015 03:01 UTC
I think that makes sense.
Scott Sanderson
@ssanderson
Mar 27 2015 03:02 UTC
I'm having a hard time imagining a scenario where deletion of root would be allowed
b/c, necessarily, it means that listing root returns a 404
Min RK
@minrk
Mar 27 2015 03:02 UTC
Right.
Jason Grout
@jasongrout
Mar 27 2015 15:52 UTC
@jdfreder - thanks for looking at the custom serialization PR
Jonathan Frederic
@jdfreder
Mar 27 2015 16:10 UTC
@jasongrout np, I'm still looking- was AFK for a bit because my laptop ran out of batteries and the StarBucks I was at blocked all of their outlets. : /
Jason Grout
@jasongrout
Mar 27 2015 16:37 UTC
I think this PR brings up larger discussions about communicating metadata across the wire.
one thing that I'm not very happy about in this PR is that the serialization metadata is transferred across the wire every single time a value is synced
(if there is custom serialization)
I think it would be much cleaner if the protocol was agreed upon in advance, and the js side took care of its serialization, and the python side took care of its serialization
instead of the python side telling the js side how to do its serialization
so, for example, the js box widget would know, by itself, which fields it had to check for references to other widgets
and independently, the python side box widget would know the same.
Jason Grout
@jasongrout
Mar 27 2015 16:42 UTC
but there are still things in the PR that should be pushed forward, like binary messages in both the sync and custom messages
@rgbkrk can't wait for the binary messages :).
Jason Grout
@jasongrout
Mar 27 2015 16:49 UTC
All right, I'm going to make one more change to the PR. Instead of the serialization metadata being sent with a sync message, you'll have to declare it up front in a js class, similar to the to_json and from_json metadata for a traitlet on the python side.
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 18:39 UTC
Is there a problem with TravisCI?
Jason Grout
@jasongrout
Mar 27 2015 18:40 UTC
What are you seeing? Github has been up and down today..
Remi Rampin
@remram44
Mar 27 2015 19:45 UTC
Hmm, I'm loading an IPython notebook, and somehow the SVG in there doesn't render correctly
it renders fine in the nbviewer or if I re-execute the cell
Remi Rampin
@remram44
Mar 27 2015 19:51 UTC
I added the Chrome inspection thing; it's not SVG for some reason
I'm running IPython 2.4.1
Matthias Bussonnier
@Carreau
Mar 27 2015 19:52 UTC
Your notebook is probably untrusted;
Go to file menu and trust it (You know what this means, and if it ever get malicious content then it can errase your hard drive and steel your email credential)
save and reload.
Remi Rampin
@remram44
Mar 27 2015 19:54 UTC
it shows up on nbviewer
also, why would it convert SVG to text?
is SVG that much unsafe compared to a PNG?
Remi Rampin
@remram44
Mar 27 2015 20:00 UTC
I might just replace my SVGs to PNGs directly in the ipynb JSON, so that people can open it ok
Matthias Bussonnier
@Carreau
Mar 27 2015 20:00 UTC
because SVG can contain javascript.
and it does not "convert"
you have all the format, it oly show you the "safe" one when it cannot determine wether you are the author of the notebook or not.
You are not authenticat on nbviewer, so you don't risk anything we can show "unsafe" content;
and yes, SVG is much more unsafe than PNG as in this context SVG could steel your credit card information if they are on your machine and install a backdoor, where PNG cannot.
Jason Grout
@jasongrout
Mar 27 2015 20:35 UTC
@jdfreder: are you looking at my PR now?
I have some pretty fundamental changes to how it works I want to push :)
Remi Rampin
@remram44
Mar 27 2015 20:45 UTC
there is an output "html" with a <svg> in it
and an output "text" with different content
what it's showing is the "html" one, with the SVG replaced by the two strings that are in there (supposed to be in <text> elements)
so I do call this converting
I'm ok with not displaying the HTML, but mangling it...
it looks like it just strips all HTML tags
Kyle Kelley
@rgbkrk
Mar 27 2015 21:05 UTC
@jasongrout I'm looking forward to the binary messages too
;)
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 22:18 UTC
what is the correct procedure to pip install the jupyter_* directories of the big split?
Matthias Bussonnier
@Carreau
Mar 27 2015 22:19 UTC
None right now.
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 22:20 UTC
and the incorrect procedure ? :)
Matthias Bussonnier
@Carreau
Mar 27 2015 22:28 UTC
ALmost everything :-)
Jason Grout
@jasongrout
Mar 27 2015 22:28 UTC
incorrect procedure: sudo rm -rf /
(please don't try that at home!)
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 22:29 UTC
sudo rm -rf / actually works but has the inelegance of ending up with an error message
please try
Matthias Bussonnier
@Carreau
Mar 27 2015 22:29 UTC
--no-preserve-root
Jason Grout
@jasongrout
Mar 27 2015 22:29 UTC
right, I was just going to do that... :)
@jdfreder: I'm much happier now with the design on ipython/ipython#7757. I think it's really, really ready for review now :).
Min RK
@minrk
Mar 27 2015 22:30 UTC
@SylvainCorlay only editable installs (pip install -e) are going to work while the separate packages haven't actually been created
Matthias Bussonnier
@Carreau
Mar 27 2015 22:37 UTC
@minrk do you want to force push on master to unmerge ?
github works great even under heavy DDOS
Jason Grout
@jasongrout
Mar 27 2015 22:39 UTC
Can someone kick #7757? I think it's a Travis error...
Matthias Bussonnier
@Carreau
Mar 27 2015 22:39 UTC
Ok
Done.
Jason Grout
@jasongrout
Mar 27 2015 22:43 UTC
Thanks; it passed now!
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 22:55 UTC
did you eventually force-push something to master?
(I am i the middle of a big rebase)
seems you did :)
Min RK
@minrk
Mar 27 2015 23:03 UTC
A PR was merged into master that shouldn't have been. It was only on master for about 30 seconds.
I specifically reverted it so you wouldn't have to rebase. Sorry!
I can un-revert it easily enough, if that would make it easier for you.
@SylvainCorlay it looks like you already did a rebase on the split kernel. I can reapply that split.
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 23:08 UTC
as you prefer
Min RK
@minrk
Mar 27 2015 23:08 UTC
@SylvainCorlay would you prefer that I reapply the split on master so you can keep your rebase?
I did the revert specifically to make your PR easier, so if you've already done the rebase and are happy with it, I can put the original state back.
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 23:09 UTC
just let me know what you do
Min RK
@minrk
Mar 27 2015 23:11 UTC
How did you do the rebase?
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 23:13 UTC
pfiou, back online
you can do as you want.
either reset master to where you were a few minutes ago
or i can rerebase
Min RK
@minrk
Mar 27 2015 23:17 UTC
damnit. A PR has been merged since the revert, so I can't easily un-revert anymore.
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 23:17 UTC
lol
Min RK
@minrk
Mar 27 2015 23:17 UTC
You can use git reflog to find the state before you did the rebase.
I can't believe we managed to time it that you pulled and rebased in the less than a minute that IPython master had that PR merged.
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 23:19 UTC
yes, I fetched upstream at the exact wrong time
no problem, I can rebase again
Min RK
@minrk
Mar 27 2015 23:19 UTC
Sorry, I messed everything up trying to make it easier.
You shouldn't have to if you get the commit before you rebased via reflog
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 23:20 UTC
I probably have a bookmark of the commit number somewhere
btw, the tip of master cannot start a notebook
"/home/sylvain/ipython/IPython/nbformat/validator.py", line 71, in get_validator IOError: [Errno 2] No such file or directory: '/home/sylvain/ipython/IPython/nbformat/v4/nbformat.v4.schema.json'
Min RK
@minrk
Mar 27 2015 23:22 UTC
reflog should look something like:
a638031 HEAD@{12}: rebase: s/IPython.kernel/jupyter_client in jupyter_client
f64f916 HEAD@{13}: rebase: move client code from IPython.kernel to jupyter_client
865ed70 HEAD@{14}: rebase: checkout master
e72a229 HEAD@{15}: commit: your last commit <- this is the last state before rebase
@SylvainCorlay hm, that should have been fixed by #8167
tip of master has no IPython/nbformat/validator.py
Might need a git clean for the removed files.
Sylvain Corlay
@SylvainCorlay
Mar 27 2015 23:26 UTC
pyc