##// END OF EJS Templates
don't write orig_nbformat to disk in v3
Min RK -
Show More
@@ -56,8 +56,12 b' class JSONWriter(NotebookWriter):'
56 kwargs['indent'] = 1
56 kwargs['indent'] = 1
57 kwargs['sort_keys'] = True
57 kwargs['sort_keys'] = True
58 kwargs['separators'] = (',',': ')
58 kwargs['separators'] = (',',': ')
59 nb = copy.deepcopy(nb)
60 # don't write transient values to disk
61 for key in ('orig_nbformat', 'orig_nbformat_minor'):
62 nb.pop(key, None)
59 if kwargs.pop('split_lines', True):
63 if kwargs.pop('split_lines', True):
60 nb = split_lines(copy.deepcopy(nb))
64 nb = split_lines(nb)
61 return py3compat.str_to_unicode(json.dumps(nb, **kwargs), 'utf-8')
65 return py3compat.str_to_unicode(json.dumps(nb, **kwargs), 'utf-8')
62
66
63
67
General Comments 0
You need to be logged in to leave comments. Login now