1. 24 May, 2015 1 commit
  2. 05 May, 2015 1 commit
  3. 04 May, 2015 21 commits
    • Release Manager's avatar
      Trac #18336: Give a default behavious to algebra_generators · e2669c82
      Release Manager authored
      Give a default behaviour to the method `algebra_generators` for
      `algebras_with_basis` by calling `basis()`.
      
      URL: http://trac.sagemath.org/18336
      Reported by: virmaux
      Ticket author(s): Aladin Virmaux
      Reviewer(s): Nicolas M. Thiéry
      e2669c82
    • Release Manager's avatar
      Trac #18334: sign and more truncation functions on real intervals · 1132345e
      Release Manager authored
      Real intervals are missing truncation functions:
      - `frac`
      - `trunc`
      - `round`
      - `unique_sign`
      - `unique_trunc`
      
      We also add some more documentation to truncation methods.
      
      see also: #18337
      
      URL: http://trac.sagemath.org/18334
      Reported by: vdelecroix
      Ticket author(s): Vincent Delecroix
      Reviewer(s): Jeroen Demeyer
      1132345e
    • Release Manager's avatar
      Trac #18332: is_one/is_integer/is_rational for number field elements · 4814692d
      Release Manager authored
      We add two methods `is_integer` and `is_rational` for number field
      elements.
      
      Currently, the only way to test this is to do duck typing
      {{{
      def is_integer(x):
          try:
              ZZ(x)
              return True
          except ValueError:
              return False
      }}}
      which is rather expensive compared to what can be done.
      
      URL: http://trac.sagemath.org/18332
      Reported by: vdelecroix
      Ticket author(s): Vincent Delecroix
      Reviewer(s): Marc Mezzarobba
      4814692d
    • Release Manager's avatar
      Trac #18278: Variable to non-integral power for integer polynomials (using Flint) is broken · d62d254c
      Release Manager authored
      Currently:
      
      {{{
      sage: R.<x> = ZZ[]
      sage: x^(1/2)
      1
      }}}
      
      I correct to
      {{{
      sage: R.<x> = ZZ[]
      sage: x^(1/2)
      Traceback (most recent call last):
      ...
      TypeError: non-integral exponents not supported
      }}}
      
      that is consistent with the results in other polynomial rings.
      
      URL: http://trac.sagemath.org/18278
      Reported by: bruno
      Ticket author(s): Bruno Grenet
      Reviewer(s): Jeroen Demeyer
      d62d254c
    • Release Manager's avatar
      Trac #18068: Fix and simplify comparison of modular forms · e8f3f06a
      Release Manager authored
      In Sage 6.6.rc1:
      {{{
      sage: f = Newforms(Gamma1(30), 2, names='a')[1]
      sage: g = loads(dumps(f))
      sage: f == g
      True
      sage: f != g
      True          # should be False
      }}}
      This is fixed by implementing `ModularForm_abstract.__ne__()`.
      
      We also remove the (partial) implementation of `__cmp__()` and replace
      it by `__eq__()` and `__ne__()`; this simplifies the code and
      anticipates the removal of `cmp()` in Python 3.
      
      URL: http://trac.sagemath.org/18068
      Reported by: pbruin
      Ticket author(s): Peter Bruin
      Reviewer(s): Vincent Delecroix
      e8f3f06a
    • Release Manager's avatar
      Trac #18301: ncurses fails to build with GCC 5.x · 27e29fde
      Release Manager authored
      {{{
      ...
      gcc-5.1 -DHAVE_CONFIG_H -I../ncurses -I../../ncurses -I. -I../include
      -I../../ncurses/../include -I/foo/sage-6.6-gcc-5.1.0/local/include
      -D_GNU_SOURCE -DNDEBUG -O2 --param max-inline-insns-single=1200 -fPIC -c
      ../ncurses/lib_gen.c -o ../obj_s/lib_gen.o
      In file included from ../../ncurses/curses.priv.h:321:0,
                       from ../ncurses/lib_gen.c:19:
      _3081.c:837:15: error: expected ')' before 'int'
      ../include/curses.h:1622:56: note: in definition of macro 'mouse_trafo'
       #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
                                                              ^
      Makefile:1323: recipe for target '../obj_s/lib_gen.o' failed
      make[1]: *** [../obj_s/lib_gen.o] Error 1
      make[1]: Leaving directory '/tmp/sage-build-
      tmp/ncurses-5.9.20131221/src/narrow/ncurses'
      Makefile:111: recipe for target 'all' failed
      make: *** [all] Error 2
      Error building ncurses (narrow).
      }}}
      
      (`build/pkgs/ncurses/patches/ncurses-5.9.20131221_work_around_broken_GNU
      _cpp_5.x.patch`, self-explanatory:)
      {{{
      #!patch
      Building ncurses with GCC 5.1 (or more precisely, with its 'cpp') fails
      with
      a syntax error, caused by earlier preprocessing.
      
      (I'm not entirely sure whether it's a GCC bug or rather caused by a new
      feature which breaks further processing with 'awk' and 'sed';  I *think*
      at least the 'awk' inline script "AW2" simply isn't prepared for the
      changed
      output of 'cpp' w.r.t. line directives [1].  Anyway, the patch fixes the
      issue.)
      
      [1] https://gcc.gnu.org/gcc-5/porting_to.html
      
      --- ncurses-5.9.20131221/ncurses/base/MKlib_gen.sh      2011-06-04
      21:14:08.000000000 +0200
      +++ ncurses-5.9.20131221/ncurses/base/MKlib_gen.sh      2015-04-26
      00:47:06.911680782 +0200
      @@ -62,7 +62,15 @@
       if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export
      LC_CTYPE;    fi
       if test "${LC_COLLATE+set}"  = set; then LC_COLLATE=C;  export
      LC_COLLATE;  fi
      
      -preprocessor="$1 -DNCURSES_INTERNALS -I../include"
      +# Work around "unexpected" output of GCC 5.1.0's cpp w.r.t. #line
      directives
      +# by simply suppressing them:
      +case `$1 -dumpversion 2>/dev/null` in
      +    5.[01].*)  # assume a "broken" one
      +        preprocessor="$1 -P -DNCURSES_INTERNALS -I../include"
      +        ;;
      +    *)
      +        preprocessor="$1 -DNCURSES_INTERNALS -I../include"
      +esac
       AWK="$2"
       USE="$3"
      
      }}}
      
      URL: http://trac.sagemath.org/18301
      Reported by: leif
      Ticket author(s): Leif Leonhardy
      Reviewer(s): Jean-Pierre Flori
      27e29fde
    • Vincent Delecroix's avatar
      Trac 18334: more doctests · 7fe18d6e
      Vincent Delecroix authored
      7fe18d6e
    • Bruno Grenet's avatar
      Doctests · 7d0bc5c9
      Bruno Grenet authored
      7d0bc5c9
    • Vincent Delecroix's avatar
      Trac 18334: fixed frac + doctests · 10067b57
      Vincent Delecroix authored
      10067b57
    • Peter Bruin's avatar
      Trac 18068: fix typo · 7b5e7029
      Peter Bruin authored
      7b5e7029
    • Peter Bruin's avatar
      451c49de
    • Bruno Grenet's avatar
      Remove try ... except · 02f6ee15
      Bruno Grenet authored
      02f6ee15
    • Bruno Grenet's avatar
      Use PyNumber_Index · 4ade279c
      Bruno Grenet authored
      4ade279c
    • Release Manager's avatar
      Trac #18355: Some cleanup in finance/stock · f9524278
      Release Manager authored
      This branch cleans that file a bit. It renames two functions (google()
      and yahoo()) into something more meaningful, moves exceptions around,
      adds some doc.
      
      Nathann
      
      URL: http://trac.sagemath.org/18355
      Reported by: ncohen
      Ticket author(s): Nathann Cohen
      Reviewer(s): Volker Braun
      f9524278
    • Release Manager's avatar
      Trac #18346: Easier handling of vertex labels in graph backends · 55ff16e9
      Release Manager authored
      This ticket addresses the following problem:
      
          In the `CGraph` backends, three `cdef` functions are used all the
      time to
          deal with vertex labels, i.e. `get_vertex`, `vertex_label`,
          `check_vertex`. They are always called with the same arguments,
      which are
          all attributes of the backend that calls it. They should be method,
      so that
          the arguments are not needlessly repeated.
      
      What this branch does:
      
      - The `CGraph` backends (i.e. `SparseBackend`, `DenseBackend` and
        `StaticSparseGraph`) and `GenericGraphBackend` are turned into cdef
      classes.
      
      - The three functions `get_vertex`, `vertex_label`, `check_vertex`
      become
        methods of `CGraphBackend`
      
      - It adds a method `CGraphBackend.c_graph()` to get the two cdef
      attributes
        `_cg` and `_cg_rev`. Turns out that some code in Sage accesses
      directly
        `G._backend._cg`.
      
      This should have been sufficient, but there were (unexpected)
      consequences:
      
      - There is no automatic pickling for cdef classes (as instrospection
      does not
        work), and the doctests do not pass if that does not work.
      Consequently, I
        implemented a unique `__reduce__` function in `GenericGraphBackend`
      which
        handles the pickling for all backends (sparse/dense/static/networkx).
      It also
        removes some duplicated code as a result.
      
      This makes the code a bit clearer (and it is needed). Also, moving this
      pickling
      function above is good for the future, for there will be many
      modifications in
      the future to the data structures in Sage: I plan to merge `CGraph` and
      `GenericBackend` into only one class (but that's for later).
      
      Nathann
      
      P.S.: The branch is built to be reviewed commit by commit. In
      particular, the renamed file appears as trivial when looking at the
      first commit, but as a lot of + and - when looking at the branch's diff
      
      URL: http://trac.sagemath.org/18346
      Reported by: ncohen
      Ticket author(s): Nathann Cohen
      Reviewer(s): Vincent Delecroix
      55ff16e9
    • Release Manager's avatar
      Trac #18340: PARI/GP does not gracefully handle out-of-memory · da5382f2
      Release Manager authored
      The following will eat all your memory:
      {{{
      $ ( ulimit -s unlimited; ./sage -t --long
      src/sage/schemes/elliptic_curves/lseries_ell.py )
      }}}
      This sets the stack size to "unlimited". The `gp` process which is
      executed by this doctest will then use a very large amount of memory.
      
      This happens in particular with GNU `make` < 3.82 due to
      [https://savannah.gnu.org/bugs/?22010]
      
      This can be solved by upgrading PARI/GP.
      
      '''Upstream''': [http://boxen.math.washington.edu/home/jdemeyer/spkg/par
      i-2.8-1545-gd04cdd3.tar.gz]
      
      ----------
      
      See https://groups.google.com/d/topic/sage-devel/ydDfHsCxpAc/discussion
      
      (Older) Thread on sage-release:
      [http://thread.gmane.org/gmane.comp.mathematics.sage.release/2757]
      
      URL: http://trac.sagemath.org/18340
      Reported by: novoselt
      Ticket author(s): Jeroen Demeyer
      Reviewer(s): Vincent Delecroix, John Cremona, Leif Leonhardy
      da5382f2
    • Release Manager's avatar
      Trac #18293: libgd fails to build on Archlinux · a62a4704
      Release Manager authored
      Update libgd to 2.1.1 and add patch to fix build error (log attached).
      
      https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.1.tar.bz2
      
      URL: http://trac.sagemath.org/18293
      Reported by: aapitzsch
      Ticket author(s): André Apitzsch
      Reviewer(s): Volker Braun
      a62a4704
    • Jeroen Demeyer's avatar
      Remove mention of get_fltk.patch · 52498094
      Jeroen Demeyer authored
      52498094
    • Nathann Cohen's avatar
      trac #18346; Broken doctest · 6ffbb059
      Nathann Cohen authored
      6ffbb059
    • Nathann Cohen's avatar
      trac #18346: Merge with #18317 · 2caff2f7
      Nathann Cohen authored
      2caff2f7
    • Nathann Cohen's avatar
      trac #18355: Broken doctest · e685dcd2
      Nathann Cohen authored
      e685dcd2
  4. 03 May, 2015 17 commits