#6505: [with patch, needs review] Sage banner: include warning if a prerelease
-------------------------+--------------------------------------------------
Reporter: jhpalmieri | Owner: jhpalmieri
Type: enhancement | Status: new
Priority: trivial | Milestone: sage-4.1.1
Component: misc | Keywords:
Reviewer: | Author: John Palmieri
Merged: |
-------------------------+--------------------------------------------------
Comment(by ddrake):
This patch looks good, but I did try to use {{{-sdist}}} and am having
some problems. I'm not sure if the problem is with the patch or with my
use of -sdist. (Almost certainly the latter!)
I compiled a source tarball (4.1.rc1), applied the patch (with mq), did a
qfinish to get the patch into the regular history, and then tried
{{{./sage -sdist 4.1.rc2}}} to try and make a fictional rc2 to see if,
after compiling, I got the correct banner.
The sdist script spit out some strange errors, but did create a tarball.
I'm compiling that tarball now, but local/bin/sage-banner is an empty
file!
Also, doing an sdist leaves behind a zombie tree: it looks like it's
there, but if you try to run Sage, it doesn't work. This is because of
#1065 (!) but even if I do a {{{sage -b}}}, when I rerun Sage, I don't get
a banner...which is worrisome since that's what this ticket is about.
I do notice that when I try to emulate the {{{sage-sdist}}} script and run
the line that sets the banner, this happens. This is from a "{{{sage
-sh}}}" shell:
{{{
[email protected]:/scratch/drake/sage-4.1.rc1/local/bin$ echo "import
sage.misc.banner; sage.misc.banner.banner()" | ./python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/scratch/drake/sage-4.1.rc1/local/lib/python2.6/site-
packages/sage/misc/banner.py", line 95, in banner
print banner_text()
File "/scratch/drake/sage-4.1.rc1/local/lib/python2.6/site-
packages/sage/misc/banner.py", line 68, in banner_text
pre = version_dict()['prerelease']
File "/scratch/drake/sage-4.1.rc1/local/lib/python2.6/site-
packages/sage/misc/banner.py", line 136, in version_dict
from sage.rings.integer import Integer
File "integer.pyx", line 156, in sage.rings.integer
(sage/rings/integer.c:31017)
File "/scratch/drake/sage-4.1.rc1/local/lib/python2.6/site-
packages/sage/rings/infinity.py", line 200, in <module>
import sage.rings.rational
File "rational.pyx", line 70, in sage.rings.rational
(sage/rings/rational.c:23686)
File "real_mpfr.pyx", line 1, in sage.rings.real_mpfr
(sage/rings/real_mpfr.c:29109)
File "complex_number.pxd", line 8, in sage.libs.mpmath.utils
(sage/libs/mpmath/utils.c:5273)
File "complex_double.pxd", line 13, in sage.rings.complex_number
(sage/rings/complex_number.c:14050)
File "complex_double.pyx", line 88, in sage.rings.complex_double
(sage/rings/complex_double.c:13486)
File "/scratch/drake/sage-4.1.rc1/local/lib/python2.6/site-
packages/sage/rings/complex_field.py", line 86, in ComplexField
C = ComplexField_class(prec)
File "/scratch/drake/sage-4.1.rc1/local/lib/python2.6/site-
packages/sage/rings/complex_field.py", line 175, in __init__
ParentWithGens.__init__(self, self._real_field(), ('I',), False)
File "/scratch/drake/sage-4.1.rc1/local/lib/python2.6/site-
packages/sage/rings/complex_field.py", line 228, in _real_field
self.__real_field = real_mpfr.RealField_constructor(self._prec)
File "real_mpfr.pyx", line 244, in
sage.rings.real_mpfr.RealField_constructor (sage/rings/real_mpfr.c:3853)
TypeError: 'NoneType' object is unsubscriptable
}}}
Looks like something fishy in the bit of code that makes the version
dictionary. I'll look at this more later, if no one beats to me. BTW, this
did pass doctests, so either something is really goofy about the
environment above, or we a fix and a new doctest.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6505#comment:6>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---