1. 09 Apr, 2019 1 commit
  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
      last)
      <ipython-input-1-ff863e4c078c> in <module>()
      ----> 1 PointConfiguration.set_engine('internal')
      
      /Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.beta0/lo
      cal/lib/python3.6/site-
      packages/sage/geometry/triangulation/point_configuration.py in
      set_engine(cls, engine)
          394             raise ValueError('Unknown value for "engine":
      '+str(engine))
          395
      --> 396         have_TOPCOM = PointConfiguration._have_TOPCOM()
          397         PointConfiguration._use_TOPCOM = \
          398             (engine == 'topcom') or (engine == 'auto' and
      have_TOPCOM)
      
      /Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.beta0/lo
      cal/lib/python3.6/site-
      packages/sage/geometry/triangulation/point_configuration.py in
      _have_TOPCOM(cls)
          287         try:
          288             out =
      next(PointConfiguration._TOPCOM_exec('points2placingtriang',
      --> 289
      '[[0,1],[1,1]]', verbose=False))
          290             PointConfiguration._have_TOPCOM_cached = True
          291             assert out=='{{0,1}}',\
      
      /Users/palmieri/Desktop/Sage_stuff/sage_builds/PYTHON3/sage-8.8.beta0/lo
      cal/lib/python3.6/site-
      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() == ''
          631
          632         if verbose:
      
      AssertionError:
      }}}
      `proc.readline().strip()` actually equals `b''`, so we should compare to
      that instead. There is another similar string comparison that needs
      fixing.
      
      URL: https://trac.sagemath.org/27604
      Reported by: jhpalmieri
      Ticket author(s): John Palmieri
      Reviewer(s): François Bissey
      72ab0070
    • 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
      True
      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
      True
      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
      False
      }}}
      
      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
      True
      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
      True
      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
      False
      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
      True
      }}}
      
      URL: https://trac.sagemath.org/27533
      Reported by: gh-kliem
      Ticket author(s): Jonathan Kliem
      Reviewer(s): Laith Rastanawi
      1d51f5fa
    • 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
      efd6ffe2
    • 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
      c0b82d83
    • John H. Palmieri's avatar
      trac 27604: fix topcom + Python 3 · 73b304c4
      John H. Palmieri authored
      73b304c4
  4. 04 Apr, 2019 8 commits
    • Frédéric Chapoton's avatar
      lazy import ssmod.py · 8b849852
      Frédéric Chapoton authored
      8b849852
    • 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
      cc8b0b77
    • 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
      [http://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/util
      ities.html#sage.manifolds.utilities.simplify_chain_real
      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
      [http://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/calc
      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
      f85474a4
    • 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
      15914c66
    • 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
      f745485b
    • 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
      last)
      <ipython-input-29-920f2702531e> in <module>()
      ----> 1 MP[Integer(3)]
      
      /home/kedlaya/sage/local/lib/python3.6/site-
      packages/sage/databases/db_modular_polynomials.py in __getitem__(self,
      level)
          156                 raise TypeError("Argument level (= %s) must be
      prime."%N)
          157         modpol = self._dbpath(level)
      --> 158         coeff_list = _dbz_to_integer_list(modpol)
          159         if self.model == "Cls":
          160             P = PolynomialRing(IntegerRing(),2,"j")
      
      /home/kedlaya/sage/local/lib/python3.6/site-
      packages/sage/databases/db_modular_polynomials.py in
      _dbz_to_integer_list(name)
           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]]
      
      /home/kedlaya/sage/local/lib/python3.6/site-
      packages/sage/databases/db_modular_polynomials.py in
      _dbz_to_string(name)
           41         raise LookupError("filename {} does not
      exist".format(filename))
           42
      ---> 43     data = bz2.decompress(f.read())
           44
           45     return data
      
      /home/kedlaya/sage/local/lib/python3.6/codecs.py in decode(self, input,
      final)
          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
      6b1023a7
    • 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
      have:
      {{{
      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
      compatibility.
      {{{
      #!diff
      @ -966,9 +967,9 @@ class FindStatStatistic(SageObject):
                   else:
                       raise
      
      -        self._description           =
      self._raw[FINDSTAT_STATISTIC_DESCRIPTION].encode("utf-8")
      -        self._name                  =
      self._raw[FINDSTAT_STATISTIC_NAME].encode("utf-8")
      -        self._references            =
      self._raw[FINDSTAT_STATISTIC_REFERENCES].encode("utf-8")
      +        self._description           =
      self._raw[FINDSTAT_STATISTIC_DESCRIPTION]
      +        self._name                  =
      self._raw[FINDSTAT_STATISTIC_NAME]
      +        self._references            =
      self._raw[FINDSTAT_STATISTIC_REFERENCES]
               self._collection            =
      FindStatCollection(self._raw[FINDSTAT_STATISTIC_COLLECTION])
               self._code                  =
      self._raw[FINDSTAT_STATISTIC_CODE]
               self._sage_code             =
      self._raw[FINDSTAT_STATISTIC_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),
      caller_name='FindStat')
      }}}
      
      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
      d2db4954
    • Rajat Mittal's avatar
      removed list · 9506749f
      Rajat Mittal authored
      9506749f
  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
      57a98c64
    • 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
      6403e7ce
    • 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
      92940e01
    • 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
      c45f8a6e
    • 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
      eac2a4d3
    • 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
      e2af0518
    • 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
      dependency.
      
      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
      combination.
      
      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.
      #26899).
      
      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
      ce655f36
    • 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
      me.
      
      URL: https://trac.sagemath.org/27565
      Reported by: embray
      Ticket author(s): Erik Bray
      Reviewer(s): François Bissey
      4aa19b03
    • Frédéric Chapoton's avatar
      trying to fix doc · c546232e
      Frédéric Chapoton authored
      c546232e
    • Martin Rubey's avatar
    • Frédéric Chapoton's avatar
  7. 01 Apr, 2019 4 commits