1. 08 Apr, 2019 2 commits
  2. 07 Apr, 2019 1 commit
  3. 05 Apr, 2019 5 commits
    • Release Manager's avatar
      Trac #27604: Topcom and Python 3 · 72ab0070
      Release Manager authored
      With Python 3 and the `topcom` package installed:
      sage: PointConfiguration.set_engine('internal')
      AssertionError                            Traceback (most recent call
      <ipython-input-1-ff863e4c078c> in <module>()
      ----> 1 PointConfiguration.set_engine('internal')
      packages/sage/geometry/triangulation/point_configuration.py in
      set_engine(cls, engine)
          394             raise ValueError('Unknown value for "engine":
      --> 396         have_TOPCOM = PointConfiguration._have_TOPCOM()
          397         PointConfiguration._use_TOPCOM = \
          398             (engine == 'topcom') or (engine == 'auto' and
      packages/sage/geometry/triangulation/point_configuration.py in
          287         try:
          288             out =
      --> 289
      '[[0,1],[1,1]]', verbose=False))
          290             PointConfiguration._have_TOPCOM_cached = True
          291             assert out=='{{0,1}}',\
      packages/sage/geometry/triangulation/point_configuration.py in
      _TOPCOM_exec(cls, executable, input_string, verbose)
          628         proc.expect(r'\.\.\. done\.')
          629         proc.setecho(0)
      --> 630         assert proc.readline().strip() == ''
          632         if verbose:
      `proc.readline().strip()` actually equals `b''`, so we should compare to
      that instead. There is another similar string comparison that needs
      URL: https://trac.sagemath.org/27604
      Reported by: jhpalmieri
      Ticket author(s): John Palmieri
      Reviewer(s): François Bissey
    • Release Manager's avatar
      Trac #27533: Improve Polyhedron.is_simple() · 1d51f5fa
      Release Manager authored
      The method `Polyhedron.is_simple` is pretty slow for large polytopes at
      the moment. There is no need for that, as the information can be
      directly retrieved from the `Vrepresentation`.
      Current timings:
      sage: P = polytopes.hypercube(6)
      sage: %time P.is_simple()
      CPU times: user 360 ms, sys: 8 ms, total: 368 ms
      Wall time: 364 ms
      sage: P = polytopes.hypercube(7)
      sage: %time P.is_simple()
      CPU times: user 1.78 s, sys: 48 ms, total: 1.83 s
      Wall time: 1.74 s
      sage: P = polytopes.cross_polytope(7)
      sage: %time P.is_simple()
      CPU times: user 996 ms, sys: 0 ns, total: 996 ms
      Wall time: 992 ms
      Timings with this ticket:
      sage: P = polytopes.hypercube(6)
      sage: %time P.is_simple()
      CPU times: user 4 ms, sys: 4 ms, total: 8 ms
      Wall time: 3.53 ms
      sage: P = polytopes.hypercube(7)
      sage: %time P.is_simple()
      CPU times: user 4 ms, sys: 4 ms, total: 8 ms
      Wall time: 5.39 ms
      sage: P = polytopes.cross_polytope(7)
      sage: %time P.is_simple()
      CPU times: user 8 ms, sys: 0 ns, total: 8 ms
      Wall time: 5.63 ms
      sage: P = polytopes.permutahedron(4)
      sage: %time P.is_simple()
      CPU times: user 0 ns, sys: 0 ns, total: 0 ns
      Wall time: 1.03 ms
      URL: https://trac.sagemath.org/27533
      Reported by: gh-kliem
      Ticket author(s): Jonathan Kliem
      Reviewer(s): Laith Rastanawi
    • Release Manager's avatar
      Trac #27602: lazy import ssmod.py · efd6ffe2
      Release Manager authored
      plus some small changes inside that file
      URL: https://trac.sagemath.org/27602
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
    • Release Manager's avatar
      Trac #25532: Upgrade to NTL 11.3.2 · c0b82d83
      Release Manager authored
      - Download page: http://www.shoup.net/ntl/download.html
      - Tarball: https://www.shoup.net/ntl/ntl-11.3.2.tar.gz
      The last upgrade in Sage was to NTL 10.3.0 in ticket #22869.
      URL: https://trac.sagemath.org/25532
      Reported by: slelievre
      Ticket author(s): Timo Kaufmann, François Bissey
      Reviewer(s): Dima Pasechnik, Volker Braun, Travis Scrimshaw, Erik Bray
    • John H. Palmieri's avatar
      trac 27604: fix topcom + Python 3 · 73b304c4
      John H. Palmieri authored
  4. 04 Apr, 2019 8 commits
    • Frédéric Chapoton's avatar
      lazy import ssmod.py · 8b849852
      Frédéric Chapoton authored
    • Release Manager's avatar
      Trac #27493: Cygwin: OpenBLAS doesn't read environment variables properly · cc8b0b77
      Release Manager authored
      In Sage we currently, by default, disable multithreading in OpenBLAS by
      setting `OPENBLAS_NUM_THREADS=1` in `sage-env`.
      While this is not ideal, it does reduce the likelihood of multithreading
      issues coming up in contexts where it wasn't explicitly requested.
      While investigating #27434, I found that there is a subtle and
      apparently rare bug in OpenBLAS's multithreading on Windows, which was
      causing the docbuild to hang, particularly while building the plot3d
      docs (which happen to exercise this area of the code more than anything
      else in Sage).
      It occurred to me, however, that the docbuild should not be exhibiting
      the bug since we set `OPENBLAS_NUM_THREADS=1`.  It turns out this is due
      to a bug in OpenBLAS on Cygwin, fixed by the attached patch.
      I'm setting this to "critical" since it would be very good to have this
      fixed for the buildbot.  I think this bug has been affecting Cygwin for
      a long time, but I could never nail down why.  Nevertheless since we
      have lived with this bug thus far I won't consider it a blocker.
      **Upstream PR:** https://github.com/xianyi/OpenBLAS/pull/2060
      URL: https://trac.sagemath.org/27493
      Reported by: embray
      Ticket author(s): Erik Bray
      Reviewer(s): Volker Braun
    • Release Manager's avatar
      Trac #27601: Customizing simplifications in symbolic calculus on manifolds · f85474a4
      Release Manager authored
      Currently the end user has no direct control of the simplification
      algorithm used in coordinate calculus on manifolds. For instance, if the
      manifold is real and the coordinate calculus method is Sage's default
      symbolic engine (SR), the simplifying function is
      simplify_chain_real]. This function is quite exhaustive (similar to
      `simplify_full()`) but since it is invoked at each elementary step of a
      calculation, the computation can be quite slow. In some cases, it would
      be desirable to use a lighter simplifying function. See for instance
      [https://ask.sagemath.org/question/45959/grad-at-glacial-speed/ this
      ask.sagemath question].
      This ticket proposes some interface for passing any user-defined
      simplifying function. As an example, let us perform the addition of two
      scalar fields on a 2-dimensional real smooth manifold:
      sage: M = Manifold(2, 'M')
      sage: X.<x,y> = M.chart()
      sage: f = M.scalar_field(cos(x)^2)
      sage: g = M.scalar_field(sin(x)^2)
      sage: s = f + g
      Thanks to the use of `simplify_chain_real` in the `_add_` operator, the
      result is automatically simplified:
      sage: s.display()
      M --> R
      (x, y) |--> 1
      With the code indroduce in this ticket, one can replace
      `simplify_chain_real` by any function, for instance Sage's `simplify`:
      sage: M.set_simplify_function(simplify)
      sage: s = f + g
      sage: s.display()
      M --> R
      (x, y) |--> cos(x)^2 + sin(x)^2
      As we can see, the capabilities of `simplify` are quite limited! Let us
      replace it by a user-defined function:
      sage: def simpl(expr):
      ....:     return expr.simplify_trig()
      sage: M.set_simplify_function(simpl)
      sage: s = f + g
      sage: s.display()
      M --> R
      (x, y) |--> 1
      For more flexibility, it is possible to provide a different simplifying
      function for each chart on the manifold, via
      sage: X.calculcus_method().set_simplify_function(simpl)
      Besides, this ticket improves the documentation and functionalities of
      the class
      ulus_method.html CalculusMethod], which governs the various symbolic
      backends available on manifolds (SR and !SymPy at the moment).
      URL: https://trac.sagemath.org/27601
      Reported by: egourgoulhon
      Ticket author(s): Eric Gourgoulhon
      Reviewer(s): Travis Scrimshaw
    • Release Manager's avatar
      Trac #27600: Adding parameter by_weight in min_spanning_tree() · 15914c66
      Release Manager authored
      Like in shortest_path we have parameters by_weight and weight_function
      to use the edge weights.
      But in min_spanning_tree we first have to do g.is_weighted(True) which
      is clearly an extra step to do.
      This ticket aims at unifying the usage of weights by introducing
      by_weight parameter in min_spanning_tree, if True, the edges in the
      graph will be weighted, otherwise all edges will have weight 1.
      URL: https://trac.sagemath.org/27600
      Reported by: gh-rajat1433
      Ticket author(s): Rajat Mittal
      Reviewer(s): David Coudert
    • Release Manager's avatar
      Trac #27572: fix some comparisons to True, False and None · f745485b
      Release Manager authored
      URL: https://trac.sagemath.org/27572
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Jeroen Demeyer, Travis Scrimshaw
    • Release Manager's avatar
      Trac #27569: Unicode issue with modular polynomials database · 6b1023a7
      Release Manager authored
      sage: MP = AtkinModularPolynomialDatabase()
      sage: MP[3]
      UnicodeDecodeError                        Traceback (most recent call
      <ipython-input-29-920f2702531e> in <module>()
      ----> 1 MP[Integer(3)]
      packages/sage/databases/db_modular_polynomials.py in __getitem__(self,
          156                 raise TypeError("Argument level (= %s) must be
          157         modpol = self._dbpath(level)
      --> 158         coeff_list = _dbz_to_integer_list(modpol)
          159         if self.model == "Cls":
          160             P = PolynomialRing(IntegerRing(),2,"j")
      packages/sage/databases/db_modular_polynomials.py in
           65     """
           66     from sage.rings.integer import Integer
      ---> 67     data = _dbz_to_string(name)
           68     return [[Integer(v) for v in row.strip().split(" ")]
           69             for row in data.split("\n")[:-1]]
      packages/sage/databases/db_modular_polynomials.py in
           41         raise LookupError("filename {} does not
      ---> 43     data = bz2.decompress(f.read())
           45     return data
      /home/kedlaya/sage/local/lib/python3.6/codecs.py in decode(self, input,
          319         # decode input (taking the buffer into account)
          320         data = self.buffer + input
      --> 321         (result, consumed) = self._buffer_decode(data,
      self.errors, final)
          322         # keep undecoded input until the next call
          323         self.buffer = data[consumed:]
      UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 13:
      invalid start byte
      URL: https://trac.sagemath.org/27569
      Reported by: kedlaya
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Kiran Kedlaya
    • Release Manager's avatar
      Trac #27542: FindStat, unicode and rational numbers · d2db4954
      Release Manager authored
      As it turns out, #27346 actually broke the FindStat interface.  We now
      sage: findstat(914)                                          # optional
      -- internet
      <repr(<__main__.FindStatStatistic at 0x7fbc3dc1ec10>) failed:
      UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in
      position 30: ordinal not in range(128)>
      The reason is the following change, which was made for py3
      @ -966,9 +967,9 @@ class FindStatStatistic(SageObject):
      -        self._description           =
      -        self._name                  =
      -        self._references            =
      +        self._description           =
      +        self._name                  =
      +        self._references            =
               self._collection            =
               self._code                  =
               self._sage_code             =
      @@ -1044,7 +1045,7 @@ class FindStatStatistic(SageObject):
               stat_str = "\n".join(["\n".join(keys) + "\n====> " + values for
      (keys, values) in stat])
               verbose("Sending the following data to FindStat\r\n %s" %
      stat_str, caller_name='FindStat')
      -        values = urlencode({"freedata": stat_str, "depth":
      str(self._depth), "caller": "Sage"})
      +        values = urlencode({"freedata": stat_str, "depth":
      str(self._depth), "caller": "Sage"}).encode("utf-8")
               verbose("Fetching URL %s with encoded data %s" % (url, values),
      It went unnoticed, because the doctests were marked `# random`...
      Another problem is that rational numbers can be interpreted as lists,
      which confuses the interface.  For example,
      sage: findstat([(la, la[0]/1) for la in Partitions(10)], depth=0)
      fails with the cryptic message that there are more values than elements.
      URL: https://trac.sagemath.org/27542
      Reported by: mantepse
      Ticket author(s): Martin Rubey
      Reviewer(s): Christian Stump
    • Rajat Mittal's avatar
      removed list · 9506749f
      Rajat Mittal authored
  5. 03 Apr, 2019 10 commits
  6. 02 Apr, 2019 11 commits
    • Release Manager's avatar
      Trac #27590: fixing various details in elliptic curves · 57a98c64
      Release Manager authored
      including some lgtm warnings
      URL: https://trac.sagemath.org/27590
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): John Cremona
    • Release Manager's avatar
      Trac #27585: py3: fixes in matrices · 6403e7ce
      Release Manager authored
      This fixes a few doctests for sage.matrices:
      - there is some randomness in the ordering in one small part of one
      verbose test in `compute_J_ideal.py`, so replace it with `...`
      - up to now, `mat[range(3), range(4)]` did not work, so I've tried to
      modify `__getitem__` and `__setitem__` to allow `range` types as inputs
      - some doctests use random matrices to test other features. The
      randomness differs on Python 2 vs. Python 3, so get rid of the
      randomness. The tests still test the relevant methods (which are
      determinants, for example, not the randomness).
      - there is minor numerical noise in one doctest.
      URL: https://trac.sagemath.org/27585
      Reported by: jhpalmieri
      Ticket author(s): John Palmieri
      Reviewer(s): Vincent Klein
    • Release Manager's avatar
      Trac #27583: left and right key tableau of empty tableau · 92940e01
      Release Manager authored
      The left and right key tableau of the empty tableau should be the empty
      tableau, but currently raises an `IndexError`.
      URL: https://trac.sagemath.org/27583
      Reported by: mantepse
      Ticket author(s): Martin Rubey
      Reviewer(s): Nithish Saji
    • Release Manager's avatar
      Trac #27582: py3: fix bug in all_paths · c45f8a6e
      Release Manager authored
      With #27501, we introduced an error in `all_paths` for Python 3. Indeed,
      `my_dict.keys()` returns a list in Python 2 but it is an iterator in
      Python 3, so the following code breaks as the size of the dictionary
      change during iteration.
                      for u, v in my_dict.keys():
                          my_dict[v, u] = my_dict[u, v]
      We fix this issue using `list(my_dict.keys())`. On the way, we also
      rename `my_dict` to `edge_labels`.
      URL: https://trac.sagemath.org/27582
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Frédéric Chapoton
    • Release Manager's avatar
      Trac #27575: Three.js: Fix CDN Fallback · eac2a4d3
      Release Manager authored
      The Three.js viewer for notebooks already had a fallback to the online
      CDN when the local files are not loaded, which was silently failing.
      This small change fixes that.
      Renders [https://groups.google.com/forum/?nomobile=true#!topic/sage-
      devel/QC5-9rexyJo this discussion] moot.
      URL: https://trac.sagemath.org/27575
      Reported by: paulmasson
      Ticket author(s): Paul Masson
      Reviewer(s): Julian Rüth
    • Release Manager's avatar
      Trac #27568: Three.js: Consolidate Surface Code · e2af0518
      Release Manager authored
      For efficiency of future updates, the code for adding surfaces to scenes
      is consolidated in this commit. That way there will only be one function
      to adjust as needed. In fact part of this code will be changed when
      addressing #26718.
      URL: https://trac.sagemath.org/27568
      Reported by: paulmasson
      Ticket author(s): Paul Masson
      Reviewer(s): Eric Gourgoulhon
    • Release Manager's avatar
      Trac #27567: Add --with-system-<spkg> options to configure · ce655f36
      Release Manager authored
      As discussed in other tickets, such as #27373 and #26899, it would
      sometimes be useful to be able to explicitly specify, at configure-time,
      whether or not a system package can be used to fulfill some SPKG
      With the work being done for #27330, it is currently the case that if an
      SPKG has a `spkg-configure.m4`, and the checks performed for the system
      package succeed, then the system package will always be used whether you
      want to or not.
      This is a problem because even of the configure-time checks succeed,
      there could be previously unknown or unanticipated problems with using a
      particular version of the system package or some package+platform
      Therefore it is useful (if unfortunate) to be able to force use of the
      SPKG and disable checking for the system package.  In principle we would
      want to react to the broken package+platform combination as well, either
      by fixing it somehow or blacklisting that particular combination at
      configure-time.  However, by providing this option, we at least don't
      have to react immediately to such problems if/when they arise (e.g.
      This ticket adds a `--with-system-<spkg>` flag to `configure`; e.g.
      `--with-system-zlib`.  By default this is enabled (the current
      behavior), but by passing `--with-system-zlib=no` or `--without-system-
      zlib` then the SPKG will be installed without checking the system for
      the dependency.
      This also adds the option to pass `--with-system-zlib=force` meaning
      that if the dependency cannot be found on the system then configure will
      abort with an error message.
      This would effectively replace #21538.
      URL: https://trac.sagemath.org/27567
      Reported by: embray
      Ticket author(s): Erik Bray
      Reviewer(s): Dima Pasechnik
    • Release Manager's avatar
      Trac #27565: Fix segfault / memory corruption in OpenBLAS · 4aa19b03
      Release Manager authored
      There is a bug in OpenBLAS [https://github.com/xianyi/OpenBLAS/pull/1957
      already fixed upstream] which I am encountering on Cygwin, though it
      could also affect Linux (in fact the original bug report was for Linux).
      For Sage, this bug is causing a segfault on Cygwin when running
      ./sage -t --long src/sage/manifolds/differentiable/vectorfield.py
      but it could happen arbitrarily anywhere that uses OpenBLAS and that
      happens to use threads (even without using OpenBLAS threads).
      I have already confirmed that the upstream fix resolves the issue for
      URL: https://trac.sagemath.org/27565
      Reported by: embray
      Ticket author(s): Erik Bray
      Reviewer(s): François Bissey
    • Frédéric Chapoton's avatar
      trying to fix doc · c546232e
      Frédéric Chapoton authored
    • Martin Rubey's avatar
    • Frédéric Chapoton's avatar
  7. 01 Apr, 2019 3 commits