Skip to content

Sage 10.1 Release Tour

Matthias Köppe edited this page Aug 20, 2023 · 47 revisions

Sage 10.0 was released on Aug 20, 2023.

Here is an overview of some of the main changes in this version.

Polyhedral geometry

The Sage implementation of the PALP normal form algorithm for lattice polytopes under affine unimodular transformations (LatticePolytope.normal_form(algorithm='palp_native') has been made much faster. #35997

Package upgrades

mpmath has been upgraded to 1.3.0. #35929

NetworkX has been upgraded from 2.8.x to 3.1 (release notes 3.0, 3.1). #35671

The optional package igraph and its Python bindings have been upgraded to 0.10.4 (release notes 0.10.3, 0.10.4). #35671

The optional package SymEngine and its Python bindings have been upgraded to 0.10.x. #35713

The optional package barvinok has been upgraded to 0.41.7. #35839

OpenBLAS has been upgraded to 0.3.23. #35371

For a list of all packages and their versions, see

New developer tools, modularization, deprecations

Block-scoped # optional doctest tags

Doctests can now be conditionalized on the presence of optional packages or other features using block-scoped doctest tags. This fills the gap between doctest tags on individual doctest lines and file-scoped doctest tags. #35749

Examples in src/sage/numerical/backends/cvxpy_backend.pyx:

  • A file-scoped doctest tag
    # sage.doctest: optional - cvxpy
    r"""
    CVXPY Backend
    ...
  • Tags in individual doctest lines
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK"); p.solve()            # optional - cvxopt
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK_MI"); p.solve()         # optional - cvxopt
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/CVXOPT"); p.solve()          # optional - cvxopt
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLOP"); p.solve()            # optional - ortools
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/PDLP"); p.solve()            # optional - ortools
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/CBC"); p.solve()             # optional - cylp
    0.0     
  • Using block-scoped tags, the above could be written
    sage: # optional - cvxopt
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK"); p.solve()            
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK_MI"); p.solve()         
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/CVXOPT"); p.solve()          
    0.0
    sage: # optional - ortools
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLOP"); p.solve()            
    0.0
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/PDLP"); p.solve()            
    0.0
    sage: # optional - cylp
    sage: p = MixedIntegerLinearProgram(solver="CVXPY/CBC"); p.solve()            
    0.0     

# needs doctest tags for modularized doctesting

Doctest tags for standard packages and features, enabling the separate testing of the distribution packages of the modularized Sage library, are now marked # needs instead of # optional. #35749

Examples in src/sage/combinat/cluster_algebra_quiver/cluster_seed.py:

  • A file-scoped doctest tag
    # sage.doctest: needs sage.graphs sage.modules
    r"""
    ClusterSeed               
    ...
  • Tags in individual doctest lines
    sage: S = ClusterSeed(['A',5])
    sage: S.plot()                                                              # needs sage.plot sage.symbolic
    Graphics object consisting of 15 graphics primitives
    sage: S.plot(circular=True)                                                 # needs sage.plot sage.symbolic
    Graphics object consisting of 15 graphics primitives
    sage: S.plot(circular=True, mark=1)                                         # needs sage.plot sage.symbolic
    Graphics object consisting of 15 graphics primitives    
  • Using block-scoped tags, the above could be written
    sage: # needs sage.plot sage.symbolic
    sage: S = ClusterSeed(['A',5])
    sage: S.plot()                                                             
    Graphics object consisting of 15 graphics primitives
    sage: S.plot(circular=True)                                                 
    Graphics object consisting of 15 graphics primitives
    sage: S.plot(circular=True, mark=1)                                        
    Graphics object consisting of 15 graphics primitives     

sage -fixdoctests

Sage provides a development tool that assists with updating doctests, sage -fixdoctests. It has now been documented and expanded to assist with modularization tasks. #35749, #36024, #36034

When a file uses a file-level # sage.doctest: optional/needs FEATURE directive, the doctest fixer automatically removes the redundant # optional/needs FEATURE tags from all sage: lines. Likewise, when a block-scoped doctest tag sage: # optional/needs FEATURE is used, then the doctest fixer removes redundant tags from all doctests in this scope. For example:

# sage.doctest: optional - sirocco sage.rings.number_field
r"""
...

EXAMPLES::

    sage: # needs sage.modules sage.rings.number_field
    sage: Q5 = QuadraticField(5)
    sage: V = Q5^42                                 # optional - sage.modules
    sage: T = transmogrify(V)           # optional - bliss sirocco

is automatically transformed to:

# sage.doctest: optional - sirocco, needs sage.rings.number_field
r"""
...

EXAMPLES::

    sage: # needs sage.modules
    sage: Q5 = QuadraticField(5)
    sage: V = Q5^42
    sage: T = transmogrify(V)               # optional - bliss

The doctest fixer also aligns the # optional/needs FEATURE tags on individual doctests at a fixed set of tab stops.

The doctester may issue style warnings when # optional/needs tags are repeated on a whole block of doctests, suggesting to use a block-scoped tag instead. The doctest fixer makes these changes automatically.

New distribution packages sagemath-{bliss,coxeter3,mcqd,meataxe,sirocco,tdlib}

These distribution packages ship Cython modules with compile-time dependencies on optional packages. #35661, #36003, #36015

Downstream packagers are encouraged to create corresponding packages for their distributions. The downstream package information should as usual be placed in the distros/ directories.

Bootstrapping individual SPKGs

The bootstrap script now accepts names of SPKGs to bootstrap; this can save time compared to running the full bootstrapping process. #35950

Deprecations

The functions is_SymbolicVariable, is_SymbolicEquation have been deprecated. #35505

Availability of Sage 10.1 and installation help

The Sage 10.1 source code is available in the Sage GitHub repository.

Sources

The source code is available in the Sage GitHub repository.

Sage builds successfully on the following platforms:

  • Linux 64-bit (x86_64), see CI Linux
  • Linux 32-bit (i386/i686)
    • ubuntu-bionic-gcc_8
    • debian-buster
    • debian-bullseye
  • macOS (Intel) (x86_64) - with Homebrew or without
    • macOS 11.x (Big Sur)
    • macOS 12.x (Monterey)
    • macOS 13.x (Ventura)
  • macOS (Apple Silicon, M1/M2) - with Homebrew or without
    • Make sure that /usr/local does not contain an old copy of homebrew (or other software) for x86_64 that you may have copied from an old machine. Homebrew for the M1/M2 is installed in /opt/homebrew, not /usr/local.
    • Be sure to follow the README and the instructions that the ./configure command issues regarding the installation of system packages from Homebrew or conda.

You can also build Sage on top of conda-forge on Linux and macOS.

Sage 10.x does not support Cygwin; use Windows Subsystem for Linux instead. Because of unresolved problems with standard packages GIAC (#34269), ECL (#34127), Maxima (#30796), and the rebasing facility (#34223), Sage 10.x does not support Cygwin. Users on Windows 10 and 11 can migrate to using WSL as described in our installation guide. A convenient way to use such an installation of Sage is via VS Code's WSL remote. #34301, #30484

Known problems and workarounds

Help

See README.md in the source distribution for installation instructions.

Visit sage-support for installation help.

More details

Clone this wiki locally