#11080: move notebook to flask/wsgi-based notebook
--------------------------------------------------+-------------------------
Reporter: jason | Owner: jason,
mpatel, was
Type: enhancement | Status: needs_info
Priority: blocker | Milestone: sage-5.0
Component: notebook | Keywords: sd31
sd35.5
Work_issues: | Upstream: N/A
Reviewer: Rado Kirov, Dan Drake, Jason Grout | Author: Mike
Hansen, Rado Kirov, William Stein, Jason Grout
Merged: | Dependencies: #11078,
#11874, #12229, #11503, #12327
--------------------------------------------------+-------------------------
Comment(by strogdon):
I have a question about the following chunk of code
{{{
try:
# simplejson is faster, so try to import it first
import simplejson as json
except ImportError:
import json
}}}
in sagenb/notebook/misc.py. It would seem that Sage is not shipped with
simplejson. In testing the flask notebook on sage-on-gentoo the
sagenb/notebook/misc.py test is the only failing notebook test because
simplejson, which is pulled in by werkzeug as a runtime dependency, is
found. The failure, roughly, is
{{{
sage -t -long -force_lib /storage/strogdon/gentoo/usr/lib/python2.7/site-
packages/sagenb/notebook/misc.py
**********************************************************************
File "/storage/strogdon/gentoo/usr/lib/python2.7/site-
packages/sagenb/notebook/misc.py", line 221:
sage: print encode_response(d, separators = (', ', ': '), indent = 4)
Exception raised:
Traceback (most recent call last):
...
File "element.pyx", line 1305, in
sage.structure.element.RingElement.__add__
(sage/structure/element.c:11569)
File "coerce.pyx", line 797, in
sage.structure.coerce.CoercionModel_cache_maps.bin_op
(sage/structure/coerce.c:7467)
TypeError: unsupported operand parent(s) for '+': '<type 'str'>' and
'Integer Ring'
**********************************************************************
}}}
If I remove the conditional the test passes. So, the question is, is the
conditional reference to simplejson needed? Of course, the s-o-g flask
notebook can always be patched.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11080#comment:114>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.