Skip to content

Sage 10.3 Release Tour

Matthias Köppe edited this page Mar 3, 2024 · 96 revisions

These are the work-in-progress release notes for the upcoming 10.3 release (2024). Current stable version: Sage 10.2 Release Tour (December 2023).

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). #36771, #36774

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

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

New developer tools

Please read our updated Sage Developer Guide.

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

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, update, and update-latest

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 the upstream URL pattern upstream_url=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

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

Cython 3.0.7 #36785, #36928

ECL has been upgraded to version 23.9.9. #37044

Sphinx has been upgraded to 7. #37129, #37334

Meson has been upgraded to 1.3.1. #37319

For a list of all packages and their versions, see

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 this year. #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

The Sage 10.3 release cycle began in Dec 2023. The first development release, 10.3.beta0, was released on Dec 5, 2023. The first release candidate, 10.3.rc0, was made available on Feb 25, 2024. The current release candidate is 10.3.rc1, from Feb 29, 2024.

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.

Known problems and workarounds

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

FLINT 3.1 is too new. If your system has this new version already, use ./configure --without-system-flint. #37203

OpenJPEG 2.5.x is too new. #37505

Help

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

Visit sage-support for installation help.

More details

Clone this wiki locally