Skip to content

Sage 10.3 Release Tour

Travis Scrimshaw edited this page Apr 9, 2024 · 92 revisions

Sage 10.3 was released on Mar 19, 2024. This is the current stable version.

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

User interface: JupyterLab, Notebook 7, IPython 8.18

JupyterLab is now a standard package. Start it using ./sage -n jupyterlab. #36129

Screenshot 2024-03-02 at 12 37 44 PM

The Jupyter Notebook (./sage -n jupyter) has been upgraded to version 7.0.6 (changelog), which is now also based on JupyterLab technology. #36129

Among the new features of Notebook 7:

IPython has been upgraded from 8.6 to 8.18.1 (changelog). Highlights include improved auto-suggestions. #36129

Illustration of improved auto-suggestions, from https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#ipython-8-9-0

Sage developers may be interested in the API for dynamic documentation dispatch and support for PEP-678 Exception Notes. #36129 #36823

Matroids

Several new methods are available for matroids: automorphism_group(), girth(), is_paving(), is_sparse_paving(). #36962 #37145

Matroids constructed using Matroid(circuits=[...]) are now backed by a new class CircuitsMatroid, which avoids the potentially costly conversion to a BasisMatroid. The circuits description can be very succinct and can facilitate efficient implementations of some algorithms. #37148 #37338

The catalog of available matroids has been reorganized and expanded. #36842 #37140 #37231

The additions include:

Graph theory

NetworkX has been upgraded from version 3.1 to 3.2.1 (release notes 3.2, 3.2.1). #36750

igraph has been upgraded to 0.10.8 and the corresponding package python_igraph to 0.11.3. #36750

nauty has been upgraded to version 2.8.8 (changelog), which is now also the minimum required version if nauty is taken from the system. #36771 #36774 #36924

Geometry

LatticePolytope.normal_form() now uses a cythonized re-implementation of the PALP normal form algorithm in Sage as the default algorithm. It replaces the use of the PALP package for this purpose, which had long been known to be unreliable for dimension greater than 3. The algorithm is now also available as a method for Polyhedron objects. #36031

polymake, the open source software for research in polyhedral geometry, has been upgraded from 4.9 to 4.11 (change log 4.10, 4.11), which improves Perl compatibility by adding support for version 5.38. #36878

Generic groups and rings

  • There is now a generic has_order() function for group elements. #36806
  • The ProductTree class now has a .interpolation() method, which computes an inverse to .remainders(). #36456
  • Lazy series now support infinite sums and products #35362, integration #36233 and have been enhanced in various other ways.

Number Theory

  • Ideals of non-maximal orders in number fields are now supported. #35762
  • Class groups of (definite) binary quadratic forms are now available. #36184 #37074

Elliptic Curves

  • Elliptic-curve morphisms now have a specialized parent object. #36972
  • Sums of elliptic-curve morphisms are now available. #36637
  • Classical modular polynomials can now be obtained by simply calling classical_modular_polynomial(l). #36190
  • The .division_field() method for elliptic curves now supports composite orders. #35936
  • Bröker's algorithm to construct supersingular elliptic curves is now available. #36665
  • There are now methods to compute an isogeny kernel polynomial from an irreducible divisor or an irrational point. #37125

Combinatorics

  • computing the number of integer vectors modulo the action of a permutation group now uses the Pólya cycle index theorem and is therefore much faster #36814
  • Tabloid modules $T^{\lambda}$ and Specht modules as submodules of $T^{\lambda}$ for the symmetric group are now implemented for straight shapes. #36748
  • Auslander-Reiten quivers can be constructed #37182

