Permalink
Browse files

Update patches to Sage 5.7.beta4

  • Loading branch information...
1 parent e1da547 commit fc9b749236e8d120c7a391ed61ffa85918e5e602 Jason Grout committed Feb 14, 2013
Showing with 30 additions and 30 deletions.
  1. +13 −13 sage-patches/01-sage-embedded.patch
  2. +11 −11 sage-patches/02-sage-show.patch
  3. +6 −6 sage-patches/sagecell2.patch
@@ -2,7 +2,7 @@
# User Jason Grout <jason.grout@drake.edu>
# Date 1309542233 18000
# Node ID 4897dc1aa08855a8fa8672e4c831e05d35af0dc7
-# Parent 9b6226228a70e625deecd9698e33afeda37d946c
+# Parent ca877a1fdc06f49f74e422f648ed5c05fea1a570
imported patch embedded.patch
diff --git a/sage/databases/sql_db.py b/sage/databases/sql_db.py
@@ -46,7 +46,7 @@ diff --git a/sage/databases/sql_db.py b/sage/databases/sql_db.py
+ return ' '.join(cur_str)
- from sage.server.support import EMBEDDED_MODE
-- if EMBEDDED_MODE or (kwds.has_key('html_table') and kwds['html_table']):
+- if EMBEDDED_MODE or ('html_table' in kwds and kwds['html_table']):
+ import sage.misc.misc as misc
+ if misc.EMBEDDED_MODE or (kwds.has_key('html_table') and kwds['html_table']):
# Notebook Version
@@ -332,7 +332,7 @@ diff --git a/sage/misc/latex.py b/sage/misc/latex.py
from sage.misc.sage_ostools import have_program
from sage.misc.cachefunc import cached_function, cached_method
-@@ -238,10 +237,10 @@
+@@ -245,10 +244,10 @@
TESTS::
@@ -345,7 +345,7 @@ diff --git a/sage/misc/latex.py b/sage/misc/latex.py
"""
if EMBEDDED_MODE:
return "{\\rm %s}"%x
-@@ -1997,14 +1996,14 @@
+@@ -2063,14 +2062,14 @@
EXAMPLES::
@@ -362,7 +362,7 @@ diff --git a/sage/misc/latex.py b/sage/misc/latex.py
TESTS::
-@@ -2022,7 +2021,7 @@
+@@ -2088,7 +2087,7 @@
Traceback (most recent call last):
...
ValueError: Unsupported LaTeX engine.
@@ -371,7 +371,7 @@ diff --git a/sage/misc/latex.py b/sage/misc/latex.py
sage: view(4, engine="garbage", viewer="pdf")
Traceback (most recent call last):
...
-@@ -2249,14 +2248,14 @@
+@@ -2323,14 +2322,14 @@
sage: sage.misc.latex.print_or_typeset(3)
3
@@ -391,7 +391,7 @@ diff --git a/sage/misc/latex.py b/sage/misc/latex.py
diff --git a/sage/misc/misc.py b/sage/misc/misc.py
--- a/sage/misc/misc.py
+++ b/sage/misc/misc.py
-@@ -51,6 +51,13 @@
+@@ -52,6 +52,13 @@
LOCAL_IDENTIFIER = '%s.%s'%(HOSTNAME , os.getpid())
@@ -405,7 +405,7 @@ diff --git a/sage/misc/misc.py b/sage/misc/misc.py
def sage_makedirs(dir):
"""
Python version of ``mkdir -p``: try to create a directory, and also
-@@ -2086,19 +2093,6 @@
+@@ -2115,19 +2122,6 @@
"""
return "0"*(size-len(str(s))) + str(s)
@@ -454,15 +454,15 @@ diff --git a/sage/misc/sagedoc.py b/sage/misc/sagedoc.py
from sagenb.misc.sphinxify import sphinxify
import sage.version
-@@ -818,7 +818,6 @@
+@@ -821,7 +821,6 @@
if not interact:
return results
- from sage.server.support import EMBEDDED_MODE
if EMBEDDED_MODE: # I.e., running from the notebook
if multiline: # insert the colons that format_search_as_html expects
results = ":\n".join(results.splitlines()) + ":"
-@@ -1380,7 +1379,6 @@
+@@ -1383,7 +1382,6 @@
if testing:
return (url, path)
@@ -481,7 +481,7 @@ diff --git a/sage/misc/sageinspect.py b/sage/misc/sageinspect.py
def isclassinstance(obj):
r"""
-@@ -1147,7 +1146,8 @@
+@@ -1384,7 +1383,8 @@
# sometimes s contains "*args" or "**keywds", and the
# asterisks confuse ReST/sphinx/docutils, so escape them:
# change * to \*, and change ** to \**.
@@ -491,7 +491,7 @@ diff --git a/sage/misc/sageinspect.py b/sage/misc/sageinspect.py
s = s.replace('**', '\\**') # replace ** with \**
t = ''
while True: # replace * with \*
-@@ -1264,13 +1264,14 @@
+@@ -1501,13 +1501,14 @@
- extensions by Nick Alexander
"""
import sage.misc.sagedoc
@@ -581,7 +581,7 @@ diff --git a/sage/plot/animate.py b/sage/plot/animate.py
diff --git a/sage/plot/plot.py b/sage/plot/plot.py
--- a/sage/plot/plot.py
+++ b/sage/plot/plot.py
-@@ -348,7 +348,7 @@
+@@ -352,7 +352,7 @@
## going to be used.
#DEFAULT_FIGSIZE=(6, 3.70820393249937)
@@ -2,7 +2,7 @@
# User Jason Grout <jason.grout@drake.edu>
# Date 1311809242 25200
# Node ID f67d7039d959b56d5b611b5979375b95dbe69398
-# Parent b4e0f1381e3b2d03ba71563e8745393f161f052d
+# Parent 0ecbbafefee2a58bfa776410b1788e38612f6a3b
[mq]: show.patch
diff --git a/sage/misc/html.py b/sage/misc/html.py
@@ -90,7 +90,7 @@ diff --git a/sage/misc/html.py b/sage/misc/html.py
diff --git a/sage/misc/latex.py b/sage/misc/latex.py
--- a/sage/misc/latex.py
+++ b/sage/misc/latex.py
-@@ -2039,7 +2039,8 @@
+@@ -2105,7 +2105,8 @@
if pdflatex or (viewer == "pdf" and engine == "latex"):
engine = "pdflatex"
# notebook
@@ -100,7 +100,7 @@ diff --git a/sage/misc/latex.py b/sage/misc/latex.py
MathJax_okay = True
for t in latex.mathjax_avoid_list():
if s.find(t) != -1:
-@@ -2047,14 +2048,28 @@
+@@ -2113,14 +2114,28 @@
if not MathJax_okay:
break
if MathJax_okay: # put comma at end of line below?
@@ -147,7 +147,7 @@ diff --git a/sage/plot/animate.py b/sage/plot/animate.py
raise OSError, msg
else:
if not savefile:
-- savefile = sage.misc.misc.graphics_filename(ext='gif')
+- savefile = sage.misc.temporary_file.graphics_filename(ext='gif')
+ savefile = graphics_filename(ext='gif')
if not savefile.endswith('.gif'):
savefile += '.gif'
@@ -172,15 +172,15 @@ diff --git a/sage/plot/animate.py b/sage/plot/animate.py
if not savefile:
if output_format is None:
output_format = 'mpg'
-- savefile = sage.misc.misc.graphics_filename(ext=output_format)
+- savefile = sage.misc.temporary_file.graphics_filename(ext=output_format)
+ savefile = graphics_filename(ext=output_format)
else:
if output_format is None:
suffix = os.path.splitext(savefile)[1]
diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
--- a/sage/plot/graphics.py
+++ b/sage/plot/graphics.py
-@@ -1727,17 +1727,27 @@
+@@ -1754,17 +1754,27 @@
# This option should not be passed on to save().
linkmode = kwds.pop('linkmode', False)
@@ -213,7 +213,7 @@ diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
else:
kwds.setdefault('filename', tmp_filename(ext='.png'))
self.save(**kwds)
-@@ -2567,42 +2577,47 @@
+@@ -2607,42 +2617,47 @@
options.update(kwds)
dpi = options.pop('dpi')
transparent = options.pop('transparent')
@@ -290,7 +290,7 @@ diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
class GraphicsArray(SageObject):
-@@ -2962,11 +2977,18 @@
+@@ -3002,11 +3017,18 @@
self.save(DOCTEST_MODE_FILE,
dpi=dpi, figsize=self._figsize, axes = axes, **args)
return
@@ -311,11 +311,11 @@ diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
- filename = tmp_filename(ext='.png')
self._render(filename, dpi=dpi, figsize=self._figsize, axes = axes, **args)
os.system('%s %s 2>/dev/null 1>/dev/null &'%(
- sage.misc.viewer.browser(), filename))
+ sage.misc.viewer.png_viewer(), filename))
diff --git a/sage/plot/plot.py b/sage/plot/plot.py
--- a/sage/plot/plot.py
+++ b/sage/plot/plot.py
-@@ -348,7 +348,6 @@
+@@ -352,7 +352,6 @@
## going to be used.
#DEFAULT_FIGSIZE=(6, 3.70820393249937)
@@ -353,7 +353,7 @@ diff --git a/sage/plot/plot3d/base.pyx b/sage/plot/plot3d/base.pyx
+ sys._sage_messages.message_queue.display(msg)
+
import sage.misc.viewer
- viewer_app = sage.misc.viewer.browser()
+ viewer_app = sage.misc.viewer.png_viewer()
@@ -1129,19 +1139,29 @@
T.export_jmol(archive_name, force_reload=EMBEDDED_MODE, zoom=zoom*100, **kwds)
@@ -1,6 +1,6 @@
# HG changeset patch
# User Jason Grout <jason.grout@drake.edu>
-# Parent 24840dd9f5ffd6e1afd48909aa550b2e91c61a14
+# Parent 50e5b9945b4898388c742c901fca2a17799bece5
Changes for Sage Cell Server 2.0
diff --git a/sage/misc/html.py b/sage/misc/html.py
@@ -27,7 +27,7 @@ diff --git a/sage/misc/html.py b/sage/misc/html.py
diff --git a/sage/misc/latex.py b/sage/misc/latex.py
--- a/sage/misc/latex.py
+++ b/sage/misc/latex.py
-@@ -2052,7 +2052,7 @@
+@@ -2118,7 +2118,7 @@
if misc.EMBEDDED_MODE['frontend']=='sagecell':
mathexpr=mathjax_expr.replace('<html>','').replace('</html>','')
import sys
@@ -36,7 +36,7 @@ diff --git a/sage/misc/latex.py b/sage/misc/latex.py
else:
print mathjax_expr
else:
-@@ -2063,11 +2063,7 @@
+@@ -2129,11 +2129,7 @@
debug=debug, engine=engine)
if misc.EMBEDDED_MODE['frontend']=='sagecell':
import sys
@@ -70,7 +70,7 @@ diff --git a/sage/plot/animate.py b/sage/plot/animate.py
diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
--- a/sage/plot/graphics.py
+++ b/sage/plot/graphics.py
-@@ -1734,18 +1734,17 @@
+@@ -1761,18 +1761,17 @@
kwds.setdefault('filename', graphics_filename())
filename=kwds['filename']
self.save(**kwds)
@@ -94,7 +94,7 @@ diff --git a/sage/plot/graphics.py b/sage/plot/graphics.py
else:
html("<img src='cell://%s'>"%filename)
else:
-@@ -2982,12 +2981,10 @@
+@@ -3022,12 +3021,10 @@
if sage.misc.misc.EMBEDDED_MODE:
self.save(filename, dpi=dpi, figsize=self._figsize, axes = axes, **args)
if sage.misc.misc.EMBEDDED_MODE['frontend']=='sagecell':
@@ -128,7 +128,7 @@ diff --git a/sage/plot/plot3d/base.pyx b/sage/plot/plot3d/base.pyx
+ sys._sage_.sent_files[filename_full] = os.path.getmtime(filename_full)
import sage.misc.viewer
- viewer_app = sage.misc.viewer.browser()
+ viewer_app = sage.misc.viewer.png_viewer()
@@ -1140,13 +1137,9 @@
viewer_app = os.path.join(sage.misc.misc.SAGE_LOCAL, "bin/jmol")

0 comments on commit fc9b749

Please sign in to comment.