1. 04 Feb, 2019 1 commit
  2. 03 Feb, 2019 1 commit
  3. 02 Feb, 2019 1 commit
  4. 31 Jan, 2019 7 commits
    • Release Manager's avatar
      Trac #26821: pep8 cleaning in distance_graph and girth · c78b8740
      Release Manager authored
      pep8 cleaning in methods `distance_graph` and `girth`. Also, use
      iterators over edges or neighbors when appropriate.
      
      URL: https://trac.sagemath.org/26821
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Bryan Gin-ge Chen
      c78b8740
    • Release Manager's avatar
      Trac #26819: improve method eccentricity to save calls to .vertices() · 8d1ee52c
      Release Manager authored
      In method `eccentricity` of `distances_all_pairs.pyx`:
      - add parameter `vertex_list` in order to save some calls to
      `.vertices()`.
      
      In method `eccentricity` of `generic_graph.py`:
      - set parameter `vertex_list` when calling method `eccentricity` of
      `distances_all_pairs.pyx`
      - fix an error in the ordering of returned values (a doctest was
      false...). This ordering must be consistent with parameter `v`
      
      URL: https://trac.sagemath.org/26819
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Bryan Gin-ge Chen
      8d1ee52c
    • Release Manager's avatar
      Trac #25535: failing internet doctest in sage/repl/load.py · 54403248
      Release Manager authored
      As reported on [https://groups.google.com/d/msg/sage-
      release/l635YEuT7Hs/WkHCnmWhAQAJ sage-release 8.3.beta3],
      
      {{{
      sage -tp --optional=sage,internet src/sage/repl/load.py
      }}}
      
      gives
      
      {{{
      sage -t src/sage/repl/load.py
      **********************************************************************
      File "src/sage/repl/load.py", line 142, in sage.repl.load.load
      Failed example:
          sage.repl.load.load('http://wstein.org/loadtest.py', globals())  #
      optional - internet
      Exception raised:
          Traceback (most recent call last):
            File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-
      packages/sage/doctest/forker.py", line 572, in _run
              self.compile_and_execute(example, compiler, test.globs)
            File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-
      packages/sage/doctest/forker.py", line 982, in compile_and_execute
              exec(compiled, globs)
            File "<doctest sage.repl.load.load[16]>", line 1, in <module>
              sage.repl.load.load('http://wstein.org/loadtest.py', globals())
      # optional - internet
            File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-
      packages/sage/repl/load.py", line 242, in load
              code = compile(f.read(), fpath, 'exec')
            File "/home/slabbe/.sage/temp/labbe-laptop/4725/tmp_aLSpZn.py",
      line 1
              <!DOCTYPE html>
              ^
          SyntaxError: invalid syntax
      **********************************************************************
      1 item had failures:
         1 of  37 in sage.repl.load.load
          [45 tests, 1 failure, 3.81 s]
      ----------------------------------------------------------------------
      sage -t src/sage/repl/load.py  # 1 doctest failed
      ----------------------------------------------------------------------
      }}}
      
      URL: https://trac.sagemath.org/25535
      Reported by: slabbe
      Ticket author(s): Sébastien Labbé
      Reviewer(s): Vincent Klein
      54403248
    • Sébastien Labbé's avatar
      25535: cleaning report_hook · adeedb8c
      Sébastien Labbé authored
      adeedb8c
    • Sébastien Labbé's avatar
      b4bfc4ae
    • Sébastien Labbé's avatar
      0a105e03
    • Sébastien Labbé's avatar
      25535: specifying a User-Agent · abcdf872
      Sébastien Labbé authored
      abcdf872
  5. 30 Jan, 2019 2 commits
  6. 29 Jan, 2019 1 commit
  7. 28 Jan, 2019 2 commits
  8. 27 Jan, 2019 25 commits
    • Samuel Lelièvre's avatar
      Update nbconvert dependencies · ee2d8da3
      Samuel Lelièvre authored
      ee2d8da3
    • Release Manager's avatar
      Trac #27043: py3: minor sage.geometry.polyhedron.palp_database cleanup · 3dc9fefb
      Release Manager authored
      Minor cleanup from my python3 branch.  This module is already working
      now on Python 3, but I had previously fixed it by passing encoding
      arguments to `subprocess.Popen` on Python 3.
      
      Also pep8 cleanup and delinting.
      
      URL: https://trac.sagemath.org/27043
      Reported by: embray
      Ticket author(s): Erik Bray
      Reviewer(s): Frédéric Chapoton
      3dc9fefb
    • Release Manager's avatar
      Trac #27037: neighbors of a nonexistent vertex · aff5a129
      Release Manager authored
      The neighbor_iterator method does not give a correct error message when
      given a vertex that does not belong to the graph.
      \\
      {{{
      sage: g = Graph()
      sage: list(g.neighbor_iterator(123))
      LookupError: vertex (-1) is not a vertex of the graph
      }}}
      
      The issue is that '-1' is not the name of the vertex that we tried to
      delete.
      
      URL: https://trac.sagemath.org/27037
      Reported by: gh-jfraymond
      Ticket author(s): Jean-Florent Raymond
      Reviewer(s): David Coudert
      aff5a129
    • Release Manager's avatar
      Trac #27031: Mention "length of poset" in documentation · 56e9b9d9
      Release Manager authored
      See for example https://www.researchgate.net/publication/306094465_Chrom
      atic_classification_of_dismantlable_lattices
      
      URL: https://trac.sagemath.org/27031
      Reported by: jmantysalo
      Ticket author(s): Jori Mäntysalo
      Reviewer(s): Frédéric Chapoton
      56e9b9d9
    • Release Manager's avatar
      Trac #27026: Minor doctest fixes for #22029 · cb709988
      Release Manager authored
      Two doctests which should be fixed/removed for #22029.
      
      URL: https://trac.sagemath.org/27026
      Reported by: jdemeyer
      Ticket author(s): Jeroen Demeyer
      Reviewer(s): Marc Mezzarobba
      cb709988
    • Release Manager's avatar
      Trac #25983: Document that divisors are returned sorted in increasing order · 4a862267
      Release Manager authored
      Initial report:
      
      > The output of `divisors(n)` for integer `n` appears to be sorted.
      >
      > If true, this should be documented, so users don't unnecessarily call
      `sorted(divisors(n))`.
      >
      > Same for `prime_divisors` and `squarefree_divisors`.
      
      It turns out that for integer `n`, both `divisors(n)` and
      `prime_divisors(n)`
      are sorted in increasing order.
      
      On the other hand, for `squarefree_divisors(n)` the order comes from
      using powerset of the list of prime divisors of `n` and in general will
      not coincide with the increasing order.
      
      This ticket makes sure the documentation documents that.
      
      URL: https://trac.sagemath.org/25983
      Reported by: zimmerma
      Ticket author(s): Samuel Lelièvre
      Reviewer(s): Jeroen Demeyer
      4a862267
    • Release Manager's avatar
      Trac #27106: remove some unused import in scripts · 445809d4
      Release Manager authored
      found by lgtm
      
      URL: https://trac.sagemath.org/27106
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
      445809d4
    • Release Manager's avatar
      Trac #27123: bliss automorphism_group() shouldn't sort vertices · daedc047
      Release Manager authored
      This sorting was introduced in #25426 to fix a problem with
      `automorphisms_of_rows_and_columns`. Since sorting vertices of graphs is
      not possible in general, that needs to be reverted.
      
      In fact, the problem was not with bliss but with invalid assumptions
      made in the method `automorphisms_of_rows_and_columns`.
      
      So this ticket reverts the fix for #25426 and replaces it by a correct
      fix.
      
      URL: https://trac.sagemath.org/27123
      Reported by: jdemeyer
      Ticket author(s): Jeroen Demeyer
      Reviewer(s): Travis Scrimshaw
      daedc047
    • Release Manager's avatar
      Trac #27102: curing the "module import itself" warning · c01950cd
      Release Manager authored
      found by lgtm
      
      URL: https://trac.sagemath.org/27102
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Marc Mezzarobba
      c01950cd
    • Release Manager's avatar
      Trac #27040: Cleanup sage.env · 3b643080
      Release Manager authored
      1. `sage.all` should be importable and mostly usable even if no
      environment variables like `SAGE_ROOT` or `SAGE_LOCAL` are set. This
      requires a new function `join` which is like `os.path.join` except that
      `None` values are propagated.
      
      2. Several unneeded variables are removed.
      
      3. Get rid of the over-engineered `$VAR` replacement stuff.
      
      4. In some places, `SAGE_LIB` (installed location of Sage) can be used
      instead of `SAGE_SRC`.
      
      5. Determine `SAGE_LIB` not from `site-packages` but from
      `sage.__file__`
      
      6. Rename `_add_variable_or_fallback` -> `var` to shorten line lengths.
      
      There is a [https://groups.google.com/forum/#!topic/sage-
      devel/3ng87YVZjug thread on sage-devel] that complains about the failure
      in Debian of `import sage.all` from system Python.
      
      URL: https://trac.sagemath.org/27040
      Reported by: Snark
      Ticket author(s): Jeroen Demeyer
      Reviewer(s): Erik Bray
      3b643080
    • Release Manager's avatar
      Trac #27112: Steenrod algebra elements: explain how to extract tensor factors from a tensor product · d029e5b5
      Release Manager authored
      Add a few examples showing, if you have an element of a tensor product,
      in particular in the tensor square of the mod p Steenrod algebra, how
      you can get the basic tensor summands, their tensor factors, and their
      coefficients.
      
      URL: https://trac.sagemath.org/27112
      Reported by: jhpalmieri
      Ticket author(s): John Palmieri
      Reviewer(s): Travis Scrimshaw
      d029e5b5
    • Release Manager's avatar
      Trac #27041: Remove deprecated stuff related to Cython · 7d0fc208
      Release Manager authored
      Remove deprecations from #22698, #22805, #23855, #24105.
      
      Deprecate the script `src/bin/sage-cython`.
      
      URL: https://trac.sagemath.org/27041
      Reported by: jdemeyer
      Ticket author(s): Jeroen Demeyer
      Reviewer(s): Erik Bray
      7d0fc208
    • Release Manager's avatar
      Trac #21121: Precision in doctest tolerance: x > x · 2258aca4
      Release Manager authored
      {{{
      Failed example:
          A.exp()  # tol 1e-14
      Expected:
          [-19.614602953804912 + 12.517743846762578*I   3.7949636449582176 +
      28.88379930658099*I]
          [ -32.383580980922254 + 21.88423595789845*I   2.269633004093535 +
      44.901324827684824*I]
      Got:
          [-19.614602953804923 + 12.517743846762574*I  3.7949636449582007 +
      28.883799306580993*I]
          [-32.383580980922275 + 21.884235957898447*I  2.2696330040935115 +
      44.901324827684846*I]
      Tolerance exceeded in 1 of 8:
          2.269633004093535 vs 2.2696330040935115, tolerance 1e-14 > 1e-14
      }}}
      
      Sage saying that 10^-14^ > 10^-14^ appears a bit stupid.
      
      The attached branch fixes this by displaying `y > x` where:
      
      - `x` is the required tolerance (given in the doctest) with 15 digits,
      rounded to nearest.
      
      - `y` is the observed tolerance (computed by running the test) with 1
      digit, '''rounded up'''. This means that using `# tol y` is guaranteed
      to make the test pass.
      
      Assuming that the tolerance in the doctest is given to at most 15 digits
      of precision (almost certainly the case), `x` should be exactly what was
      in the doctest. In that case, `y` cannot be equal to `x`.
      
      We also refactor the implementation for printing tolerance errors
      somewhat.
      
      Finally, we use 1044 bits of precision to compute tolerances. This may
      seem overkill, but it is needed if we want to deal with tolerances on
      numbers computed with 1024 bits of precision.
      
      URL: https://trac.sagemath.org/21121
      Reported by: leif
      Ticket author(s): Jeroen Demeyer
      Reviewer(s): Marc Mezzarobba
      2258aca4
    • Release Manager's avatar
      Trac #27132: MR7: trivial doc fix about nauty · b69d9f91
      Release Manager authored
      Dmitrii Pasechnik ([https://gitlab.com/dimpase @dimpase]) opened a merge
      request at sagemath/sage!7:
      ----
      
      [[BR]][[BR]][[BR]][[BR]][[BR]]
      
      URL: https://trac.sagemath.org/27132
      Reported by: galois
      Ticket author(s): Dmitrii Pasechnik
      Reviewer(s): David Coudert
      b69d9f91
    • Release Manager's avatar
      Trac #27127: py3: avoid .vertices() in method ear_decomposition · 3ea02b38
      Release Manager authored
      We avoid using `.vertices()` in this method and fix a failing doctest
      for py3.
      
      URL: https://trac.sagemath.org/27127
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Travis Scrimshaw
      3ea02b38
    • Release Manager's avatar
      Trac #27126: py3: Fix plot module for python3 · 227cfa65
      Release Manager authored
      The root cause for matplotlib's {{{AttributeError: Unknown property
      which}}} was testing {{{hasattr(x, '__iter__')}}} to filter {{{str}}}.
      {{{str}}} hasn't an {{{__iter__}}} method in py2 but has one in py3.
      
      URL: https://trac.sagemath.org/27126
      Reported by: vklein
      Ticket author(s): Vincent Klein
      Reviewer(s): Travis Scrimshaw
      227cfa65
    • Release Manager's avatar
      Trac #27125: py3: fix some doctests in graph.py · 437b1aff
      Release Manager authored
      Fix failing doctests with Python3 in `apex_vertices`, `coloring` and
      `matching`.
      
      {{{
      File "src/sage/graphs/graph.py", line 2057, in
      sage.graphs.graph.Graph.apex_vertices
      Failed example:
          G.apex_vertices()
      Expected:
          ['x', (2, 2), (3, 3), (1, 1)]
      Got:
          ['x', (1, 1), (3, 3), (2, 2)]
      **********************************************************************
      File "src/sage/graphs/graph.py", line 4158, in
      sage.graphs.graph.Graph.coloring
      Failed example:
          P = G.coloring(algorithm="DLX"); P
      Expected:
          [[1, 2, 3], [0, 5, 6], [4]]
      Got:
          [[0, 5, 6], [1, 2, 3], [4]]
      **********************************************************************
      File "src/sage/graphs/graph.py", line 4458, in sage.graphs.graph.Graph.?
      Failed example:
          g.matching(algorithm="LP")
      Expected:
          [(2, 3, -5), (0, 1, 0)]
      Got:
          [(0, 1, 0), (2, 3, -5)]
      }}}
      
      URL: https://trac.sagemath.org/27125
      Reported by: dcoudert
      Ticket author(s): David Coudert
      Reviewer(s): Vincent Klein
      437b1aff
    • Release Manager's avatar
      Trac #27115: py3: some tentative fixes for multi-filtered modules · 08bfa7cc
      Release Manager authored
      URL: https://trac.sagemath.org/27115
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
      08bfa7cc
    • Release Manager's avatar
      Trac #27113: fix 2 doctests in Mv polytopes · 288826cd
      Release Manager authored
      URL: https://trac.sagemath.org/27113
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
      288826cd
    • Release Manager's avatar
      Trac #27108: some pyflakes cleanup for combinatorics · b36e64a4
      Release Manager authored
      only partial still
      
      URL: https://trac.sagemath.org/27108
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
      b36e64a4
    • Release Manager's avatar
      Trac #27099: Deprecate is_extension_type · e05773c2
      Release Manager authored
      First of all, the name `is_extension_type` is misleading: it
      ''actually'' tests whether instances of the class have a `__dict__`.
      While extension types usually don't and Python classes usually do, in
      both cases the opposite is possible.
      
      Moreover, it is used in only one place (namely to determine whether to
      use actual inheritance from the category for `Element` classes). And
      this usage is there mostly for historical reasons (see also #24715).
      
      Since `is_extension_type()` is the only function remaining in
      `sage.structure.misc`, we actually deprecate that whole module.
      
      One further minor change is that an element class can no longer be an
      old-style class. This was not an issue in practice, since most (if not
      all) `Element` classes derive from `sage.structure.element.Element`. But
      two tests with simple old-style `Element` classes had to be fixed.
      
      URL: https://trac.sagemath.org/27099
      Reported by: jdemeyer
      Ticket author(s): Jeroen Demeyer
      Reviewer(s): Travis Scrimshaw
      e05773c2
    • Release Manager's avatar
      Trac #27098: Fixed wrong number of arguments for string format · 20dafdd2
      Release Manager authored
      The string format in line 338 of
      `src/sage/rings/function_field/function_field_valuation.py`
      `raise ValueError("there must not be an element of valuation -Infinity
      in the domain of valuation"%(valuation,))`
      was passing an argument but the string didn't have one.
      I've amended the string to accept the argument to:
      `raise ValueError("there must not be an element of valuation -Infinity
      in the domain of valuation %r"%(valuation,))`
      
      I work for Semmle and I noticed the bug with our LGTM code analyzer
      https://lgtm.com/projects/g/sagemath/sage/snapshot/dist-132890344-154810
      2310071/files/src/sage/rings/function_field/function_field_valuation.py?
      sort=name&dir=ASC&mode=heatmap#x394f902069b4c04f:1
      
      URL: https://trac.sagemath.org/27098
      Reported by: gh-damianosSemmle
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Travis Scrimshaw
      20dafdd2
    • Frédéric Chapoton's avatar
      813a6232
    • Release Manager's avatar
      Trac #27055: some simplifications for all · 227f7bae
      Release Manager authored
      by using `all(x for x in y)` instead of `all([x for x in y])`
      
      Found using
      {{{
      git grep -c "[^a-z]all(\[" src/sage/
      }}}
      
      There remains many more.
      
      URL: https://trac.sagemath.org/27055
      Reported by: chapoton
      Ticket author(s): Frédéric Chapoton
      Reviewer(s): Jeroen Demeyer
      227f7bae
    • Release Manager's avatar
      Trac #27027: graph relabel() assumes sortable vertices · 743804f0
      Release Manager authored
      There are several cases in `relabel()` which assume sorting of vertices.
      
      The following cases are fixed:
      
      1. `perm=None`. This should just relabel with integers from 0 to N-1 in
      an arbitrary order (as the documentation already says).
      
      2. `perm` is a callable. This is easy to avoid, as the ordering of the
      vertices is not used in the code:
      {{{
              elif callable(perm):
                  perm = dict( [ i, perm(i) ] for i in self.vertices() )
                  complete_partial_function = False
      }}}
      
      This broke several functions which did assume a particular ordering for
      `G.relabel(perm=None)`. Those are fixed by using
      `G.relabel(perm=range(G.order()))` instead.
      
      Furthermore, we allow arbitrary iterables to be given for relabeling
      instead of only `list` and `tuple`. This improves things with Python 3
      where `range()` becomes an iterator.
      
      URL: https://trac.sagemath.org/27027
      Reported by: jdemeyer
      Ticket author(s): Jeroen Demeyer
      Reviewer(s): David Coudert
      743804f0