These are chat archives for ipython/ipython

23rd
Apr 2015
Jonathan Frederic
@jdfreder
Apr 23 2015 16:47
@/all are we keeping a list of the to-be-tackled packaging problems?
I think I've just come across another thing to add to that list...
Thomas Kluyver
@takluyver
Apr 23 2015 16:49
I don't think we are
possibly it's easier to keep a list of problems we don't have to tackle with packaging ;-)
Kyle Kelley
@rgbkrk
Apr 23 2015 16:54
  • World hunger
  • Disease
Jonathan Frederic
@jdfreder
Apr 23 2015 16:56
  • Not enough Philz coffee shops in LA
Fernando Perez
@fperez
Apr 23 2015 17:08
are we having a docs meeting today? just checking...
Brian E. Granger
@ellisonbg
Apr 23 2015 17:08
Ahh yes
Matthias Bussonnier
@Carreau
Apr 23 2015 18:58

in

if PY3:
    string_types = str,
else:
    string_types = str, eval('unicode')

what would be the advantage of eval ?

Thomas Kluyver
@takluyver
Apr 23 2015 19:00
Editors won't highlight it as a NameError ;-)
is that in our code?
Matthias Bussonnier
@Carreau
Apr 23 2015 19:03
no, setuptools.
python 3.4 and 3.5 have imp deprecate that raise on python -W error
which is annoying to find what does raise warning whan importing ipython.html
so either I modify ipython to raise the warnings, fix setuptools, or learn more about warning and enable only on specific package (is that possible ?)
FYI trying rodeo.
Thomas Kluyver
@takluyver
Apr 23 2015 19:08
I think suppressing warnings is execution scoped, not code scoped, unfortunately
mean that in a mime bundle, the application/json key is optional, but if it exists, it is an object
but every other key is a string or list of strings?
Min RK
@minrk
Apr 23 2015 20:42
@jasongrout yes. JSON is not double-serialized.
Jason Grout
@jasongrout
Apr 23 2015 20:44
okay, that makes the typescript typing much trickier, since types of values depend on the keys.
does anyone actually use application/json?
it seems general enough that it may not actually be useful.
i.e., in a generic mime-bundle, how do you display an application/json value?
Min RK
@minrk
Apr 23 2015 20:46
People do use it for a few special cases. Typically for things like nbconvert or custom javascript.
But yes, the type does depend on the value of the key.
Jason Grout
@jasongrout
Apr 23 2015 21:12
I thought the text/plain mime type was guaranteed to exist in a mime bundle. Was I mistaken, or is it just not noted in the json schema?
Min RK
@minrk
Apr 23 2015 21:19
I honestly don't know how strong the guarantee is. IPython guarantees that it will send one. The notebook frontend probably has a couple assumptions that it's present, but I'm not sure that it does.
I think it's more of a SHOULD than a MUST
But I'd have to check - message spec and document implementations don't tend to enforce this; it's primarily a matter of assumptions made by consumers of the message spec or document format.
Jason Grout
@jasongrout
Apr 23 2015 21:35
Do we consolidate consecutive stream outputs that are the same stream in the notebook format (as an optimization, not necessarily as a rule)
Min RK
@minrk
Apr 23 2015 21:39
as an optimization, yes
it says it should never be written to a file. Does that mean the file representation won't have this key?
is the key optional?
Matthias Bussonnier
@Carreau
Apr 23 2015 23:27
@jasongrout it's only a in memory thing.
if the file is v3, and get to the fonrtned it tells you "this notebook as been automatically converted from <this key>"
Jason Grout
@jasongrout
Apr 23 2015 23:29
oh, hmm...
I thought the whole point of the format spec was to tell us what the format was, whether it was in json or on disk
is there a way to mark the key as optional in the json schema?
Matthias Bussonnier
@Carreau
Apr 23 2015 23:31
the scheme is valid for both in meme and on disk.
hence the "never written to file"
Jason Grout
@jasongrout
Apr 23 2015 23:32
maybe I'm not understanding the json schema. I thought if a key appeared there, unless explicitly marked, it was required.
the "never written to file" is a comment that the validator won't see, of course.