diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index 7887597845c..ff3260980d3 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -60,8 +60,8 @@ jobs: - name: Determine targets to build id: build-targets run: | - echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT - echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([-_.a-z0-9]*)/[^ ]* *,\2-ensure,;'; done | sort -u))" >> $GITHUB_OUTPUT + echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([a-z0-9][_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT + echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do SPKG=$(echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([a-z0-9][-_.a-z0-9]*)/[^ ]* *,\2,;'); if [ -f "build/pkgs/$SPKG/checksums.ini" -o -f "build/pkgs/$SPKG/requirements.txt" -o -f "build/pkgs/$SPKG/spkg-install" ]; then echo "$SPKG-ensure"; fi; done | sort -u))" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT test: diff --git a/CITATION.cff b/CITATION.cff index d065a454dc6..6998dacb03a 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -4,8 +4,8 @@ title: SageMath abstract: SageMath is a free open-source mathematics software system. authors: - name: "The SageMath Developers" -version: 10.2.rc4 +version: 10.2 doi: 10.5281/zenodo.593563 -date-released: 2023-11-17 +date-released: 2023-12-03 repository-code: "https://github.com/sagemath/sage" url: "https://www.sagemath.org/" diff --git a/VERSION.txt b/VERSION.txt index 529cf2e0639..274290e658a 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.2.rc4, Release Date: 2023-11-17 +SageMath version 10.2, Release Date: 2023-12-03 diff --git a/build/bin/sage-build-env-config.in b/build/bin/sage-build-env-config.in index 7d6cd113bf9..c1eb4dfe101 100644 --- a/build/bin/sage-build-env-config.in +++ b/build/bin/sage-build-env-config.in @@ -58,6 +58,8 @@ export SAGE_SUITESPARSE_PREFIX="@SAGE_SUITESPARSE_PREFIX@" export SAGE_CONFIGURE_FFLAS_FFPACK="@SAGE_CONFIGURE_FFLAS_FFPACK@" +export SAGE_HAVE_LIBJPEG="@SAGE_HAVE_LIBJPEG@" + export CONFIGURED_SAGE_EDITABLE="@SAGE_EDITABLE@" export CONFIGURED_SAGE_WHEELS="@SAGE_WHEELS@" diff --git a/build/pkgs/_recommended/dependencies b/build/pkgs/_recommended/dependencies index 6400b71fe7d..f4baa9b1fb2 100644 --- a/build/pkgs/_recommended/dependencies +++ b/build/pkgs/_recommended/dependencies @@ -1 +1 @@ -pandoc ffmpeg imagemagick texlive git +pandoc ffmpeg imagemagick texlive git libjpeg diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index 9b9aa7e4339..6a9ab0ca8aa 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=374eca6cdfb4bd3dd2d3173e300639f86407077c -md5=5810e2d5a26f7457239a576b022b0a19 -cksum=409095104 +sha1=c769dfca6414cc453b22e64863aee153c4041e6f +md5=b098e551614a15569894e0b99b4909ff +cksum=2514200459 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index d5b0ee2fa8f..af9bec1ae59 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -dcd23be6c05f8de220a8404175c6e4175842255e +b2813506039143e6f0abe859ab67a343abf72c2e diff --git a/build/pkgs/libjpeg/SPKG.rst b/build/pkgs/libjpeg/SPKG.rst new file mode 100644 index 00000000000..edd96c18593 --- /dev/null +++ b/build/pkgs/libjpeg/SPKG.rst @@ -0,0 +1,13 @@ +libjpeg: JPEG image support +=========================== + +Description +----------- + +This dummy package represents the image library ``libjpeg``. + +We do not have an SPKG for it. The purpose of this dummy package is to +associate system package lists with it. + +If the system package is installed, the package ``pillow`` will include +support for JPEG images. diff --git a/build/pkgs/libjpeg/distros/alpine.txt b/build/pkgs/libjpeg/distros/alpine.txt new file mode 100644 index 00000000000..eff1bd137fb --- /dev/null +++ b/build/pkgs/libjpeg/distros/alpine.txt @@ -0,0 +1 @@ +libjpeg-turbo-dev diff --git a/build/pkgs/libjpeg/distros/arch.txt b/build/pkgs/libjpeg/distros/arch.txt new file mode 100644 index 00000000000..9cd50353517 --- /dev/null +++ b/build/pkgs/libjpeg/distros/arch.txt @@ -0,0 +1 @@ +libjpeg-turbo diff --git a/build/pkgs/libjpeg/distros/debian.txt b/build/pkgs/libjpeg/distros/debian.txt new file mode 100644 index 00000000000..0202c510b4d --- /dev/null +++ b/build/pkgs/libjpeg/distros/debian.txt @@ -0,0 +1 @@ +libjpeg-dev diff --git a/build/pkgs/libjpeg/distros/fedora.txt b/build/pkgs/libjpeg/distros/fedora.txt new file mode 100644 index 00000000000..1a9c66f7497 --- /dev/null +++ b/build/pkgs/libjpeg/distros/fedora.txt @@ -0,0 +1 @@ +libjpeg-turbo-devel diff --git a/build/pkgs/libjpeg/distros/gentoo.txt b/build/pkgs/libjpeg/distros/gentoo.txt new file mode 100644 index 00000000000..f729cd7a3e3 --- /dev/null +++ b/build/pkgs/libjpeg/distros/gentoo.txt @@ -0,0 +1 @@ +media-libs/libjpeg-turbo diff --git a/build/pkgs/libjpeg/distros/homebrew.txt b/build/pkgs/libjpeg/distros/homebrew.txt new file mode 100644 index 00000000000..6efed7bed64 --- /dev/null +++ b/build/pkgs/libjpeg/distros/homebrew.txt @@ -0,0 +1 @@ +jpeg-turbo diff --git a/build/pkgs/libjpeg/distros/nix.txt b/build/pkgs/libjpeg/distros/nix.txt new file mode 100644 index 00000000000..9cd50353517 --- /dev/null +++ b/build/pkgs/libjpeg/distros/nix.txt @@ -0,0 +1 @@ +libjpeg-turbo diff --git a/build/pkgs/libjpeg/distros/opensuse.txt b/build/pkgs/libjpeg/distros/opensuse.txt new file mode 100644 index 00000000000..e64e9089096 --- /dev/null +++ b/build/pkgs/libjpeg/distros/opensuse.txt @@ -0,0 +1 @@ +libjpeg-devel diff --git a/build/pkgs/libjpeg/distros/slackware.txt b/build/pkgs/libjpeg/distros/slackware.txt new file mode 100644 index 00000000000..9cd50353517 --- /dev/null +++ b/build/pkgs/libjpeg/distros/slackware.txt @@ -0,0 +1 @@ +libjpeg-turbo diff --git a/build/pkgs/libjpeg/distros/void.txt b/build/pkgs/libjpeg/distros/void.txt new file mode 100644 index 00000000000..1a9c66f7497 --- /dev/null +++ b/build/pkgs/libjpeg/distros/void.txt @@ -0,0 +1 @@ +libjpeg-turbo-devel diff --git a/build/pkgs/libjpeg/spkg-configure.m4 b/build/pkgs/libjpeg/spkg-configure.m4 new file mode 100644 index 00000000000..6eba941222b --- /dev/null +++ b/build/pkgs/libjpeg/spkg-configure.m4 @@ -0,0 +1,7 @@ +SAGE_SPKG_CONFIGURE([libjpeg], [ + PKG_CHECK_MODULES([libjpeg], [libjpeg], [ + AC_SUBST([SAGE_HAVE_LIBJPEG], [1]) + ], [ + sage_spkg_install_libjpeg=yes + ]) +]) diff --git a/build/pkgs/libjpeg/type b/build/pkgs/libjpeg/type new file mode 100644 index 00000000000..134d9bc32d5 --- /dev/null +++ b/build/pkgs/libjpeg/type @@ -0,0 +1 @@ +optional diff --git a/build/pkgs/pandoc/SPKG.rst b/build/pkgs/pandoc/SPKG.rst index b7fda6cc990..a511f0ebe86 100644 --- a/build/pkgs/pandoc/SPKG.rst +++ b/build/pkgs/pandoc/SPKG.rst @@ -4,7 +4,7 @@ pandoc: A document converter Description ----------- -This script package represents the document converter pandoc. +This dummy package represents the document converter pandoc. -We do not have an SPKG for it. The purpose of this script package is to +We do not have an SPKG for it. The purpose of this dummy package is to associate system package lists with it. diff --git a/build/pkgs/pillow/checksums.ini b/build/pkgs/pillow/checksums.ini index afa97cc028f..48c6c3f46ae 100644 --- a/build/pkgs/pillow/checksums.ini +++ b/build/pkgs/pillow/checksums.ini @@ -1,5 +1,5 @@ tarball=Pillow-VERSION.tar.gz -sha1=47c1f2179bc7de5e3413feed08f7a859854030c3 -md5=93a0585ab0ee9717a7576129bdabdf93 -cksum=3176045361 +sha1=be2dc6aeee145894f3ccbc2358a37f7849e710aa +md5=a55618c5d2fd64048dd3ea41bc39f7cd +cksum=3616378816 upstream_url=https://pypi.io/packages/source/p/pillow/Pillow-VERSION.tar.gz diff --git a/build/pkgs/pillow/package-version.txt b/build/pkgs/pillow/package-version.txt index 1532420512a..4149c39eec6 100644 --- a/build/pkgs/pillow/package-version.txt +++ b/build/pkgs/pillow/package-version.txt @@ -1 +1 @@ -10.0.1 +10.1.0 diff --git a/build/pkgs/pillow/spkg-install.in b/build/pkgs/pillow/spkg-install.in index e76b30f7383..1d9d6139fe7 100644 --- a/build/pkgs/pillow/spkg-install.in +++ b/build/pkgs/pillow/spkg-install.in @@ -1,11 +1,13 @@ cd src if [ "$CONDA_PREFIX" != "" ]; then - # Quoted quotes so that whitespace in CONDA_PREFIX works correctly. - # Below we run the command line through eval. PILLOW_CONFIG_SETTINGS="$PILLOW_CONFIG_SETTINGS -C platform-guessing=disable" fi -PILLOW_CONFIG_SETTINGS="-C debug=true -C jpeg=disable $PILLOW_CONFIG_SETTINGS" +if [ "$SAGE_HAVE_LIBJPEG" != 1 ]; then + PILLOW_CONFIG_SETTINGS="-C jpeg=disable $PILLOW_CONFIG_SETTINGS" +fi + +PILLOW_CONFIG_SETTINGS="-C debug=true $PILLOW_CONFIG_SETTINGS" eval sdh_pip_install $PILLOW_CONFIG_SETTINGS . diff --git a/build/pkgs/sage_conf/install-requires.txt b/build/pkgs/sage_conf/install-requires.txt index 768110a40b2..8eb5ae88a85 100644 --- a/build/pkgs/sage_conf/install-requires.txt +++ b/build/pkgs/sage_conf/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-conf ~= 10.2rc4 +sage-conf ~= 10.2 diff --git a/build/pkgs/sage_docbuild/install-requires.txt b/build/pkgs/sage_docbuild/install-requires.txt index 20b4014d9c9..ff18a74200a 100644 --- a/build/pkgs/sage_docbuild/install-requires.txt +++ b/build/pkgs/sage_docbuild/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-docbuild ~= 10.2rc4 +sage-docbuild ~= 10.2 diff --git a/build/pkgs/sage_setup/install-requires.txt b/build/pkgs/sage_setup/install-requires.txt index e8f9803223b..eb6834048e1 100644 --- a/build/pkgs/sage_setup/install-requires.txt +++ b/build/pkgs/sage_setup/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-setup ~= 10.2rc4 +sage-setup ~= 10.2 diff --git a/build/pkgs/sage_sws2rst/install-requires.txt b/build/pkgs/sage_sws2rst/install-requires.txt index 210e209b2b1..5cc98378a84 100644 --- a/build/pkgs/sage_sws2rst/install-requires.txt +++ b/build/pkgs/sage_sws2rst/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-sws2rst ~= 10.2rc4 +sage-sws2rst ~= 10.2 diff --git a/build/pkgs/sagelib/install-requires.txt b/build/pkgs/sagelib/install-requires.txt index 041db2e12b2..8609e43c636 100644 --- a/build/pkgs/sagelib/install-requires.txt +++ b/build/pkgs/sagelib/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-standard ~= 10.2rc4 +sagemath-standard ~= 10.2 diff --git a/build/pkgs/sagemath_bliss/install-requires.txt b/build/pkgs/sagemath_bliss/install-requires.txt index 489dabd64e2..cd1c51681dc 100644 --- a/build/pkgs/sagemath_bliss/install-requires.txt +++ b/build/pkgs/sagemath_bliss/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-bliss ~= 10.2rc4 +sagemath-bliss ~= 10.2 diff --git a/build/pkgs/sagemath_categories/install-requires.txt b/build/pkgs/sagemath_categories/install-requires.txt index c6b1335bb36..017b3d374b0 100644 --- a/build/pkgs/sagemath_categories/install-requires.txt +++ b/build/pkgs/sagemath_categories/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-categories ~= 10.2rc4 +sagemath-categories ~= 10.2 diff --git a/build/pkgs/sagemath_coxeter3/install-requires.txt b/build/pkgs/sagemath_coxeter3/install-requires.txt index 147b0859f3c..40569f233fc 100644 --- a/build/pkgs/sagemath_coxeter3/install-requires.txt +++ b/build/pkgs/sagemath_coxeter3/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-coxeter3 ~= 10.2rc4 +sagemath-coxeter3 ~= 10.2 diff --git a/build/pkgs/sagemath_environment/install-requires.txt b/build/pkgs/sagemath_environment/install-requires.txt index 7a744b52d45..a1f32f6bc98 100644 --- a/build/pkgs/sagemath_environment/install-requires.txt +++ b/build/pkgs/sagemath_environment/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-environment ~= 10.2rc4 +sagemath-environment ~= 10.2 diff --git a/build/pkgs/sagemath_mcqd/install-requires.txt b/build/pkgs/sagemath_mcqd/install-requires.txt index 6aa36800227..7f4164c93a1 100644 --- a/build/pkgs/sagemath_mcqd/install-requires.txt +++ b/build/pkgs/sagemath_mcqd/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-mcqd ~= 10.2rc4 +sagemath-mcqd ~= 10.2 diff --git a/build/pkgs/sagemath_meataxe/install-requires.txt b/build/pkgs/sagemath_meataxe/install-requires.txt index f94e1aac639..9122afd82be 100644 --- a/build/pkgs/sagemath_meataxe/install-requires.txt +++ b/build/pkgs/sagemath_meataxe/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-meataxe ~= 10.2rc4 +sagemath-meataxe ~= 10.2 diff --git a/build/pkgs/sagemath_objects/install-requires.txt b/build/pkgs/sagemath_objects/install-requires.txt index 772df655f0d..a322fd5489f 100644 --- a/build/pkgs/sagemath_objects/install-requires.txt +++ b/build/pkgs/sagemath_objects/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-objects ~= 10.2rc4 +sagemath-objects ~= 10.2 diff --git a/build/pkgs/sagemath_repl/install-requires.txt b/build/pkgs/sagemath_repl/install-requires.txt index 850ce7e19d3..9c272edab74 100644 --- a/build/pkgs/sagemath_repl/install-requires.txt +++ b/build/pkgs/sagemath_repl/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-repl ~= 10.2rc4 +sagemath-repl ~= 10.2 diff --git a/build/pkgs/sagemath_sirocco/install-requires.txt b/build/pkgs/sagemath_sirocco/install-requires.txt index f3cc76b26fa..e7ab8fa942b 100644 --- a/build/pkgs/sagemath_sirocco/install-requires.txt +++ b/build/pkgs/sagemath_sirocco/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-sirocco ~= 10.2rc4 +sagemath-sirocco ~= 10.2 diff --git a/build/pkgs/sagemath_tdlib/install-requires.txt b/build/pkgs/sagemath_tdlib/install-requires.txt index bffa6c8223c..f717989d8c4 100644 --- a/build/pkgs/sagemath_tdlib/install-requires.txt +++ b/build/pkgs/sagemath_tdlib/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-tdlib ~= 10.2rc4 +sagemath-tdlib ~= 10.2 diff --git a/build/sage_bootstrap/uninstall.py b/build/sage_bootstrap/uninstall.py index 7cd808d0fe7..5940672b977 100644 --- a/build/sage_bootstrap/uninstall.py +++ b/build/sage_bootstrap/uninstall.py @@ -172,6 +172,17 @@ def modern_uninstall(spkg_name, sage_local, files, verbose=False): else: sys.exit(1) + # Run the package's piprm script, if it exists. + # Since #36452 the spkg-requirements.txt file appears in the installation + # manifest, so this step has to happen before removing the files. + try: + run_spkg_script(spkg_name, spkg_scripts, 'piprm', + 'pip-uninstall') + except Exception: + print("Warning: Error running the pip-uninstall script for " + "'{0}'; uninstallation may have left behind some files".format( + spkg_name), file=sys.stderr) + def rmdir(dirname): if pth.isdir(dirname): if not os.listdir(dirname): @@ -200,15 +211,6 @@ def rmdir(dirname): # Remove file's directory if it is now empty rmdir(dirname) - # Run the package's piprm script, if it exists. - try: - run_spkg_script(spkg_name, spkg_scripts, 'piprm', - 'pip-uninstall') - except Exception: - print("Warning: Error running the pip-uninstall script for " - "'{0}'; uninstallation may have left behind some files".format( - spkg_name), file=sys.stderr) - # Run the package's postrm script, if it exists. # If an error occurs here print a warning, but complete the # uninstallation; otherwise we leave the package in a broken diff --git a/pkgs/sage-conf/VERSION.txt b/pkgs/sage-conf/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sage-conf/VERSION.txt +++ b/pkgs/sage-conf/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sage-conf_conda/VERSION.txt b/pkgs/sage-conf_conda/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sage-conf_conda/VERSION.txt +++ b/pkgs/sage-conf_conda/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sage-conf_pypi/VERSION.txt b/pkgs/sage-conf_pypi/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sage-conf_pypi/VERSION.txt +++ b/pkgs/sage-conf_pypi/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sage-docbuild/VERSION.txt b/pkgs/sage-docbuild/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sage-docbuild/VERSION.txt +++ b/pkgs/sage-docbuild/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sage-setup/VERSION.txt b/pkgs/sage-setup/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sage-setup/VERSION.txt +++ b/pkgs/sage-setup/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sage-sws2rst/VERSION.txt b/pkgs/sage-sws2rst/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sage-sws2rst/VERSION.txt +++ b/pkgs/sage-sws2rst/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-bliss/VERSION.txt b/pkgs/sagemath-bliss/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-bliss/VERSION.txt +++ b/pkgs/sagemath-bliss/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-categories/VERSION.txt b/pkgs/sagemath-categories/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-categories/VERSION.txt +++ b/pkgs/sagemath-categories/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-coxeter3/VERSION.txt b/pkgs/sagemath-coxeter3/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-coxeter3/VERSION.txt +++ b/pkgs/sagemath-coxeter3/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-environment/VERSION.txt b/pkgs/sagemath-environment/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-environment/VERSION.txt +++ b/pkgs/sagemath-environment/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-mcqd/VERSION.txt b/pkgs/sagemath-mcqd/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-mcqd/VERSION.txt +++ b/pkgs/sagemath-mcqd/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-meataxe/VERSION.txt b/pkgs/sagemath-meataxe/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-meataxe/VERSION.txt +++ b/pkgs/sagemath-meataxe/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-objects/VERSION.txt b/pkgs/sagemath-objects/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-objects/VERSION.txt +++ b/pkgs/sagemath-objects/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-repl/VERSION.txt b/pkgs/sagemath-repl/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-repl/VERSION.txt +++ b/pkgs/sagemath-repl/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-sirocco/VERSION.txt b/pkgs/sagemath-sirocco/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-sirocco/VERSION.txt +++ b/pkgs/sagemath-sirocco/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/pkgs/sagemath-tdlib/VERSION.txt b/pkgs/sagemath-tdlib/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/pkgs/sagemath-tdlib/VERSION.txt +++ b/pkgs/sagemath-tdlib/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/src/VERSION.txt b/src/VERSION.txt index 6bdcf0406e9..e2498ea52d3 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -10.2.rc4 +10.2 diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index c2a6f2749ae..17ce1d95cd5 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -4,6 +4,6 @@ # which stops "setup.py develop" from rewriting it as a Python file. : # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='10.2.rc4' -SAGE_RELEASE_DATE='2023-11-17' -SAGE_VERSION_BANNER='SageMath version 10.2.rc4, Release Date: 2023-11-17' +SAGE_VERSION='10.2' +SAGE_RELEASE_DATE='2023-12-03' +SAGE_VERSION_BANNER='SageMath version 10.2, Release Date: 2023-12-03' diff --git a/src/sage/graphs/graph_generators.py b/src/sage/graphs/graph_generators.py index 7e2a2341a46..485316db4e3 100644 --- a/src/sage/graphs/graph_generators.py +++ b/src/sage/graphs/graph_generators.py @@ -1130,7 +1130,7 @@ def nauty_genbg(self, options="", debug=False): sage: list(graphs.nauty_genbg("-c1 2", debug=True)) ['>E Usage: ...genbg [-c -ugs -vq -lzF] [-Z#] [-D#] [-A] [-d#|-d#:#] [-D#|-D#:#] n1 n2... sage: list(graphs.nauty_genbg("-c 1 2", debug=True)) - ['>A ...genbg n=1+2 e=2:2 d=1:1 D=2:1 c\n', Bipartite graph on 3 vertices] + ['>A ...genbg n=1+2 e=2:2 d=1:1 D=2:1 c...\n', Bipartite graph on 3 vertices] We must have n1=1..24, n2=0..32 and n1+n2=1..32 (:trac:`34179`):: diff --git a/src/sage/quadratic_forms/quadratic_form__neighbors.py b/src/sage/quadratic_forms/quadratic_form__neighbors.py index fb781e20122..ec853cd52ef 100644 --- a/src/sage/quadratic_forms/quadratic_form__neighbors.py +++ b/src/sage/quadratic_forms/quadratic_form__neighbors.py @@ -74,6 +74,10 @@ def find_primitive_p_divisible_vector__next(self, p, v=None): sage: v = Q.find_primitive_p_divisible_vector__next(5, v); v (1, 0) sage: v = Q.find_primitive_p_divisible_vector__next(5, v); v + sage: v = Q.find_primitive_p_divisible_vector__next(2) ; v + (0, 1) + sage: v = Q.find_primitive_p_divisible_vector__next(2, v) ; v + (1, 0) sage: Q = QuadraticForm(QQ, matrix.diagonal([1,1,1,1])) sage: v = Q.find_primitive_p_divisible_vector__next(2) sage: Q(v) @@ -83,6 +87,9 @@ def find_primitive_p_divisible_vector__next(self, p, v=None): n = self.dim() if v is None: w = vector(ZZ, [0] * (n - 1) + [1]) + a = self(w) + if a in ZZ and (a % p == 0): + return w else: w = deepcopy(v) @@ -132,7 +139,7 @@ def find_primitive_p_divisible_vector__next(self, p, v=None): return w -def find_p_neighbor_from_vec(self, p, y): +def find_p_neighbor_from_vec(self, p, y, return_matrix=False): r""" Return the `p`-neighbor of ``self`` defined by ``y``. @@ -147,25 +154,32 @@ def find_p_neighbor_from_vec(self, p, y): - ``p`` -- a prime number - ``y`` -- a vector with `q(y) \in p \ZZ` - ``odd`` -- (default: ``False``) if `p=2`, return also odd neighbors + - ``return_matrix`` -- (boolean, default ``False``) return + the transformation matrix instead of the quadratic form EXAMPLES:: + sage: # needs sage.libs.pari sage: Q = DiagonalQuadraticForm(ZZ, [1,1,1,1]) sage: v = vector([0,2,1,1]) - sage: X = Q.find_p_neighbor_from_vec(3, v); X # needs sage.libs.pari + sage: X = Q.find_p_neighbor_from_vec(3, v); X Quadratic form in 4 variables over Integer Ring with coefficients: [ 1 0 0 0 ] [ * 1 4 4 ] [ * * 5 12 ] [ * * * 9 ] + sage: B = Q.find_p_neighbor_from_vec(3, v, return_matrix=True) + sage: Q(B) == X + True Since the base ring and the domain are not yet separate, for rational, half integral forms we just pretend the base ring is `\ZZ`:: + sage: # needs sage.libs.pari sage: Q = QuadraticForm(QQ, matrix.diagonal([1,1,1,1])) sage: v = vector([1,1,1,1]) - sage: Q.find_p_neighbor_from_vec(2, v) # needs sage.libs.pari + sage: Q.find_p_neighbor_from_vec(2, v) Quadratic form in 4 variables over Rational Field with coefficients: [ 1/2 1 1 1 ] [ * 1 1 2 ] @@ -227,9 +241,12 @@ def find_p_neighbor_from_vec(self, p, y): # by definition this is the p-neighbor of L at y # assert B.det().abs() == 1 - QF = self.parent() - Gnew = (B*G*B.T).change_ring(R) - return QF(Gnew) + if return_matrix: + return B.T + else: + QF = self.parent() + Gnew = (B*G*B.T).change_ring(R) + return QF(Gnew) def neighbor_iteration(seeds, p, mass=None, max_classes=ZZ(10)**3, diff --git a/src/sage/quadratic_forms/ternary.pyx b/src/sage/quadratic_forms/ternary.pyx index 28dd9514c30..6e7c4389083 100644 --- a/src/sage/quadratic_forms/ternary.pyx +++ b/src/sage/quadratic_forms/ternary.pyx @@ -955,7 +955,26 @@ def extend(v): [ 30 0 -7] sage: M.det() 2 + + TESTS:: + + sage: M = matrix(3, extend( (0, 0, 1) )) + sage: M.det() + 1 + sage: M.column(0) + (0, 0, 1) + sage: M = matrix(3, extend( (0, 0, -2) )) + sage: M.det() + 2 + sage: M.column(0) + (0, 0, -2) """ + if v[0] == v[1] == 0: + if v[2] < 0: + return v[0], 0, 1, v[1], 1, 0, v[2], 0, 0 + else: + return v[0], 1, 0, v[1], 0, 1, v[2], 0, 0 + b1 = xgcd(v[0], v[1]) b2 = xgcd(b1[1], b1[2]) b3 = xgcd(b1[0], v[2]) diff --git a/src/sage/quadratic_forms/ternary_qf.py b/src/sage/quadratic_forms/ternary_qf.py index fa4499566a9..2f3a57fa713 100644 --- a/src/sage/quadratic_forms/ternary_qf.py +++ b/src/sage/quadratic_forms/ternary_qf.py @@ -918,6 +918,13 @@ def find_p_neighbor_from_vec(self, p, v, mat=False): [ 0 -3/11 13/11] sage: Q(M) == Q11 True + + Test that it works with (0, 0, 1):: + + sage: Q.find_p_neighbor_from_vec(3, (0,0,1)) + Ternary quadratic form with integer coefficients: + [1 3 3] + [-2 0 -1] """ if mat: q, M = _find_p_neighbor_from_vec(self._a, self._b, self._c, self._r, self._s, self._t, p, v, mat) diff --git a/src/sage/version.py b/src/sage/version.py index 106eb6564e7..911aeb53f24 100644 --- a/src/sage/version.py +++ b/src/sage/version.py @@ -1,5 +1,5 @@ # Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! -version = '10.2.rc4' -date = '2023-11-17' -banner = 'SageMath version 10.2.rc4, Release Date: 2023-11-17' +version = '10.2' +date = '2023-12-03' +banner = 'SageMath version 10.2, Release Date: 2023-12-03'