Knot Theory

  • The optional package database_knotinfo has been updated from 2023.6.1 to 2024.2.1 (see #37014). Now, this is the first compatible version giving access to knots with 13 crossings.

Algebra

  • Submodules with an indexed basis can now compute intersections, sums, and equality. #36988
  • 0 dimensional modules now know they have one element (generically). #36985
  • Filtered modules can compute their Hilbert series. [#37015](https://github.com/sagemath/sage/pull/
  • Implemented the Aomoto complex of the Orlik-Solomon algebra. #37015
  • Representations of Lie algebras defined by an explicit morphism are implemented. #36169
  • The Chevalley-Eilenberg complex can now be constructed with coefficients in a module. #36171
  • Multiple methods to compute the dimensions and representations of symmetric group over positive characteristic:
    • Implementing cellular bases. #36718 #36790
    • Using the bilinear form on the tabloid basis. #36724
  • Lazy series can now perform integration and be constructed from the Taylor series of a function. #36233

New developer tools

Please read our updated Sage Developer Guide.

Sphinx role :issue: replaces :trac:

In docstrings, reference to a GitHub Issue (or a PR) is made with :issue:. Thus write :issue:`12345`, for example. Old :trac: were all replaced with :issue:. In code comments, write like Issue #12345 (note the capital I). #37390

Doctest failures are shown in the "Files changed" tab on PRs

The "Build & Test" workflow on GitHub Actions, which runs automatically on every PR, now shows any doctest failures and warnings next to the doctest in the "Files changed" tab. This is similar to Codecov annotations. #36938

Doctest failures in unmodified files appear at the end, in the section "Unchanged files with check annotations".

Screenshot 2024-02-02 at 10 21 48 PM

Full unicode support in the documentation

Sage now builds its PDF documentation using the modern TeX engine LuaTeX. See the updated Sage Installation Guide section on the required system packages. #36861

This removes most restrictions regarding the use of unicode in documentation and doctests.

This change enables renewed translation efforts for the Sage documentation.

Sphinx has been upgraded to 7. #37129 #37334

Dev container configurations for all tested Linux platforms

The directory .devcontainer/ now contains dev container configurations for all Linux platforms for which we build Docker containers on GitHub Actions. This allows them to be selected in VS Code (with the Dev Containers extension) and on GitHub when creating GitHub Codespaces. #36954

The section on portability testing in the Sage Developer Guide now shows a table with links to GitHub Packages and friendly "Open in GitHub Codespaces" buttons.

Screenshot 2024-02-02 at 9 31 23 PM

Another new dev container configuration "tox-docker-in-docker" enables portability work in GitHub Codespaces via Docker-in-Docker, which may be valuable for those developers who cannot run Docker on their own computers.

Updating the Linux platforms that we test is made easier by the new command tox -e update_docker_platforms. #36954

OS-dependent doctest tags

It is now possible to mark doctests with tags # known bug: macos and # known bug: linux. #36989

New sage --package subcommands metrics, properties, dependencies

sage --package metrics is a new tool to compute machine-readable aggregated metrics for all packages in the Sage distribution or a given list of packages. Developers can use these metrics to monitor the complexity and quality of the Sage distribution. Thus this tool can assist discussions of the Sage distribution. #36977

In PRs that make changes to packages, the command also runs automatically in "List changed packages" on GitHub Actions. For example, for PR #37129, the workflow shows the following changes to the package metrics:

# develop				      |	# refs/pull/37129/merge
has_file_distros_arch_txt=181		      (
has_file_distros_conda_txt=289		      (
has_file_distros_debian_txt=172		      (
has_file_distros_fedora_txt=183		      (
has_file_distros_gentoo_txt=211		      (
has_file_distros_homebrew_txt=95	      (
has_file_distros_macports_txt=173	      (
has_file_distros_nix_txt=72		      (
has_file_distros_opensuse_txt=206	      (
has_file_distros_slackware_txt=32	      (
has_file_distros_void_txt=221		      (
has_file_patches=63			      (
has_file_spkg_check=106			      (
has_file_spkg_configure_m4=263		      (
has_file_spkg_install=322		      |	has_file_spkg_install=303
has_tarball_upstream_url=295		      |	has_tarball_upstream_url=296
line_count_file_patches=31853		      (
line_count_file_spkg_check=585		      (
line_count_file_spkg_configure_m4=3352	      (
line_count_file_spkg_install=4326	      |	line_count_file_spkg_install=4281
packages=444				      (
type_base=1				      (
type_experimental=18			      (
type_optional=152                             (
type_standard=273                             (

The new commands sage --package dependencies and sage --package properties also have convenient interactive uses for developers. The main purpose of these new commands, however, is to replace all direct access to the files in the build/pkgs/*/ directories in our build scripts. #37018 #37350

Improvements to sage --package subcommands create and update

When sage --package create is used on an existing package to re-create it with a different source type, it now deletes files that do not make sense for the new source type. For example, when switching from a pip package to wheel, it removes the requirements.txt file. When switching from normal to wheel, it removes the spkg-install.in file. #37352

The filenames of tarballs and upstream URLs of packages can now refer to the components of the package version. For example, the package nauty now uses https://pallini.di.uniroma1.it/nauty${VERSION_MAJOR}_${VERSION_MINOR}_${VERSION_MICRO}.tar.gz. This simplifies making package updates. #36774

Modularization tooling: sage --fixdistributions

This is a new maintenance command for adding/updating # sage_setup: distribution directives at the top of source files. #36135

sage_setup.autogen.flint

The Cython *.pxd files for the FLINT library are now autogenerated. #36449

Customizing GH Actions workflows in forked repositories

Since the 10.2 release cycle, the Sage CI on GitHub Actions applies open pull requests with "blocker" priority as patches ("CI fixes"). By default, these blocker PRs come from the main Sage repository sagemath/sage. This can now be customized: When a repository variable SAGE_CI_FIXES_FROM_REPOSITORIES is set in a fork, it is used instead as the source(s) of the CI fixes; this gives better control in decentralized development. When set to none, this also makes it possible to see the "ground truth". #36686

Package upgrades, configuration changes, porting

Python 3.12

Python 3.12 has been available since October 2023; its release highlights include more helpful error messages. Sage 10.3 adds support for using a system installation of Python 3.12. The oldest version of Python that Sage supports is still 3.9, which sets the language/library standard for any code in the Sage library. When no suitable system installation of Python is found, Sage builds its own copy of Python; the version it uses for this is Python 3.11.1. #36983 #37270

FLINT 3

FLINT, the Fast Library for Number Theory, has been upgraded from 2.9.0 to the new major version 3 (release notes 3.0.0, 3.0.1). The new version has absorbed the functionality of the libraries Arb (the basis for RealBallField and ComplexBallField in Sage) and Antic (functionality for algebraic number fields and binary quadratic forms, so far not directly used by the Sage library), as well as Calcium (for exact real and complex arithmetic, including transcendental extensions, so far not used by the Sage library). #35848 #36901 #36930 #36449 #37193

Cython 3 transition

Sage 10.2 made the switch to Cython 3, but several optional packages had not been ready at the time of the release. Two of them have now been updated: CyLP #36439, Symengine #36677 #36847

Cython has been upgraded to 3.0.7. #36785 #36928

Other package upgrades

gmp 6.3.0, mpc 1.3.1, mpfr 4.2.1, mpfrcx 0.6.3, gmpy2 2.2.0a1 #36351

NumPy has been upgraded from 1.26.1 to 1.26.3 (release notes 1.26.2, 1.26.3) and SciPy from 1.11.3 to 1.11.4 (release notes). #36752 #37000

OpenBLAS has been upgraded from 0.3.25 to 0.3.26 (release notes). #37005

CVXpy 1.4.1, SCS 3.2.3, osqp_python 0.6.3, CVXOPT 1.3.2, CyLP 0.92.2, add clarabel solver https://github.com/sagemath/sage/pull/36439

GAP can now be taken from the system. #36792

Newer versions of Givaro, FFLAS-FFPACK, LinBox can now be taken from the system. #36997

QEPCAD B 1.74 #36835

ECL has been upgraded to version 23.9.9. #37044

Meson has been upgraded to 1.3.1. #37319

For a list of all packages and their versions, see

Build system changes

The sage-spkg command now offers several new switches that invoke build phases of SPKGs separately. It now also handles script packages. #36738 #36743 #36747

The doctester, when run during the build, now uses gnumake-tokenpool to manage its use of multiple CPUs. #36640 #36948

Several of SageMath's distribution packages have been updated to define project metadata in pyproject.toml, following PEP 621, instead of in setup.cfg or setup.py. #36562 #36563 #36564

Porting to the Pyodide (Web Assembly) platform

An effort to port a subset of SageMath to Pyodide, the Python distribution for the browser and Node.js based on WebAssembly, has started early in 2024. #34539

Several upstream projects that Sage uses already have ongoing Pyodide or WASM/Emscripten efforts: The SymPy Live Shell and the interactive shell on the NumPy.org front page use JupyterLite, running Pyodide in a Web Worker in the browser. Also PARI/GP runs in the browser using a WASM/Emscripten port. Giac also has an Emscripten port.

The stable Pyodide version 0.25.0 was shipping some packages needed for Sage already: boost, glpk, gmpy2, matplotlib, networkx, numpy, and scipy. The upcoming Pyodide version 0.26.0 will add cysignals, pplpy, flint, memory_allocator, primecountpy.

The porting effort is enabled by the modularization of the Sage library. The basic modularized distributions sagemath-objects and sagemath-categories only depend on the already available gmpy2. The immediate next step is to make the test suite of sagemath-categories pass. After this, the modularized distributions added in #35095 can be separately ported to Pyodide (along with their respective dependencies) and tested. For example, sagemath-graphs has no new dependencies.

Availability of Sage 10.3 and installation help

Please read our updated Sage Installation Guide.

Sources

The source code is available in the Sage GitHub repository.

Sage builds successfully on the following platforms:

  • Linux 64-bit (x86_64)
  • Linux 32-bit (i386/i686)
    • ubuntu-bionic-gcc_8
    • debian-bullseye
  • macOS (Intel) (x86_64) - with Homebrew or without
    • macOS 11.x (Big Sur)
    • macOS 12.x (Monterey)
    • macOS 13.x (Ventura)
    • macOS 14.x (Sonoma)
  • 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. The support code for Cygwin has been removed in the Sage 10.3 development cycle. Users on Windows 10 and 11 should 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 Dev Containers or WSL remote.

Availability in distributions

Thanks to the work of downstream packagers, Sage 10.3 is already available in Arch Linux, Void Linux, and nixpkgs (unstable), as well as a Homebrew Cask (which installs the Sage_macOS application bundle from the 3-manifolds project). See https://repology.org/project/sagemath/versions

Known problems and workarounds

On macOS with the newest Xcode Command Line Tools (gcc --version shows "Apple clang version 15.0.0 (clang-1500.3.9.4)"), the Sage library fails to build. Workaround: Use #37646

On ubuntu-mantic, the Maxima package may fail to build when system ECL is in use. Workaround: Use ./configure --without-system-ecl #36672

OpenJPEG 2.5.1 is broken and leads to a build failure in Pillow. Upgrade OpenJPEG to 2.5.2 or use #37505 as a workaround.

No latex display in the Jupyter notebook when offline. Workaround: Use ./sage -pip uninstall jupyterlab-mathjax2. #36914

The optional package PySCIPOpt does not build. Workaround: Use ./sage -pip install pyscipopt or use #37392

Help

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

Visit sage-support for installation help.

More details

Clone this wiki locally