From a859ac2863821f89a82b8539457e3a0f732002ca Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 24 Oct 2023 08:23:45 -0400 Subject: [PATCH 01/70] src/sage/misc/latex.py: fix view() Rewriting the view() function to use python's tempfile module instead of sage's own tmp_dir() accidentally broke this function, because the viewer program needs the file to be slightly less temporary than we made it. The viewer would launch, but then view() would immediately return, causing the file that the viewer was about to look for to be deleted. To fix it, we now launch the viewer program synchronously within a helper function, but launch that helper function asynchronously in a new thread. This allows us to clean up the temporary directory only after the subprocess has completed, but still lets view() return immediately. Closes: https://github.com/sagemath/sage/issues/36526 --- src/sage/misc/latex.py | 65 ++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/src/sage/misc/latex.py b/src/sage/misc/latex.py index e0d32725cec..602a24f404a 100644 --- a/src/sage/misc/latex.py +++ b/src/sage/misc/latex.py @@ -29,7 +29,7 @@ import random import re import shutil -from subprocess import call, PIPE +from subprocess import call, run, PIPE from tempfile import TemporaryDirectory from sage.misc.cachefunc import cached_function, cached_method @@ -1923,27 +1923,48 @@ def view(objects, title='Sage', debug=False, sep='', tiny=False, if pdflatex or (viewer == "pdf" and engine == "latex"): engine = "pdflatex" # command line or notebook with viewer - with TemporaryDirectory() as tmp: - tex_file = os.path.join(tmp, "sage.tex") - with open(tex_file, 'w') as file: - file.write(s) - suffix = _run_latex_(tex_file, debug=debug, engine=engine, png=False) - if suffix == "pdf": - from sage.misc.viewer import pdf_viewer - viewer = pdf_viewer() - elif suffix == "dvi": - from sage.misc.viewer import dvi_viewer - viewer = dvi_viewer() - else: - print("Latex error") - return - output_file = os.path.join(tmp, "sage." + suffix) - # this should get changed if we switch the stuff in misc.viewer to - # producing lists - if debug: - print('viewer: "{}"'.format(viewer)) - call('%s %s' % (viewer, output_file), shell=True, - stdout=PIPE, stderr=PIPE) + + # We can't automatically delete the temporary file in this case + # because we need it to live at least long enough for the viewer + # to open it. Since we're launching the viewer asynchronously, + # that would be tricky. + tmp = TemporaryDirectory() + + tex_file = os.path.join(tmp.name, "sage.tex") + with open(tex_file, 'w') as file: + file.write(s) + suffix = _run_latex_(tex_file, debug=debug, engine=engine, png=False) + if suffix == "pdf": + from sage.misc.viewer import pdf_viewer + viewer = pdf_viewer() + elif suffix == "dvi": + from sage.misc.viewer import dvi_viewer + viewer = dvi_viewer() + else: + print("Latex error") + tmp.cleanup() + return + output_file = os.path.join(tmp.name, "sage." + suffix) + # this should get changed if we switch the stuff in misc.viewer to + # producing lists + if debug: + print('viewer: "{}"'.format(viewer)) + + # Return immediately but only clean up the temporary file after + # the viewer has closed. This function is synchronous and waits + # for the process to complete... + def run_viewer(): + run([viewer, output_file], capture_output=True) + tmp.cleanup() + + # ...but we execute it asynchronously so that view() completes + # immediately. The "daemon" flag is important because, without it, + # sage won't quit until the viewer does. + from threading import Thread + t = Thread(target=run_viewer) + t.daemon = True + t.start() + return From 5251c2fa964b0e510d2043fee805d9c9c95c2781 Mon Sep 17 00:00:00 2001 From: "John H. Palmieri" Date: Mon, 30 Oct 2023 15:56:20 -0700 Subject: [PATCH 02/70] sage-env: identify the version of command-line tools (OS X) --- src/bin/sage-env | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bin/sage-env b/src/bin/sage-env index 5c1b4b87ac7..9cdd5db453f 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -277,6 +277,15 @@ export UNAME=`uname | sed 's/CYGWIN.*/CYGWIN/' ` # Mac OS X-specific setup if [ "$UNAME" = "Darwin" ]; then export MACOSX_VERSION=`uname -r | awk -F. '{print $1}'` + # Try to identify command-line tools version. + # See https://apple.stackexchange.com/q/180957/351985. + XCLT_VERSION=`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | awk '/version: / { print $NF }' | cut -d. -f-1` + # If this didn't produce an integer, set to 0. + case $XCLT_VERSION in + ''|*[!0-9]*) export XCLT_VERSION=0 ;; # bad + *) : ;; # good + esac + export XCLT_VERSION # Work around problems on recent OS X crashing with an error message # "... may have been in progress in another thread when fork() was called" # when objective-C functions are called after fork(). See Issue #25921. From 9fd89da36df7521fa85f3a787b70beef18b7d04d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 31 Oct 2023 12:38:15 -0700 Subject: [PATCH 03/70] .github/workflows: Replace always() by (success() || failure()), except for uploads of logs etc --- .github/workflows/build.yml | 20 ++++++++++---------- .github/workflows/doc-build-pdf.yml | 8 ++++---- .github/workflows/doc-build.yml | 8 ++++---- .github/workflows/lint.yml | 6 +++--- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ac9c6154d0..ab66ec4fa95 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,7 +96,7 @@ jobs: SAGE_NUM_THREADS: 2 - name: Build modularized distributions - if: always() && steps.worktree.outcome == 'success' + if: (success() || failure()) && steps.worktree.outcome == 'success' run: make V=0 tox && make SAGE_CHECK=no pypi-wheels working-directory: ./worktree-image env: @@ -104,7 +104,7 @@ jobs: SAGE_NUM_THREADS: 2 - name: Static code check with pyright - if: always() && steps.worktree.outcome == 'success' + if: (success() || failure()) && steps.worktree.outcome == 'success' uses: jakebailey/pyright-action@v1 with: version: 1.1.332 @@ -116,7 +116,7 @@ jobs: NODE_OPTIONS: --max-old-space-size=8192 - name: Static code check with pyright (annotated) - if: always() && steps.worktree.outcome == 'success' + if: (success() || failure()) && steps.worktree.outcome == 'success' uses: jakebailey/pyright-action@v1 with: version: 1.1.332 @@ -130,7 +130,7 @@ jobs: - name: Clean (fallback to non-incremental) id: clean - if: always() && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success' + if: (success() || failure()) && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success' run: | set -ex ./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status @@ -143,7 +143,7 @@ jobs: # This step is needed because building the modularized distributions installs some optional packages, # so the editable install of sagelib needs to build the corresponding optional extension modules. id: build - if: always() && (steps.incremental.outcome == 'success' || steps.clean.outcome == 'success') + if: (success() || failure()) && (steps.incremental.outcome == 'success' || steps.clean.outcome == 'success') run: | make build working-directory: ./worktree-image @@ -154,7 +154,7 @@ jobs: # Testing - name: Test changed files (sage -t --new) - if: always() && steps.build.outcome == 'success' + if: (success() || failure()) && steps.build.outcome == 'success' run: | # We run tests with "sage -t --new"; this only tests the uncommitted changes. ./sage -t --new -p2 @@ -164,7 +164,7 @@ jobs: SAGE_NUM_THREADS: 2 - name: Test modularized distributions - if: always() && steps.build.outcome == 'success' + if: (success() || failure()) && steps.build.outcome == 'success' run: make V=0 tox && make pypi-wheels-check working-directory: ./worktree-image env: @@ -182,14 +182,14 @@ jobs: COLUMNS: 120 - name: Test all files (sage -t --all --long) - if: always() && steps.build.outcome == 'success' + if: (success() || failure()) && steps.build.outcome == 'success' run: | ../sage -python -m pip install coverage ../sage -python -m coverage run ./bin/sage-runtests --all --long -p2 --random-seed=286735480429121101562228604801325644303 working-directory: ./worktree-image/src - name: Prepare coverage results - if: always() && steps.build.outcome == 'success' + if: (success() || failure()) && steps.build.outcome == 'success' run: | ./venv/bin/python3 -m coverage combine src/.coverage/ ./venv/bin/python3 -m coverage xml @@ -197,7 +197,7 @@ jobs: working-directory: ./worktree-image - name: Upload coverage to codecov - if: always() && steps.build.outcome == 'success' + if: (success() || failure()) && steps.build.outcome == 'success' uses: codecov/codecov-action@v3 with: files: ./worktree-image/coverage.xml diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index 2128277fbca..227ae001870 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -94,7 +94,7 @@ jobs: - name: Build (fallback to non-incremental) id: build - if: always() && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success' + if: (success() || failure()) && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success' run: | set -ex make sagelib-clean && git clean -fx src/sage && ./config.status && make build @@ -105,7 +105,7 @@ jobs: - name: Build docs (PDF) id: docbuild - if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success') + if: (success() || failure()) && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success') run: | make doc-clean doc-uninstall; make doc-pdf working-directory: ./worktree-image @@ -114,7 +114,7 @@ jobs: SAGE_NUM_THREADS: 2 - name: Copy docs - if: always() && steps.docbuild.outcome == 'success' + if: (success() || failure()) && steps.docbuild.outcome == 'success' run: | # For some reason the deploy step below cannot find /sage/... # So copy everything from there to local folder @@ -124,7 +124,7 @@ jobs: zip -r docs-pdf.zip docs - name: Upload docs - if: always() && steps.copy.outcome == 'success' + if: (success() || failure()) && steps.copy.outcome == 'success' uses: actions/upload-artifact@v3 with: name: docs-pdf diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 5eb3998feee..4e66cdac5f0 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -99,7 +99,7 @@ jobs: - name: Build (fallback to non-incremental) id: build - if: always() && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success' + if: (success() || failure()) && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success' run: | set -ex make sagelib-clean && git clean -fx src/sage && ./config.status && make sagemath_doc_html-build-deps @@ -110,7 +110,7 @@ jobs: - name: Build docs id: docbuild - if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success') + if: (success() || failure()) && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success') # Always non-incremental because of the concern that # incremental docbuild may introduce broken links (inter-file references) though build succeeds run: | @@ -127,7 +127,7 @@ jobs: - name: Copy docs id: copy - if: always() && steps.docbuild.outcome == 'success' + if: (success() || failure()) && steps.docbuild.outcome == 'success' run: | set -ex mkdir -p ./docs @@ -191,7 +191,7 @@ jobs: zip -r docs.zip docs - name: Upload docs - if: always() && steps.copy.outcome == 'success' + if: (success() || failure()) && steps.copy.outcome == 'success' uses: actions/upload-artifact@v3 with: name: docs diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 41560674b49..7821ea20212 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,13 +37,13 @@ jobs: run: pip install tox - name: Code style check with pycodestyle - if: always() && steps.deps.outcome == 'success' + if: (success() || failure()) && steps.deps.outcome == 'success' run: tox -e pycodestyle-minimal - name: Code style check with relint - if: always() && steps.deps.outcome == 'success' + if: (success() || failure()) && steps.deps.outcome == 'success' run: tox -e relint -- src/sage/ - name: Validate docstring markup as RST - if: always() && steps.deps.outcome == 'success' + if: (success() || failure()) && steps.deps.outcome == 'success' run: tox -e rst From 2341fb400fa20b673422c56337ba03d9befed48e Mon Sep 17 00:00:00 2001 From: "John H. Palmieri" Date: Wed, 1 Nov 2023 21:39:31 -0700 Subject: [PATCH 04/70] Set LDFLAGS depending on version of OS X command-line tools --- src/bin/sage-env | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/sage-env b/src/bin/sage-env index 9cdd5db453f..72aa454bf4a 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -383,7 +383,11 @@ if [ -n "$PYTHONHOME" ]; then fi if [ -n "$SAGE_LOCAL" ]; then - LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS" + if [ "$UNAME" = "Darwin" ] && [ "$XCLT_VERSION" -ge 15 ]; then + LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-ld_classic,-rpath,$SAGE_LOCAL/lib $LDFLAGS" + else + LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS" + fi if [ "$UNAME" = "Linux" ]; then LDFLAGS="-Wl,-rpath-link,$SAGE_LOCAL/lib $LDFLAGS" fi From 0d47115ef51b312b8dbdda9d1df657b838580ade Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 20:52:40 -0700 Subject: [PATCH 05/70] tox.ini (centos-7): Download mirror_list using http, not https --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 6293831c44f..ad3d833eeef 100644 --- a/tox.ini +++ b/tox.ini @@ -308,6 +308,7 @@ setenv = centos: BASE_IMAGE=centos centos: IGNORE_MISSING_SYSTEM_PACKAGES=yes centos-7: BASE_TAG=centos7 + centos-7: BOOTSTRAP=sed -i.bak s/https/http/ .upstream.d/*_mirror_list; ./bootstrap centos-stream: BASE_IMAGE=quay.io/centos/centos centos-stream: BASE_TAG=stream centos-stream-8: BASE_TAG=stream8 From 5f29842a5a57fafb3338277683518dc31a95e03c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 20:53:12 -0700 Subject: [PATCH 06/70] .github/workflows/docker.yml: Remove gentoo-python3.12 for now --- .github/workflows/docker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c12ec820f83..a3986899a7d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -51,7 +51,6 @@ on: "almalinux-9-python3.11", "gentoo-python3.10", "gentoo-python3.11", - "gentoo-python3.12", "archlinux-latest", "opensuse-15.3-gcc_11-python3.9", "opensuse-15.4-gcc_11-python3.10", From fc7427d67be7efae323852ef49bcb9a525d53966 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 21:04:15 -0700 Subject: [PATCH 07/70] tox.ini (centos-7): Download mirror_list using http, not https (fixup) --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index ad3d833eeef..c039103f422 100644 --- a/tox.ini +++ b/tox.ini @@ -308,7 +308,7 @@ setenv = centos: BASE_IMAGE=centos centos: IGNORE_MISSING_SYSTEM_PACKAGES=yes centos-7: BASE_TAG=centos7 - centos-7: BOOTSTRAP=sed -i.bak s/https/http/ .upstream.d/*_mirror_list; ./bootstrap + centos-7: BOOTSTRAP=sed -i.bak s/https/http/ .upstream.d/*mirror_list; ./bootstrap centos-stream: BASE_IMAGE=quay.io/centos/centos centos-stream: BASE_TAG=stream centos-stream-8: BASE_TAG=stream8 From d862f7c71f68edf5b176ada4211e0a67a5731837 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 1 Nov 2023 22:53:39 -0700 Subject: [PATCH 08/70] build/pkgs/_python3.*/distros/conda.txt: New --- build/pkgs/_python3.10/distros/conda.txt | 1 + build/pkgs/_python3.11/distros/conda.txt | 1 + build/pkgs/_python3.12/distros/conda.txt | 1 + build/pkgs/_python3.9/distros/conda.txt | 1 + 4 files changed, 4 insertions(+) create mode 100644 build/pkgs/_python3.10/distros/conda.txt create mode 100644 build/pkgs/_python3.11/distros/conda.txt create mode 100644 build/pkgs/_python3.12/distros/conda.txt create mode 100644 build/pkgs/_python3.9/distros/conda.txt diff --git a/build/pkgs/_python3.10/distros/conda.txt b/build/pkgs/_python3.10/distros/conda.txt new file mode 100644 index 00000000000..0e2312f6abf --- /dev/null +++ b/build/pkgs/_python3.10/distros/conda.txt @@ -0,0 +1 @@ +python==3.10 diff --git a/build/pkgs/_python3.11/distros/conda.txt b/build/pkgs/_python3.11/distros/conda.txt new file mode 100644 index 00000000000..875818d94e8 --- /dev/null +++ b/build/pkgs/_python3.11/distros/conda.txt @@ -0,0 +1 @@ +python==3.11 diff --git a/build/pkgs/_python3.12/distros/conda.txt b/build/pkgs/_python3.12/distros/conda.txt new file mode 100644 index 00000000000..08c4473f336 --- /dev/null +++ b/build/pkgs/_python3.12/distros/conda.txt @@ -0,0 +1 @@ +python==3.12 diff --git a/build/pkgs/_python3.9/distros/conda.txt b/build/pkgs/_python3.9/distros/conda.txt new file mode 100644 index 00000000000..ca224649651 --- /dev/null +++ b/build/pkgs/_python3.9/distros/conda.txt @@ -0,0 +1 @@ +python==3.9 From 1d2231b9f77ce9bf09a5eddd6bc7c88756ef7678 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 1 Nov 2023 22:54:27 -0700 Subject: [PATCH 09/70] CI Linux: Switch conda-forge to conda-forge-python3.11 --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a3986899a7d..4b579562876 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -57,7 +57,7 @@ on: "opensuse-15.5-gcc_11-python3.11", "opensuse-tumbleweed-python3.10", "opensuse-tumbleweed", - "conda-forge", + "conda-forge-python3.11", "ubuntu-bionic-gcc_8-i386", "debian-bullseye-i386", ] From 0eaed3c4a04f90e9747ae17fa3e0f55373af5373 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 4 Nov 2023 15:16:31 -0700 Subject: [PATCH 10/70] .github/workflows/macos.yml: Use xcode_13.2.1 with macOS 11 so that homebrew does not complain --- .github/workflows/macos.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5b448cec1bb..91c38807e76 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -21,16 +21,16 @@ on: osversion_xcodeversion_toxenv_tuples: description: 'Stringified JSON object' default: >- - [["latest", "", "homebrew-macos-usrlocal-minimal"], - ["latest", "", "homebrew-macos-usrlocal-standard"], - ["11", "xcode_11.7", "homebrew-macos-usrlocal-standard"], - ["12", "", "homebrew-macos-usrlocal-standard"], - ["13", "xcode_15.0", "homebrew-macos-usrlocal-standard"], - ["latest", "", "homebrew-macos-usrlocal-maximal"], - ["latest", "", "homebrew-macos-usrlocal-python3_xcode-standard"], - ["latest", "", "conda-forge-macos-minimal"], - ["latest", "", "conda-forge-macos-standard"], - ["latest", "", "conda-forge-macos-maximal"]] + [["latest", "", "homebrew-macos-usrlocal-minimal"], + ["latest", "", "homebrew-macos-usrlocal-standard"], + ["11", "xcode_13.2.1", "homebrew-macos-usrlocal-standard"], + ["12", "", "homebrew-macos-usrlocal-standard"], + ["13", "xcode_15.0", "homebrew-macos-usrlocal-standard"], + ["latest", "", "homebrew-macos-usrlocal-maximal"], + ["latest", "", "homebrew-macos-usrlocal-python3_xcode-standard"], + ["latest", "", "conda-forge-macos-minimal"], + ["latest", "", "conda-forge-macos-standard"], + ["latest", "", "conda-forge-macos-maximal"]] type: string extra_sage_packages: description: 'Extra Sage packages to install as system packages' From 166eb132f6179d73357989403fb29417eb8cb36e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 4 Nov 2023 15:18:47 -0700 Subject: [PATCH 11/70] .github/workflows/ci-macos.yml (dist): Fix use of 'git describe' --- .github/workflows/ci-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 9482eb9632b..2d101f7878a 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -85,7 +85,7 @@ jobs: run: | git config --global user.email "nobody@example.com" git config --global user.name "Sage GitHub CI" - SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(git describe) || echo "(ignoring error)" + SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(git describe --tags) || echo "(ignoring error)" - name: make dist run: | ./configure --enable-download-from-upstream-url && make dist From 543cd2dca5f88a23aacd5c50132b32639a87c083 Mon Sep 17 00:00:00 2001 From: "John H. Palmieri" Date: Sat, 4 Nov 2023 15:52:23 -0700 Subject: [PATCH 12/70] Check whether command-line tools includes the executable ld-classic, and if so, set LDFLAGS to use it. --- src/bin/sage-env | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/bin/sage-env b/src/bin/sage-env index 72aa454bf4a..b4fca91b314 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -277,15 +277,6 @@ export UNAME=`uname | sed 's/CYGWIN.*/CYGWIN/' ` # Mac OS X-specific setup if [ "$UNAME" = "Darwin" ]; then export MACOSX_VERSION=`uname -r | awk -F. '{print $1}'` - # Try to identify command-line tools version. - # See https://apple.stackexchange.com/q/180957/351985. - XCLT_VERSION=`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | awk '/version: / { print $NF }' | cut -d. -f-1` - # If this didn't produce an integer, set to 0. - case $XCLT_VERSION in - ''|*[!0-9]*) export XCLT_VERSION=0 ;; # bad - *) : ;; # good - esac - export XCLT_VERSION # Work around problems on recent OS X crashing with an error message # "... may have been in progress in another thread when fork() was called" # when objective-C functions are called after fork(). See Issue #25921. @@ -383,7 +374,10 @@ if [ -n "$PYTHONHOME" ]; then fi if [ -n "$SAGE_LOCAL" ]; then - if [ "$UNAME" = "Darwin" ] && [ "$XCLT_VERSION" -ge 15 ]; then + # On OS X, test whether "ld-classic" is present in the installed + # version of the command-line tools. If so, we add "-ld_classic" + # to LD_FLAGS. See #36599. + if [ "$UNAME" = "Darwin" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" ] ; then LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-ld_classic,-rpath,$SAGE_LOCAL/lib $LDFLAGS" else LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS" From eff3be578a8efae01d8cdfcb8d79f7dd2341f2e3 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 5 Nov 2023 09:05:59 +0900 Subject: [PATCH 13/70] Check sagemath/sage also on publish-live-doc job --- .github/workflows/doc-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 1a42a22dbb8..961809e343e 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -94,7 +94,7 @@ jobs: publish-live-doc: runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'develop' + if: github.event.workflow_run.conclusion == 'success' && github.repository == 'sagemath/sage' && github.event.workflow_run.head_branch == 'develop' steps: - name: Download live doc uses: actions/github-script@v6.4.1 From 9ce90a05ffcd798eb96c06cf9be6555e0d1baa03 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 5 Nov 2023 09:16:38 +0900 Subject: [PATCH 14/70] Soothe linter --- src/sage/misc/sageinspect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index 8c734ecd36d..0fa8551a271 100644 --- a/src/sage/misc/sageinspect.py +++ b/src/sage/misc/sageinspect.py @@ -1806,8 +1806,10 @@ def formatannotation(annotation, base_module=None): return annotation.__module__ + '.' + annotation.__qualname__ return repr(annotation) + _formatannotation = formatannotation + def sage_formatargspec(args, varargs=None, varkw=None, defaults=None, kwonlyargs=(), kwonlydefaults=None, annotations={}, formatarg=str, From fb22d1cdbf4e3870c7cf3995d5d0780735481ed1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 5 Nov 2023 08:40:50 -0800 Subject: [PATCH 15/70] src/sage/misc/sageinspect.py: Fix pycodestyle complaint --- src/sage/misc/sageinspect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index 8c734ecd36d..0fa8551a271 100644 --- a/src/sage/misc/sageinspect.py +++ b/src/sage/misc/sageinspect.py @@ -1806,8 +1806,10 @@ def formatannotation(annotation, base_module=None): return annotation.__module__ + '.' + annotation.__qualname__ return repr(annotation) + _formatannotation = formatannotation + def sage_formatargspec(args, varargs=None, varkw=None, defaults=None, kwonlyargs=(), kwonlydefaults=None, annotations={}, formatarg=str, From 7dabb0a656dcbf6d670be0bd0faebbc36240b9ad Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 5 Nov 2023 15:16:19 -0800 Subject: [PATCH 16/70] build/pkgs/prompt_toolkit/distros/conda.txt: Use version range as in install-requires.txt --- build/pkgs/prompt_toolkit/distros/conda.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/prompt_toolkit/distros/conda.txt b/build/pkgs/prompt_toolkit/distros/conda.txt index 29392dfc5b3..bfb1ed6a874 100644 --- a/build/pkgs/prompt_toolkit/distros/conda.txt +++ b/build/pkgs/prompt_toolkit/distros/conda.txt @@ -1 +1 @@ -prompt_toolkit +prompt_toolkit>=3.0.5,<3.0.25 From 8e26e8ecd912dff2ec47775d8cd24c4b5f82c0cb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 5 Nov 2023 15:33:54 -0800 Subject: [PATCH 17/70] .github/workflows/ci-linux.yml: Fine-tune max-parallel for constructive clogging --- .github/workflows/ci-linux.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 7fd2064a108..b991fe11880 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -85,8 +85,9 @@ jobs: tox_packages_factors: >- ["standard"] docker_push_repository: ghcr.io/${{ github.repository }}/ - # Reduce from 30 to 25 because it runs in parallel with 'standard-sitepackages' below - max_parallel: 25 + # Reduce from 30 to 20 because it runs in parallel with 'standard-sitepackages' + # and 'minimal-pre' below + max_parallel: 20 standard-sitepackages: if: ${{ success() || failure() }} @@ -135,7 +136,7 @@ jobs: "opensuse-tumbleweed", "debian-bullseye-i386"] docker_push_repository: ghcr.io/${{ github.repository }}/ - max_parallel: 10 + max_parallel: 8 minimal-pre: if: ${{ success() || failure() }} @@ -148,9 +149,9 @@ jobs: tox_packages_factors: >- ["minimal"] docker_push_repository: ghcr.io/${{ github.repository }}/ - # Reduced from 30 because it may run in parallel with 'standard-sitepackages' above. + # Reduced from 30 because it may run in parallel with 'standard' and 'standard-sitepackages' above. # Calibrated for clogging the job pipeline until the "default" job has finished. - max_parallel: 20 + max_parallel: 24 minimal: if: ${{ success() || failure() }} @@ -169,6 +170,7 @@ jobs: tox_packages_factors: >- ["minimal"] docker_push_repository: ghcr.io/${{ github.repository }}/ + max_parallel: 24 maximal-pre: if: ${{ success() || failure() }} From c15418d962c6f984a4ddaebb146639125385f366 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 6 Nov 2023 10:39:51 +0900 Subject: [PATCH 18/70] Continue on error of building live doc --- .github/workflows/doc-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index e079fa04beb..bd789779245 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -201,6 +201,7 @@ jobs: - name: Build live doc id: buildlivedoc if: (success() || failure()) && steps.copy.outcome == 'success' && github.repository == 'sagemath/sage' && github.ref == 'refs/heads/develop' + continue-on-error: true run: | set -ex export SAGE_USE_CDNS=yes From f56cd83fe88763bf60e1d37ee40b4510bbb61ec3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 5 Nov 2023 19:19:34 -0800 Subject: [PATCH 19/70] build/pkgs/pyzmq: Update to 25.1.1 --- build/pkgs/pyzmq/checksums.ini | 6 +++--- build/pkgs/pyzmq/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/pyzmq/checksums.ini b/build/pkgs/pyzmq/checksums.ini index d9abd25d464..091981fb051 100644 --- a/build/pkgs/pyzmq/checksums.ini +++ b/build/pkgs/pyzmq/checksums.ini @@ -1,5 +1,5 @@ tarball=pyzmq-VERSION.tar.gz -sha1=1a2e7220d7d1b6167c14ae2cc001dfc5d9a28dde -md5=f10b7c3dee2c03557e2c5d00b73dfc7f -cksum=1163982926 +sha1=f750e59a3d5fcca64d0a1a6723c1bc72173e976f +md5=993a646d3f1c6201a8c93bcb2d2f867e +cksum=2057198190 upstream_url=https://pypi.io/packages/source/p/pyzmq/pyzmq-VERSION.tar.gz diff --git a/build/pkgs/pyzmq/package-version.txt b/build/pkgs/pyzmq/package-version.txt index 1b3e74f84e7..139ab877a87 100644 --- a/build/pkgs/pyzmq/package-version.txt +++ b/build/pkgs/pyzmq/package-version.txt @@ -1 +1 @@ -24.0.1 +25.1.1 From c1faab9433204079f132a7d158e141bc88672974 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 6 Nov 2023 13:11:42 +0900 Subject: [PATCH 20/70] Remove code distorting worktree --- .github/workflows/doc-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index bd789779245..10c9525d8a8 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -162,7 +162,7 @@ jobs: EOF echo '' >> ./docs/CHANGES.html echo '' >> ./docs/CHANGES.html - (cd /sage/local/share/doc/sage/html && git diff HEAD^ -- *.html; rm -rf .git) > ./docs/diff.txt + (cd /sage/local/share/doc/sage/html && git diff HEAD^ -- *.html) > ./docs/diff.txt /sage/sage -python - << EOF import re, html with open('./docs/diff.txt', 'r') as f: @@ -182,7 +182,6 @@ jobs: echo '' >> ./docs/CHANGES.html echo '' >>./docs/CHANGES.html rm ./docs/diff.txt ./docs/diff.html - (cd /sage/local/share/doc/sage/html && git reset --hard HEAD) # For some reason the deploy step below cannot find /sage/... # So copy everything from there to local folder # We also need to replace the symlinks because netlify is not following them From e18ac9f76c565b07336dc5903700098b1f5cedb4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 5 Nov 2023 20:21:38 -0800 Subject: [PATCH 21/70] build/pkgs/zeromq: Update to 4.3.5 --- build/pkgs/zeromq/checksums.ini | 6 +++--- build/pkgs/zeromq/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/zeromq/checksums.ini b/build/pkgs/zeromq/checksums.ini index dc802612ddd..bc7f6b0c8b1 100644 --- a/build/pkgs/zeromq/checksums.ini +++ b/build/pkgs/zeromq/checksums.ini @@ -1,5 +1,5 @@ tarball=zeromq-VERSION.tar.gz -sha1=47277a64749049123d1401600e8cfbab10a3ae28 -md5=c897d4005a3f0b8276b00b7921412379 -cksum=1500782345 +sha1=bdbf686c8a40ba638e21cf74e34dbb425e108500 +md5=ae933b1e98411fd7cb8309f9502d2737 +cksum=1351453048 upstream_url=https://github.com/zeromq/libzmq/releases/download/vVERSION/zeromq-VERSION.tar.gz diff --git a/build/pkgs/zeromq/package-version.txt b/build/pkgs/zeromq/package-version.txt index eda862a98c1..e198586e42b 100644 --- a/build/pkgs/zeromq/package-version.txt +++ b/build/pkgs/zeromq/package-version.txt @@ -1 +1 @@ -4.3.4 +4.3.5 From ebd4db3d6ad33e08b4e20744047633b239e49432 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 5 Nov 2023 20:21:59 -0800 Subject: [PATCH 22/70] build/pkgs/zeromq/patches/438d5d88392baffa6c2c5e0737d9de19d6686f0d.patch: Remove --- ...5d88392baffa6c2c5e0737d9de19d6686f0d.patch | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 build/pkgs/zeromq/patches/438d5d88392baffa6c2c5e0737d9de19d6686f0d.patch diff --git a/build/pkgs/zeromq/patches/438d5d88392baffa6c2c5e0737d9de19d6686f0d.patch b/build/pkgs/zeromq/patches/438d5d88392baffa6c2c5e0737d9de19d6686f0d.patch deleted file mode 100644 index 75bfbd8744b..00000000000 --- a/build/pkgs/zeromq/patches/438d5d88392baffa6c2c5e0737d9de19d6686f0d.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 438d5d88392baffa6c2c5e0737d9de19d6686f0d Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Tue, 20 Dec 2022 21:45:16 +0000 -Subject: [PATCH] src/secure_allocator.hpp: define missing 'rebind' type - -`gcc-13` added an assert to standard headers to make sure custom -allocators have intended implementation of rebind type instead -of inherited rebind. gcc change: - https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=64c986b49558a7 - -Without the fix build fails on this week's `gcc-13` as: - - [ 92%] Building CXX object tests/CMakeFiles/test_security_curve.dir/test_security_curve.cpp.o - In file included from /<>/gcc-13.0.0/include/c++/13.0.0/ext/alloc_traits.h:34, - from /<>/gcc-13.0.0/include/c++/13.0.0/bits/stl_uninitialized.h:64, - from /<>/gcc-13.0.0/include/c++/13.0.0/memory:69, - from tests/../src/secure_allocator.hpp:42, - from tests/../src/curve_client_tools.hpp:49, - from tests/test_security_curve.cpp:53: - /<>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind, unsigned char, void>': - /<>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:94:11: required by substitution of 'template using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = zmq::secure_allocator_t; _Up = unsigned char]' - /<>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:228:8: required by substitution of 'template template using std::allocator_traits< >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = unsigned char; _Alloc = zmq::secure_allocator_t]' - /<>/gcc-13.0.0/include/c++/13.0.0/ext/alloc_traits.h:126:65: required from 'struct __gnu_cxx::__alloc_traits, unsigned char>::rebind' - /<>/gcc-13.0.0/include/c++/13.0.0/bits/stl_vector.h:88:21: required from 'struct std::_Vector_base >' - /<>/gcc-13.0.0/include/c++/13.0.0/bits/stl_vector.h:423:11: required from 'class std::vector >' - tests/../src/curve_client_tools.hpp:64:76: required from here - /<>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits::rebind_alloc must be A - 70 | _Tp>::value, - | ^~~~~ - -The change adds trivial `rebind` definition with expected return type -and satisfies conversion requirements. ---- - src/secure_allocator.hpp | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/src/secure_allocator.hpp b/src/secure_allocator.hpp -index e0871dcc99..5e97368911 100644 ---- a/src/secure_allocator.hpp -+++ b/src/secure_allocator.hpp -@@ -99,6 +99,17 @@ bool operator!= (const secure_allocator_t &, const secure_allocator_t &) - #else - template struct secure_allocator_t : std::allocator - { -+ secure_allocator_t () ZMQ_DEFAULT; -+ -+ template -+ secure_allocator_t (const secure_allocator_t &) ZMQ_NOEXCEPT -+ { -+ } -+ -+ template struct rebind -+ { -+ typedef secure_allocator_t other; -+ }; - }; - #endif - } From c4d3fd7d6b8b9e8857ce3c372f4b403fceb7c8cf Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 6 Nov 2023 13:34:38 +0900 Subject: [PATCH 23/70] Adding continue-on-error may disrupt doc-publish --- .github/workflows/doc-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 10c9525d8a8..7f9e07aafe2 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -200,7 +200,6 @@ jobs: - name: Build live doc id: buildlivedoc if: (success() || failure()) && steps.copy.outcome == 'success' && github.repository == 'sagemath/sage' && github.ref == 'refs/heads/develop' - continue-on-error: true run: | set -ex export SAGE_USE_CDNS=yes From 2a5293c9761a1e4eb55abeebe7f040cb99852b10 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 5 Nov 2023 21:38:48 -0800 Subject: [PATCH 24/70] build/pkgs/pyzmq: Patch out broken rpath and version detection --- ...001-setup.py-Remove-setting-of-rpath.patch | 25 +++++++++++++++++++ ...y-Patch-out-broken-version-detection.patch | 24 ++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 build/pkgs/pyzmq/patches/0001-setup.py-Remove-setting-of-rpath.patch create mode 100644 build/pkgs/pyzmq/patches/0002-setup.py-Patch-out-broken-version-detection.patch diff --git a/build/pkgs/pyzmq/patches/0001-setup.py-Remove-setting-of-rpath.patch b/build/pkgs/pyzmq/patches/0001-setup.py-Remove-setting-of-rpath.patch new file mode 100644 index 00000000000..9f0483d8442 --- /dev/null +++ b/build/pkgs/pyzmq/patches/0001-setup.py-Remove-setting-of-rpath.patch @@ -0,0 +1,25 @@ +From 29427869ce0a9f13e29c7f89873a1880c8be55a1 Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Sun, 5 Nov 2023 21:12:48 -0800 +Subject: [PATCH 1/2] setup.py: Remove setting of rpath + +--- + setup.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/setup.py b/setup.py +index d5c77a23..8a2a4943 100755 +--- a/setup.py ++++ b/setup.py +@@ -300,8 +300,6 @@ def settings_from_prefix(prefix=None): + settings['include_dirs'] += [pjoin(env, 'include')] + settings['library_dirs'] += [pjoin(env, 'lib')] + +- for path in settings['library_dirs']: +- _add_rpath(settings, os.path.abspath(path)) + info(settings) + + return settings +-- +2.42.0 + diff --git a/build/pkgs/pyzmq/patches/0002-setup.py-Patch-out-broken-version-detection.patch b/build/pkgs/pyzmq/patches/0002-setup.py-Patch-out-broken-version-detection.patch new file mode 100644 index 00000000000..95e62898233 --- /dev/null +++ b/build/pkgs/pyzmq/patches/0002-setup.py-Patch-out-broken-version-detection.patch @@ -0,0 +1,24 @@ +From b5bdcad66a28394f6e5be4ad7fd00835deec73f7 Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Sun, 5 Nov 2023 21:35:29 -0800 +Subject: [PATCH 2/2] setup.py: Patch out broken version detection + +--- + setup.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.py b/setup.py +index 8a2a4943..19d31654 100755 +--- a/setup.py ++++ b/setup.py +@@ -463,6 +463,7 @@ class Configure(build_ext): + + def check_zmq_version(self): + """check the zmq version""" ++ return + cfg = self.config + # build test program + zmq_prefix = cfg['zmq_prefix'] +-- +2.42.0 + From 33664560681dc013be7190d5adfc498880ac8974 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 6 Nov 2023 15:13:02 +0900 Subject: [PATCH 25/70] Remove .git for sure --- .github/workflows/doc-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 7f9e07aafe2..3660ff3a947 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -162,7 +162,7 @@ jobs: EOF echo '' >> ./docs/CHANGES.html echo '' >> ./docs/CHANGES.html - (cd /sage/local/share/doc/sage/html && git diff HEAD^ -- *.html) > ./docs/diff.txt + (cd /sage/local/share/doc/sage/html && git diff HEAD^ -- *.html; rm -rf .git) > ./docs/diff.txt /sage/sage -python - << EOF import re, html with open('./docs/diff.txt', 'r') as f: From 9c8f3b6ffa182c3629b864805889f4ea5234cc43 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 6 Nov 2023 11:04:52 -0800 Subject: [PATCH 26/70] .github/workflows/docker.yml: Set DOCKER_TAG from pre-merge commit sha even when docker_push_repository is not set --- .github/workflows/docker.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c12ec820f83..1a210cad29c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -191,6 +191,9 @@ jobs: echo "DOCKER_PUSH_REPOSITORY=$(echo ${{ inputs.docker_push_repository }} | tr "[:upper:]" "[:lower:]")" >> $GITHUB_ENV echo "DOCKER_CONFIG_FILE=$HOME/.docker/config.json" >> $GITHUB_ENV fi + + - name: Determine Docker tags to use + run: | # This line needs to be run before the step "Merge CI fixes from sagemath/sage". DOCKER_TAG="$(git describe --dirty --always)" echo "DOCKER_TAG=$DOCKER_TAG" >> $GITHUB_ENV From 08cdb2275ccb767561b710d44c0e12a24875da6e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 6 Nov 2023 13:30:13 -0800 Subject: [PATCH 27/70] build/pkgs/openblas: Stop openblas from using explicit 'make -j' --- build/pkgs/openblas/spkg-install.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index 00413ca517d..eacd993e9d6 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -34,6 +34,9 @@ fi echo "Building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" +# Do not emit "-j" options +export MAKE_NB_JOBS=0 + # Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" From 91a4e0617b224eae0818bd6518bba56caca33d1d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 6 Nov 2023 17:08:23 -0800 Subject: [PATCH 28/70] build/pkgs/openblas/spkg-install.in: Put MAKE_NB_JOBS in OPENBLAS_CONFIGURE --- build/pkgs/openblas/spkg-install.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index eacd993e9d6..5050e165787 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -35,7 +35,7 @@ fi echo "Building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" # Do not emit "-j" options -export MAKE_NB_JOBS=0 +OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=0" # Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" From 33ea789e843c8e83ddf9014eae7ff4572e5cd73f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 14:58:41 -0700 Subject: [PATCH 29/70] pkgs/sage-conf_pypi/setup.py: Replace DistutilsSetupError --- pkgs/sage-conf_pypi/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sage-conf_pypi/setup.py b/pkgs/sage-conf_pypi/setup.py index ac2b5fb3192..ff5ec5f5572 100644 --- a/pkgs/sage-conf_pypi/setup.py +++ b/pkgs/sage-conf_pypi/setup.py @@ -76,7 +76,7 @@ def run(self): cmd = f'cd {SAGE_ROOT} && {SETENV} && {SETMAKE} && $MAKE V=0 {TARGETS}' print(f"Running {cmd}", flush=True) if os.system(cmd) != 0: - raise DistutilsSetupError(f"make {TARGETS} failed") + raise SetupError(f"make {TARGETS} failed") setuptools_build_py.run(self) From 7a05c3673283ca20ed097a0c4f9602d057b01aaa Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 15:00:46 -0700 Subject: [PATCH 30/70] pkgs/sage-conf_pypi: Add missing .upstream.d to sage_root --- pkgs/sage-conf_pypi/sage_root/.upstream.d | 1 + 1 file changed, 1 insertion(+) create mode 120000 pkgs/sage-conf_pypi/sage_root/.upstream.d diff --git a/pkgs/sage-conf_pypi/sage_root/.upstream.d b/pkgs/sage-conf_pypi/sage_root/.upstream.d new file mode 120000 index 00000000000..243d6b8c910 --- /dev/null +++ b/pkgs/sage-conf_pypi/sage_root/.upstream.d @@ -0,0 +1 @@ +../../../.upstream.d \ No newline at end of file From 28df32fb95d5d28e7f755ba9062eb9be61426d93 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 15:45:58 -0700 Subject: [PATCH 31/70] pkgs/sage-conf_pypi/tox.ini: Pass HOMEBREW env var --- pkgs/sage-conf_pypi/tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/sage-conf_pypi/tox.ini b/pkgs/sage-conf_pypi/tox.ini index b530bd10554..00a53d0ea59 100644 --- a/pkgs/sage-conf_pypi/tox.ini +++ b/pkgs/sage-conf_pypi/tox.ini @@ -4,6 +4,8 @@ envlist = python [testenv] passenv = MAKE + # So that .homebrew-build-env will work + HOMEBREW setenv = HOME={envdir} From 5ce616bb8e178f48f537a1fa7514fdbb1a74dd1e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 17:05:26 -0700 Subject: [PATCH 32/70] pkgs/sage-conf_pypi/setup.py: Fix invocation of .homebrew-build-env --- pkgs/sage-conf_pypi/setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/sage-conf_pypi/setup.py b/pkgs/sage-conf_pypi/setup.py index ff5ec5f5572..e482ed83bc3 100644 --- a/pkgs/sage-conf_pypi/setup.py +++ b/pkgs/sage-conf_pypi/setup.py @@ -36,14 +36,14 @@ def run(self): if os.environ.get('CONDA_PREFIX', ''): SETENV = ':' else: - SETENV = '(. ./.homebrew-build-env 2> /dev/null || :)' + SETENV = '. ./.homebrew-build-env 2> /dev/null' SAGE_LOCAL = os.path.join(SAGE_ROOT, 'local') if os.path.exists(os.path.join(SAGE_ROOT, 'config.status')): print(f'Reusing configured SAGE_ROOT={SAGE_ROOT}') else: - cmd = f"cd {SAGE_ROOT} && {SETENV} && ./configure --prefix={SAGE_LOCAL} --with-python={sys.executable} --enable-build-as-root --enable-download-from-upstream-url --with-system-python3=force --with-sage-venv --disable-notebook --disable-sagelib --disable-sage_conf --disable-doc" + cmd = f"cd {SAGE_ROOT} && ({SETENV}; ./configure --prefix={SAGE_LOCAL} --with-python={sys.executable} --enable-build-as-root --enable-download-from-upstream-url --with-system-python3=force --with-sage-venv --disable-notebook --disable-sagelib --disable-sage_conf --disable-doc)" print(f"Running {cmd}") sys.stdout.flush() if os.system(cmd) != 0: @@ -73,7 +73,7 @@ def run(self): # (that use native libraries shared with other packages). SETMAKE = 'if [ -z "$MAKE" ]; then export MAKE="make -j$(PATH=build/bin:$PATH build/bin/sage-build-num-threads | cut -d" " -f 2)"; fi' TARGETS = 'build' - cmd = f'cd {SAGE_ROOT} && {SETENV} && {SETMAKE} && $MAKE V=0 {TARGETS}' + cmd = f'cd {SAGE_ROOT} && ({SETENV}; {SETMAKE} && $MAKE V=0 {TARGETS})' print(f"Running {cmd}", flush=True) if os.system(cmd) != 0: raise SetupError(f"make {TARGETS} failed") From 2632428fa08accd2605631865e4331268997ab17 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 19:18:39 -0700 Subject: [PATCH 33/70] pkgs/sage-conf_pypi/setup.py: Accept environment variable SAGE_CONF_TARGETS --- pkgs/sage-conf_pypi/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sage-conf_pypi/setup.py b/pkgs/sage-conf_pypi/setup.py index e482ed83bc3..5a8240b6e9d 100644 --- a/pkgs/sage-conf_pypi/setup.py +++ b/pkgs/sage-conf_pypi/setup.py @@ -73,10 +73,10 @@ def run(self): # (that use native libraries shared with other packages). SETMAKE = 'if [ -z "$MAKE" ]; then export MAKE="make -j$(PATH=build/bin:$PATH build/bin/sage-build-num-threads | cut -d" " -f 2)"; fi' TARGETS = 'build' - cmd = f'cd {SAGE_ROOT} && ({SETENV}; {SETMAKE} && $MAKE V=0 {TARGETS})' + cmd = f'cd {SAGE_ROOT} && ({SETENV}; {SETMAKE} && $MAKE V=0 ${{SAGE_CONF_TARGETS-{TARGETS}}})' print(f"Running {cmd}", flush=True) if os.system(cmd) != 0: - raise SetupError(f"make {TARGETS} failed") + raise SetupError(f"make ${{SAGE_CONF_TARGETS-{TARGETS}}} failed") setuptools_build_py.run(self) From cf8f82675d85c688267980878e6a0cb714a595be Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 19:19:08 -0700 Subject: [PATCH 34/70] pkgs/sage-conf_pypi/tox.ini: Add environment 'python-user' --- pkgs/sage-conf_pypi/tox.ini | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/pkgs/sage-conf_pypi/tox.ini b/pkgs/sage-conf_pypi/tox.ini index 00a53d0ea59..ea7eee9eb48 100644 --- a/pkgs/sage-conf_pypi/tox.ini +++ b/pkgs/sage-conf_pypi/tox.ini @@ -1,14 +1,39 @@ [tox] -envlist = python +envlist = python, python-user -[testenv] +[testenv:.pkg] passenv = MAKE # So that .homebrew-build-env will work HOMEBREW setenv = - HOME={envdir} + HOME={work_dir}/home + # Passed to 'make' instead of 'build'. We test here: + # - frobby (standalone program with dependency on gmp; tests that .homebrew-build-env is invoked correctly) + # - lrcalc_python (builds a platform wheel, possibly with use of system library) + SAGE_CONF_TARGETS=frobby lrcalc_python +[testenv:python] +package = wheel +setenv = + HOME={work_dir}/home +allowlist_externals = + bash + env +commands = + bash -c 'eval $SETENV; sage-config' + bash -c 'eval $SETENV; ls $(sage-config SAGE_SPKG_WHEELS)' + +[testenv:python-user] +package = wheel +setenv = + HOME={work_dir}/home + PYTHONUSERBASE={work_dir}/userbase + SETENV=export PATH={env:PYTHONUSERBASE}/bin:{env:PATH} +system_site_packages = True +install_command = env PATH={env:PYTHONUSERBASE}/bin:{env_bin_dir} python -I -m pip install --user {opts} {packages} +allowlist_externals = + {[testenv:python]allowlist_externals} commands = - sage-config + {[testenv:python]commands} From 3c31ee62c62637cff3b28d1a306aa6b6166cc81f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Oct 2023 20:22:05 -0700 Subject: [PATCH 35/70] pkgs/sage-conf_pypi/tox.ini: Test more --- pkgs/sage-conf_pypi/tox.ini | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/sage-conf_pypi/tox.ini b/pkgs/sage-conf_pypi/tox.ini index ea7eee9eb48..5a53c75ea35 100644 --- a/pkgs/sage-conf_pypi/tox.ini +++ b/pkgs/sage-conf_pypi/tox.ini @@ -12,23 +12,32 @@ setenv = # Passed to 'make' instead of 'build'. We test here: # - frobby (standalone program with dependency on gmp; tests that .homebrew-build-env is invoked correctly) # - lrcalc_python (builds a platform wheel, possibly with use of system library) - SAGE_CONF_TARGETS=frobby lrcalc_python + # - coxeter3 (which allows us to build sagemath-coxeter3) + SAGE_CONF_TARGETS=frobby lrcalc_python coxeter3 [testenv:python] package = wheel +deps = + # For the 'sage' script + sagemath-environment setenv = HOME={work_dir}/home allowlist_externals = bash env commands = - bash -c 'eval $SETENV; sage-config' - bash -c 'eval $SETENV; ls $(sage-config SAGE_SPKG_WHEELS)' + bash -c 'set -ex; eval $SETENV; \ + sage-config; \ + ls $(sage-config SAGE_SPKG_WHEELS); \ + sage -sh -c "frobby genideal"; \ + {envpython} -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl' [testenv:python-user] package = wheel +deps = + {[testenv:python]deps} setenv = - HOME={work_dir}/home + {[testenv:python]setenv} PYTHONUSERBASE={work_dir}/userbase SETENV=export PATH={env:PYTHONUSERBASE}/bin:{env:PATH} system_site_packages = True From 19d1ea7f9878a387f981fbf346aa6e5b95dce8ba Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 6 Nov 2023 17:36:06 -0800 Subject: [PATCH 36/70] pkgs/sage-conf/setup.cfg: Add python_requires --- pkgs/sage-conf/setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/sage-conf/setup.cfg b/pkgs/sage-conf/setup.cfg index dac401c303d..d74e36432c2 100644 --- a/pkgs/sage-conf/setup.cfg +++ b/pkgs/sage-conf/setup.cfg @@ -9,6 +9,8 @@ author_email = sage-support@googlegroups.com url = https://www.sagemath.org [options] +python_requires = >=3.9, <3.12 + packages = _sage_conf From d2f56d204da9278169296d36a53fc4fd7009bf4a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 6 Nov 2023 18:01:25 -0800 Subject: [PATCH 37/70] build/pkgs/openblas/spkg-install.in: Work around hang with GNU make 3.81 (ubuntu-trusty) --- build/pkgs/openblas/spkg-install.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index 5050e165787..006067800af 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -34,8 +34,13 @@ fi echo "Building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" -# Do not emit "-j" options -OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=0" +if $MAKE --version | grep -q -F '3.81'; then + # Work around https://savannah.gnu.org/bugs/?15919 + OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=1" +else + # Do not emit "-j" options; use jobserver + OPENBLAS_CONFIGURE+=" MAKE_NB_JOBS=0" +fi # Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" From 6d1a957d2b540da8717eb7d9b86f3f4005b22c6a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 7 Nov 2023 10:04:07 -0800 Subject: [PATCH 38/70] build/pkgs/openblas/spkg-install.in: Build targets libs, netlib, shared in separate make invocations --- build/pkgs/openblas/spkg-install.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index 006067800af..2f8aea512bc 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -45,7 +45,7 @@ fi # Ensure USE_TLS=1 ; see https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" -if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then +if ! (sdh_make libs $OPENBLAS_CONFIGURE && sdh_make netlib $OPENBLAS_CONFIGURE && sdh_make shared $OPENBLAS_CONFIGURE); then if [[ $OPENBLAS_CONFIGURE == *"TARGET"* ]]; then sdh_die "Error building OpenBLAS" else @@ -55,7 +55,7 @@ if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then echo "Error building OpenBLAS" echo "Retrying building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" sdh_make clean - sdh_make libs netlib shared $OPENBLAS_CONFIGURE + sdh_make libs $OPENBLAS_CONFIGURE && sdh_make netlib $OPENBLAS_CONFIGURE && sdh_make shared $OPENBLAS_CONFIGURE fi fi From 0df3400b3d3cb672cc8848e4100f1c2927f19f2a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 7 Nov 2023 14:52:39 -0800 Subject: [PATCH 39/70] pkgs/sage-conf_pypi/tox.ini: Declare python versions to test, declare basepython of .pkg --- pkgs/sage-conf_pypi/tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/sage-conf_pypi/tox.ini b/pkgs/sage-conf_pypi/tox.ini index 5a53c75ea35..fadf9a9cc6c 100644 --- a/pkgs/sage-conf_pypi/tox.ini +++ b/pkgs/sage-conf_pypi/tox.ini @@ -1,7 +1,8 @@ [tox] -envlist = python, python-user +envlist = py39, py310, py311, py39-user, py310-user, py311-user [testenv:.pkg] +basepython = py311 passenv = MAKE # So that .homebrew-build-env will work From 11a8d350e0103224dcf71722bb1535c65162c7e1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 8 Nov 2023 15:15:29 -0800 Subject: [PATCH 40/70] pkgs/sage-conf/.gitignore: Remove setup.cfg from here --- pkgs/sage-conf/.gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/sage-conf/.gitignore b/pkgs/sage-conf/.gitignore index 2f96201a1c9..2fff1627b9f 100644 --- a/pkgs/sage-conf/.gitignore +++ b/pkgs/sage-conf/.gitignore @@ -1,5 +1,4 @@ /_sage_conf/_conf.py -/setup.cfg /build /dist /*.egg-info From 6274cdc3e887508dd08cac14d14b7e3e530ab907 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 8 Nov 2023 15:57:17 -0800 Subject: [PATCH 41/70] Revert "pkgs/sage-conf/setup.cfg: Add python_requires" This reverts commit 19d1ea7f9878a387f981fbf346aa6e5b95dce8ba. --- pkgs/sage-conf/setup.cfg | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/sage-conf/setup.cfg b/pkgs/sage-conf/setup.cfg index d74e36432c2..dac401c303d 100644 --- a/pkgs/sage-conf/setup.cfg +++ b/pkgs/sage-conf/setup.cfg @@ -9,8 +9,6 @@ author_email = sage-support@googlegroups.com url = https://www.sagemath.org [options] -python_requires = >=3.9, <3.12 - packages = _sage_conf From e349b0024996e4ac4878d70a0a34ae6b742e88c5 Mon Sep 17 00:00:00 2001 From: Release Manager Date: Fri, 10 Nov 2023 16:41:57 +0100 Subject: [PATCH 42/70] Updated SageMath version to 10.2.rc1 --- CITATION.cff | 4 ++-- VERSION.txt | 2 +- build/pkgs/configure/checksums.ini | 6 +++--- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/sage_conf/install-requires.txt | 2 +- build/pkgs/sage_docbuild/install-requires.txt | 2 +- build/pkgs/sage_setup/install-requires.txt | 2 +- build/pkgs/sage_sws2rst/install-requires.txt | 2 +- build/pkgs/sagelib/install-requires.txt | 2 +- build/pkgs/sagemath_bliss/install-requires.txt | 2 +- build/pkgs/sagemath_categories/install-requires.txt | 2 +- build/pkgs/sagemath_coxeter3/install-requires.txt | 2 +- build/pkgs/sagemath_environment/install-requires.txt | 2 +- build/pkgs/sagemath_mcqd/install-requires.txt | 2 +- build/pkgs/sagemath_meataxe/install-requires.txt | 2 +- build/pkgs/sagemath_objects/install-requires.txt | 2 +- build/pkgs/sagemath_repl/install-requires.txt | 2 +- build/pkgs/sagemath_sirocco/install-requires.txt | 2 +- build/pkgs/sagemath_tdlib/install-requires.txt | 2 +- pkgs/sage-conf/VERSION.txt | 2 +- pkgs/sage-conf_conda/VERSION.txt | 2 +- pkgs/sage-conf_pypi/VERSION.txt | 2 +- pkgs/sage-docbuild/VERSION.txt | 2 +- pkgs/sage-setup/VERSION.txt | 2 +- pkgs/sage-sws2rst/VERSION.txt | 2 +- pkgs/sagemath-bliss/VERSION.txt | 2 +- pkgs/sagemath-categories/VERSION.txt | 2 +- pkgs/sagemath-coxeter3/VERSION.txt | 2 +- pkgs/sagemath-environment/VERSION.txt | 2 +- pkgs/sagemath-mcqd/VERSION.txt | 2 +- pkgs/sagemath-meataxe/VERSION.txt | 2 +- pkgs/sagemath-objects/VERSION.txt | 2 +- pkgs/sagemath-repl/VERSION.txt | 2 +- pkgs/sagemath-sirocco/VERSION.txt | 2 +- pkgs/sagemath-tdlib/VERSION.txt | 2 +- src/VERSION.txt | 2 +- src/bin/sage-version.sh | 6 +++--- src/sage/version.py | 6 +++--- 38 files changed, 45 insertions(+), 45 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index bcd3dad6665..b1b171fb1a1 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.rc0 +version: 10.2.rc1 doi: 10.5281/zenodo.593563 -date-released: 2023-11-05 +date-released: 2023-11-10 repository-code: "https://github.com/sagemath/sage" url: "https://www.sagemath.org/" diff --git a/VERSION.txt b/VERSION.txt index a43284eebe1..8ceae8bb576 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.2.rc0, Release Date: 2023-11-05 +SageMath version 10.2.rc1, Release Date: 2023-11-10 diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index f7a9e8a1ba6..cabeaab3b1e 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=e965180c957a340bb04576df39802f3a36d340e7 -md5=932bfcea357845fa9610dc698e2390d3 -cksum=2852244160 +sha1=1be054f67f0d283b5eb57e6a6b06383a5418dd1a +md5=d14e84540b8f76777d225fa90fc8fba9 +cksum=3781778115 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index 00dc1d6c929..1ef35d3a00f 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -fb5b09d7f749e15c38ecb4ffe2de7b398e37f73f +81bf4e52c662db7167c3955c93308c4a6bdb850c diff --git a/build/pkgs/sage_conf/install-requires.txt b/build/pkgs/sage_conf/install-requires.txt index 4b66d1b0602..326aa7578ec 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.2rc0 +sage-conf ~= 10.2rc1 diff --git a/build/pkgs/sage_docbuild/install-requires.txt b/build/pkgs/sage_docbuild/install-requires.txt index cebed4e3b62..de534e08518 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.2rc0 +sage-docbuild ~= 10.2rc1 diff --git a/build/pkgs/sage_setup/install-requires.txt b/build/pkgs/sage_setup/install-requires.txt index 1631564eec7..3c0a80511a3 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.2rc0 +sage-setup ~= 10.2rc1 diff --git a/build/pkgs/sage_sws2rst/install-requires.txt b/build/pkgs/sage_sws2rst/install-requires.txt index 628374d5f1a..4a13b95c8f6 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.2rc0 +sage-sws2rst ~= 10.2rc1 diff --git a/build/pkgs/sagelib/install-requires.txt b/build/pkgs/sagelib/install-requires.txt index 6004e85c25d..9dd84a6d4d7 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.2rc0 +sagemath-standard ~= 10.2rc1 diff --git a/build/pkgs/sagemath_bliss/install-requires.txt b/build/pkgs/sagemath_bliss/install-requires.txt index 5ea4526cc33..c66665c1f4d 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.2rc0 +sagemath-bliss ~= 10.2rc1 diff --git a/build/pkgs/sagemath_categories/install-requires.txt b/build/pkgs/sagemath_categories/install-requires.txt index 1d37a18c187..a1695d082b4 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.2rc0 +sagemath-categories ~= 10.2rc1 diff --git a/build/pkgs/sagemath_coxeter3/install-requires.txt b/build/pkgs/sagemath_coxeter3/install-requires.txt index 8d6115b1868..b9db4ef19c8 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.2rc0 +sagemath-coxeter3 ~= 10.2rc1 diff --git a/build/pkgs/sagemath_environment/install-requires.txt b/build/pkgs/sagemath_environment/install-requires.txt index c870e97dca1..f704a57eb7e 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.2rc0 +sagemath-environment ~= 10.2rc1 diff --git a/build/pkgs/sagemath_mcqd/install-requires.txt b/build/pkgs/sagemath_mcqd/install-requires.txt index cff0dac0026..947642f6baf 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.2rc0 +sagemath-mcqd ~= 10.2rc1 diff --git a/build/pkgs/sagemath_meataxe/install-requires.txt b/build/pkgs/sagemath_meataxe/install-requires.txt index 464942fef75..b05223e6735 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.2rc0 +sagemath-meataxe ~= 10.2rc1 diff --git a/build/pkgs/sagemath_objects/install-requires.txt b/build/pkgs/sagemath_objects/install-requires.txt index 663b7d78f8b..8245904bf01 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.2rc0 +sagemath-objects ~= 10.2rc1 diff --git a/build/pkgs/sagemath_repl/install-requires.txt b/build/pkgs/sagemath_repl/install-requires.txt index 917144d154c..83c797f99a3 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.2rc0 +sagemath-repl ~= 10.2rc1 diff --git a/build/pkgs/sagemath_sirocco/install-requires.txt b/build/pkgs/sagemath_sirocco/install-requires.txt index 896662f1b95..f828bbac488 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.2rc0 +sagemath-sirocco ~= 10.2rc1 diff --git a/build/pkgs/sagemath_tdlib/install-requires.txt b/build/pkgs/sagemath_tdlib/install-requires.txt index c26900d9abf..cd0d3390b93 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.2rc0 +sagemath-tdlib ~= 10.2rc1 diff --git a/pkgs/sage-conf/VERSION.txt b/pkgs/sage-conf/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sage-conf/VERSION.txt +++ b/pkgs/sage-conf/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sage-conf_conda/VERSION.txt b/pkgs/sage-conf_conda/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sage-conf_conda/VERSION.txt +++ b/pkgs/sage-conf_conda/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sage-conf_pypi/VERSION.txt b/pkgs/sage-conf_pypi/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sage-conf_pypi/VERSION.txt +++ b/pkgs/sage-conf_pypi/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sage-docbuild/VERSION.txt b/pkgs/sage-docbuild/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sage-docbuild/VERSION.txt +++ b/pkgs/sage-docbuild/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sage-setup/VERSION.txt b/pkgs/sage-setup/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sage-setup/VERSION.txt +++ b/pkgs/sage-setup/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sage-sws2rst/VERSION.txt b/pkgs/sage-sws2rst/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sage-sws2rst/VERSION.txt +++ b/pkgs/sage-sws2rst/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-bliss/VERSION.txt b/pkgs/sagemath-bliss/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-bliss/VERSION.txt +++ b/pkgs/sagemath-bliss/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-categories/VERSION.txt b/pkgs/sagemath-categories/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-categories/VERSION.txt +++ b/pkgs/sagemath-categories/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-coxeter3/VERSION.txt b/pkgs/sagemath-coxeter3/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-coxeter3/VERSION.txt +++ b/pkgs/sagemath-coxeter3/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-environment/VERSION.txt b/pkgs/sagemath-environment/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-environment/VERSION.txt +++ b/pkgs/sagemath-environment/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-mcqd/VERSION.txt b/pkgs/sagemath-mcqd/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-mcqd/VERSION.txt +++ b/pkgs/sagemath-mcqd/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-meataxe/VERSION.txt b/pkgs/sagemath-meataxe/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-meataxe/VERSION.txt +++ b/pkgs/sagemath-meataxe/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-objects/VERSION.txt b/pkgs/sagemath-objects/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-objects/VERSION.txt +++ b/pkgs/sagemath-objects/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-repl/VERSION.txt b/pkgs/sagemath-repl/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-repl/VERSION.txt +++ b/pkgs/sagemath-repl/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-sirocco/VERSION.txt b/pkgs/sagemath-sirocco/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-sirocco/VERSION.txt +++ b/pkgs/sagemath-sirocco/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/pkgs/sagemath-tdlib/VERSION.txt b/pkgs/sagemath-tdlib/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/pkgs/sagemath-tdlib/VERSION.txt +++ b/pkgs/sagemath-tdlib/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/src/VERSION.txt b/src/VERSION.txt index 7694f7787b5..a9591a7f98d 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -10.2.rc0 +10.2.rc1 diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index d6b42fe389d..6ba84d36e70 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.rc0' -SAGE_RELEASE_DATE='2023-11-05' -SAGE_VERSION_BANNER='SageMath version 10.2.rc0, Release Date: 2023-11-05' +SAGE_VERSION='10.2.rc1' +SAGE_RELEASE_DATE='2023-11-10' +SAGE_VERSION_BANNER='SageMath version 10.2.rc1, Release Date: 2023-11-10' diff --git a/src/sage/version.py b/src/sage/version.py index 9d384e5af6e..087d777c94b 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.rc0' -date = '2023-11-05' -banner = 'SageMath version 10.2.rc0, Release Date: 2023-11-05' +version = '10.2.rc1' +date = '2023-11-10' +banner = 'SageMath version 10.2.rc1, Release Date: 2023-11-10' From 429555a926b20d83ca89cd3531d38945d3e6403d Mon Sep 17 00:00:00 2001 From: Release Manager Date: Fri, 10 Nov 2023 16:54:59 +0100 Subject: [PATCH 43/70] Updated SageMath version to 10.2.rc1 --- build/pkgs/configure/checksums.ini | 6 +++--- build/pkgs/configure/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index cabeaab3b1e..f3165c40860 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=1be054f67f0d283b5eb57e6a6b06383a5418dd1a -md5=d14e84540b8f76777d225fa90fc8fba9 -cksum=3781778115 +sha1=75fe450806e89ce82978f9167b664d3e403d9af9 +md5=26211fca17d4d912cc11f22f353684b1 +cksum=1423896271 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index 1ef35d3a00f..20a74069b66 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -81bf4e52c662db7167c3955c93308c4a6bdb850c +e349b0024996e4ac4878d70a0a34ae6b742e88c5 From 5a755e950d035edb48242409131dd31130071001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Fri, 10 Nov 2023 19:56:05 -0300 Subject: [PATCH 44/70] Fix ssl timeout in testing internet feature --- src/sage/features/internet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/features/internet.py b/src/sage/features/internet.py index f1eb000fe92..576b0136926 100644 --- a/src/sage/features/internet.py +++ b/src/sage/features/internet.py @@ -56,7 +56,7 @@ def _is_present(self): try: urlopen(req, timeout=1, context=default_context()) return FeatureTestResult(self, True) - except urllib.error.URLError: + except (urllib.error.URLError, TimeoutError): return FeatureTestResult(self, False) From 70036fb879831adce7a82906a6a1b6f3a7d48547 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 6 Nov 2023 18:51:58 +0000 Subject: [PATCH 45/70] shift the upper bound for implemented matrices to 1200 also, list unknown orders of (skew) Hadamard matrices in the corresponding docstring --- src/sage/combinat/matrices/hadamard_matrix.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 908a3bec603..d6477decec6 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -31,21 +31,23 @@ of `4`. The module below implements constructions of Hadamard and skew Hadamard matrices -for all known orders `\le 1000`, plus some more greater than `1000`. It also +for all known orders `\le 1200`, plus some more greater than `1200`. It also allows you to pull a Hadamard matrix from the database at [SloaHada]_. The following code will test that a construction for all known orders `\le 4k` -is implemented. The assertion above can be verified by setting ``k=250`` +is implemented. The assertion above can be verified by setting ``k=300`` (note that it will take a long time to run):: sage: from sage.combinat.matrices.hadamard_matrix import (hadamard_matrix, ....: skew_hadamard_matrix, is_hadamard_matrix, ....: is_skew_hadamard_matrix) sage: k = 20 - sage: unknown_hadamard = [668, 716, 892] + sage: unknown_hadamard = [668, 716, 892, 1132] sage: unknown_skew_hadamard = [356, 404, 428, 476, 596, 612, 668, 708, 712, 716, ....: 764, 772, 804, 808, 820, 836, 856, 892, 900, 916, - ....: 932, 940, 952, 980, 996] + ....: 932, 940, 952, 980, 996, 1004, 1012, 1028, 1036, + ....: 1044, 1060, 1076, 1100, 1108, 1132, 1140, 1148, + ....: 1156, 1180, 1192, 1196] sage: for n in range(1, k+1): ....: if 4*n not in unknown_hadamard: ....: H = hadamard_matrix(4*n, check=False) @@ -58,7 +60,7 @@ - David Joyner (2009-05-17): initial version - Matteo Cati (2023-03-18): implemented more constructions for Hadamard and skew - Hadamard matrices, to cover all known orders up to 1000. + Hadamard matrices, to cover all known orders up to 1200. REFERENCES: @@ -1641,8 +1643,8 @@ def hadamard_matrix(n, existence=False, check=True): r""" Tries to construct a Hadamard matrix using the available methods. - Currently all orders `\le 1000` for which a construction is - known are implemented. For `n > 1000`, only some orders are available. + Currently all orders `\le 1200` for which a construction is + known are implemented. For `n > 1200`, only some orders are available. INPUT: @@ -3055,8 +3057,8 @@ def skew_hadamard_matrix(n, existence=False, skew_normalize=True, check=True): Tries to construct a skew Hadamard matrix. A Hadamard matrix `H` is called skew if `H=S-I`, for `I` the identity matrix - and `-S=S^\top`. Currently all orders `\le 1000` for which a construction is - known are implemented. For `n > 1000`, only some orders are available. + and `-S=S^\top`. Currently all orders `\le 1200` for which a construction is + known are implemented. For `n > 1200`, only some orders are available. INPUT: From 780c3024f3b38eb03b2646ea291fda6ee800eb86 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 6 Nov 2023 19:07:36 +0000 Subject: [PATCH 46/70] add a reference to arxiv preprint Cati & Pasechnik --- src/doc/en/reference/references/index.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index d9f406d055d..697c50a6bcf 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -1373,6 +1373,10 @@ REFERENCES: for closed Riemannian manifolds*, Ann. of Math. (2) 45 (1944), 747–752. +.. [CP2023] \M. Cati and D.V. Pasechnik. + *Implementing Hadamard Matrices in SageMath*. + Preprint, :arxiv:`2306.16812`, (2023). + .. [CQ2019] \A. Cassella and C. Quadrelli. *Right-angled Artin groups and enhanced Koszul properties*. Preprint, :arxiv:`1907.03824`, (2019). From 93e987308a233e004c05512e34752a28e537e968 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 6 Nov 2023 19:09:49 +0000 Subject: [PATCH 47/70] refer to [CP2023] --- src/sage/combinat/matrices/hadamard_matrix.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index d6477decec6..0693941851e 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -69,6 +69,8 @@ - [HadaWiki]_ - [Hora]_ + +- [CP2023]_ """ # ***************************************************************************** From fad25bbfe57cb0289a49f9d4eda25dccc4976c09 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 10 Nov 2023 16:55:54 -0800 Subject: [PATCH 48/70] tox.ini (conda-python{3.9,3.10,3.11,3.12}): Reorder so that the _python3.... package is actually installed --- tox.ini | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index c039103f422..438c1ca8763 100644 --- a/tox.ini +++ b/tox.ini @@ -559,22 +559,21 @@ setenv = CONFIG_CONFIGURE_ARGS_1=--with-system-python3=yes python3_spkg: CONFIG_CONFIGURE_ARGS_1=--without-system-python3 python3.9,python3.10,python3.11,python3.12: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR} - python3.9,python3.10,python3.11,python3.12: EXTRA_SAGE_PACKAGES_5=_python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR} _bootstrap liblzma bzip2 libffi libpng zlib # As of 2023-9, Xcode 15.0.0, this is Python 3.9.6. macos-python3_xcode: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/usr/bin/python3 - macos-python3_xcode: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng zlib macos-{python3_xcode,nohomebrew}-{python3.9}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3 # Homebrew keg installs homebrew-{python3.9,python3.10,python3.11,python3.12}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python={env:HOMEBREW}/opt/python@{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3 # Installers from https://www.python.org/downloads/macos/ (must manually download and install) macos-python3_pythonorg: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/Library/Frameworks/Python.framework/Versions/{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3 - macos-python3_pythonorg: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng zlib # https://github.com/pypa/manylinux manylinux-standard: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/opt/python/cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}-cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}/bin/python3 - manylinux-{python3.9,python3.10,python3.11,python3.12}: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng conda: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=python3 conda: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng zlib - + python3.9,python3.10,python3.11,python3.12: EXTRA_SAGE_PACKAGES_5=_python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR} _bootstrap liblzma bzip2 libffi libpng zlib + manylinux-{python3.9,python3.10,python3.11,python3.12}: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng + macos-python3_pythonorg: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng zlib + macos-python3_xcode: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng zlib {centos-stream,almalinux}-8-python3.9: EXTRA_SYSTEM_PACKAGES=python39 python39-devel # # - toolchain From df0ca5b4a2f7f75b5e5c7c18de4890c829b5638a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 10 Nov 2023 16:57:49 -0800 Subject: [PATCH 49/70] build/pkgs/_python{3.9,3.10,3.11,3.12}/distros/conda.txt: Use = instead of ==, for fuzzy match --- build/pkgs/_python3.10/distros/conda.txt | 2 +- build/pkgs/_python3.11/distros/conda.txt | 2 +- build/pkgs/_python3.12/distros/conda.txt | 2 +- build/pkgs/_python3.9/distros/conda.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/_python3.10/distros/conda.txt b/build/pkgs/_python3.10/distros/conda.txt index 0e2312f6abf..3fe0755f28f 100644 --- a/build/pkgs/_python3.10/distros/conda.txt +++ b/build/pkgs/_python3.10/distros/conda.txt @@ -1 +1 @@ -python==3.10 +python=3.10 diff --git a/build/pkgs/_python3.11/distros/conda.txt b/build/pkgs/_python3.11/distros/conda.txt index 875818d94e8..b025c36b396 100644 --- a/build/pkgs/_python3.11/distros/conda.txt +++ b/build/pkgs/_python3.11/distros/conda.txt @@ -1 +1 @@ -python==3.11 +python=3.11 diff --git a/build/pkgs/_python3.12/distros/conda.txt b/build/pkgs/_python3.12/distros/conda.txt index 08c4473f336..6c4c1ce29a1 100644 --- a/build/pkgs/_python3.12/distros/conda.txt +++ b/build/pkgs/_python3.12/distros/conda.txt @@ -1 +1 @@ -python==3.12 +python=3.12 diff --git a/build/pkgs/_python3.9/distros/conda.txt b/build/pkgs/_python3.9/distros/conda.txt index ca224649651..23caf0e0ee2 100644 --- a/build/pkgs/_python3.9/distros/conda.txt +++ b/build/pkgs/_python3.9/distros/conda.txt @@ -1 +1 @@ -python==3.9 +python=3.9 From ddc6a464e4b7a3128c538ecc0740de979855657c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 10 Nov 2023 19:38:43 -0800 Subject: [PATCH 50/70] src/sage/combinat/root_system/coxeter_group.py: Fix typo in lazy_import --- src/sage/combinat/root_system/coxeter_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/combinat/root_system/coxeter_group.py b/src/sage/combinat/root_system/coxeter_group.py index 83c1c0c7e9e..8fadad6035c 100644 --- a/src/sage/combinat/root_system/coxeter_group.py +++ b/src/sage/combinat/root_system/coxeter_group.py @@ -12,7 +12,7 @@ from sage.combinat.root_system.cartan_type import CartanType from sage.misc.lazy_import import lazy_import -lazy_import('from sage.combinat.root_system.reflection_group_real', 'ReflectionGroup') +lazy_import('sage.combinat.root_system.reflection_group_real', 'ReflectionGroup') lazy_import('sage.combinat.root_system.weyl_group', 'WeylGroup') From 4a70c1e535bc621bdbe95d8f531375e5700d7c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Fri, 10 Nov 2023 19:56:31 -0300 Subject: [PATCH 51/70] Exclude external software from --hide=all and --hide=optional --- src/sage/doctest/control.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py index 8583d7a447d..633afd5c2e6 100644 --- a/src/sage/doctest/control.py +++ b/src/sage/doctest/control.py @@ -457,11 +457,15 @@ def __init__(self, options, args): options.hide.discard('all') from sage.features.all import all_features feature_names = {f.name for f in all_features() if not f.is_standard()} + from sage.doctest.external import external_software + feature_names.difference_update(external_software) options.hide = options.hide.union(feature_names) if 'optional' in options.hide: options.hide.discard('optional') from sage.features.all import all_features feature_names = {f.name for f in all_features() if f.is_optional()} + from sage.doctest.external import external_software + feature_names.difference_update(external_software) options.hide = options.hide.union(feature_names) options.disabled_optional = set() From 84fb6dac85ffbab02d69c1594a9ae4a2bccf6c84 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 12 Nov 2023 13:22:23 +0900 Subject: [PATCH 52/70] Fix pdf doc build --- .github/workflows/doc-build.yml | 2 +- src/doc/Makefile | 14 +++---- src/doc/en/reference/references/index.rst | 7 ++++ .../combinat/species/generating_series.py | 11 +----- src/sage/rings/lazy_series.py | 2 +- src/sage_docbuild/builders.py | 38 +++++++++++++++---- src/sage_docbuild/conf.py | 2 +- 7 files changed, 49 insertions(+), 27 deletions(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 3660ff3a947..7d87c9ed4c5 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -206,7 +206,7 @@ jobs: export SAGE_LIVE_DOC=yes export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev make doc-clean doc-uninstall - ./config.status && make sagemath_doc_html-no-deps + ./config.status && make doc-html && make doc-pdf working-directory: ./worktree-image env: MAKE: make -j2 --output-sync=recurse diff --git a/src/doc/Makefile b/src/doc/Makefile index 2f76dfb9cb4..912eb5cb0e9 100644 --- a/src/doc/Makefile +++ b/src/doc/Makefile @@ -46,14 +46,17 @@ doc-inventory-reference: doc-src $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-inventory--reference_top endif -# reference manual, html -doc-html-reference: doc-inventory-reference +# sub docs of reference manual, html +doc-html-reference-sub: doc-inventory-reference $(eval DOCS = $(shell sage --docbuild --all-documents reference)) @if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi $(eval BIBLIO = $(firstword $(DOCS))) $(eval OTHER_DOCS = $(wordlist 2, 100, $(DOCS))) $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-html--$(subst /,-,$(BIBLIO)) $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(OTHER_DOCS), doc-html--$(subst /,-,$(doc))) + +# reference manual, html; reference_top is built after sub docs +doc-html-reference: doc-html-reference-sub $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-html--reference_top # other documentation, html @@ -79,16 +82,13 @@ doc-pdf-reference: doc-inventory-reference $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-pdf--reference_top # other documentation, pdf -doc-pdf-other: doc-html-reference +doc-pdf-other: doc-pdf-reference $(eval DOCS = $(shell sage --docbuild --all-documents all)) @if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(wordlist 2, 100, $(DOCS)), doc-pdf--$(subst /,-,$(doc))) -# website with pdf links -doc-pdf-website: - sage --docbuild website html $(SAGE_DOCBUILD_OPTS) +doc-pdf: doc-pdf-reference doc-pdf-other -doc-pdf: doc-pdf-reference doc-pdf-other doc-pdf-website .PHONY: all clean \ doc-src \ diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index d9f406d055d..50b4ad0fead 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -960,6 +960,13 @@ REFERENCES: .. [BL2003] \S. Brlek, A. Ladouceur, A note on differentiable palindromes, Theoret. Comput. Sci. 302 (2003) 167--178. +.. [BLL1998] \F. Bergeron, G. Labelle, and P. Leroux. + "Combinatorial species and tree-like structures". + Encyclopedia of Mathematics and its Applications, vol. 67, Cambridge Univ. Press. 1998. + +.. [BLL2008] François Bergeron, Gilbert Labelle, and Pierre Leroux. + "Introduction to the Theory of Species of Structures", March 14, 2008. + .. [BraLea2008] \C. Bracken and Gregor Leander: *New families of functions with differential uniformity of 4*, Proceedings of the Conference BFCA, Copenhagen, 2008. diff --git a/src/sage/combinat/species/generating_series.py b/src/sage/combinat/species/generating_series.py index e7f7c8ee978..dca117a9971 100644 --- a/src/sage/combinat/species/generating_series.py +++ b/src/sage/combinat/species/generating_series.py @@ -30,13 +30,6 @@ sage: s[3] # optional - sage.modules p[1, 1, 1] + p[2, 1] -REFERENCES: - -.. [BLL] \F. Bergeron, G. Labelle, and P. Leroux. - "Combinatorial species and tree-like structures". - Encyclopedia of Mathematics and its Applications, vol. 67, Cambridge Univ. Press. 1998. -.. [BLL-Intro] François Bergeron, Gilbert Labelle, and Pierre Leroux. - "Introduction to the Theory of Species of Structures", March 14, 2008. """ # **************************************************************************** @@ -217,7 +210,7 @@ def functorial_composition(self, y): REFERENCES: - - Section 2.2 of [BLL]_. + - Section 2.2 of [BLL1998]_. EXAMPLES:: @@ -651,7 +644,7 @@ def LogarithmCycleIndexSeries(R=QQ): Return the cycle index series of the virtual species `\Omega`, the compositional inverse of the species `E^{+}` of nonempty sets. - The notion of virtual species is treated thoroughly in [BLL]_. + The notion of virtual species is treated thoroughly in [BLL1998]_. The specific algorithm used here to compute the cycle index of `\Omega` is found in [Labelle2008]_. diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index 8086e15f9ef..5fdfb64cea4 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -6219,7 +6219,7 @@ def functorial_composition(self, *args): whose labels are the set of all `G`-structures on `A`. The Frobenius character (or cycle index series) of `F \Box G` - can be computed as follows, see section 2.2 of [BLL]_): + can be computed as follows, see section 2.2 of [BLL1998]_): .. MATH:: diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py index 323c9247252..c79b61c1506 100644 --- a/src/sage_docbuild/builders.py +++ b/src/sage_docbuild/builders.py @@ -637,17 +637,21 @@ def pdf(self): """ super().pdf() - # we need to build master index file which lists all - # of the PDF file. So we create an html file, based on - # the file index.html from the "reference_top" target. - - # First build the top reference page. This only takes a few seconds. - getattr(get_builder('reference_top'), 'html')() + # We want to build master index file which lists all of the PDF file. + # We modify the file index.html from the "reference_top" target, if it + # exists. Otherwise, we are done. from sage.env import SAGE_DOC reference_dir = os.path.join(SAGE_DOC, 'html', 'en', 'reference') output_dir = self._output_dir('pdf') + # Check if the top reference index.html exists. + try: + with open(os.path.join(reference_dir, 'index.html')) as f: + html = f.read() + except FileNotFoundError: + return + # Install in output_dir a symlink to the directory containing static files. # Prefer relative path for symlinks. relpath = os.path.relpath(reference_dir, output_dir) @@ -657,8 +661,6 @@ def pdf(self): pass # Now modify top reference index.html page and write it to output_dir. - with open(os.path.join(reference_dir, 'index.html')) as f: - html = f.read() html_output_dir = os.path.dirname(reference_dir) # Fix links in navigation bar @@ -1051,13 +1053,33 @@ def get_modules(self, filename): Given a filename for a reST file, return an iterator for all of the autogenerated reST files that it includes. """ + from sage.features.all import all_features + # Create the regular expression used to detect an autogenerated file auto_re = re.compile(r'^\s*(..\/)*(sage(_docbuild)?\/[\w\/]*)\s*$') # Read the lines with open(filename) as f: lines = f.readlines() + + skip = False for line in lines: + if skip: + if not line.strip() or line.count(' ', 0) >= indent: + continue + skip = False + elif line.lstrip().lower().startswith('.. only::'): + try: + tag_name = line[line.index('feature_') + 8:].strip() + for feature in all_features(): + if tag_name == feature.name.replace('.', '_'): + break + else: + skip = True + indent = line.index('.. ') + 3 + continue + except ValueError: + pass match = auto_re.match(line) if match: yield match.group(2).replace(os.path.sep, '.') diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 93333c2509d..8602016d042 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -296,7 +296,7 @@ def set_intersphinx_mappings(app, config): intersphinx.normalize_intersphinx_mapping(app, config) -# By default document are not master. +# By default document is master. multidocs_is_master = True # https://sphinx-copybutton.readthedocs.io/en/latest/use.html From 907276a710c25df6aea8a09dc6c8f8621f7eda5e Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 12 Nov 2023 13:47:22 +0900 Subject: [PATCH 53/70] Revert live doc - no pdfs --- .github/workflows/doc-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 7d87c9ed4c5..3660ff3a947 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -206,7 +206,7 @@ jobs: export SAGE_LIVE_DOC=yes export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev make doc-clean doc-uninstall - ./config.status && make doc-html && make doc-pdf + ./config.status && make sagemath_doc_html-no-deps working-directory: ./worktree-image env: MAKE: make -j2 --output-sync=recurse From 8912679e891e4ea8e8383a2110df66738b7c80c9 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 12 Nov 2023 19:57:29 +0900 Subject: [PATCH 54/70] Revive pdf docs index page --- src/doc/en/website/root_index.html | 2 +- src/doc/en/website/templates/index.html | 54 ++++++++++---------- src/doc/en/website/templates/index_furo.html | 54 ++++++++++---------- src/sage_docbuild/builders.py | 33 ++++++++++-- 4 files changed, 83 insertions(+), 60 deletions(-) diff --git a/src/doc/en/website/root_index.html b/src/doc/en/website/root_index.html index 21a6086ed72..c3d25ff495b 100644 --- a/src/doc/en/website/root_index.html +++ b/src/doc/en/website/root_index.html @@ -118,7 +118,7 @@

Sage Documentation

Constructions
FAQ
-
Reference Manual
+
Reference Manual
Installation Guide
Developer Guide
diff --git a/src/doc/en/website/templates/index.html b/src/doc/en/website/templates/index.html index c63d109b4dc..cad4cbc287a 100644 --- a/src/doc/en/website/templates/index.html +++ b/src/doc/en/website/templates/index.html @@ -44,12 +44,12 @@

markup. start = rst.rfind('*\n') + 1 end = rst.find('\nUser Interfaces') @@ -725,7 +748,7 @@ def pdf(self): rst_toc = re.sub(r'\n([A-Z][a-zA-Z, ]*)\n[-]*\n', r'\n\n\n

\1

\n\n
    \n', rst_toc) # now write the file. - with open(os.path.join(output_dir, 'index.html'), 'w') as new_index: + with open(os.path.join(output_dir, 'index-pdf.html'), 'w') as new_index: new_index.write(html[:html_end_preamble]) new_index.write('

    Sage Reference Manual (PDF version)

    ') new_index.write(rst_body) From dc2f4fe34e4a03c62817d22198ae8f89313f33ab Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 12 Nov 2023 23:59:29 +0900 Subject: [PATCH 55/70] Make pdf links tidy --- src/sage_docbuild/builders.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py index b113724789b..63aa1145154 100644 --- a/src/sage_docbuild/builders.py +++ b/src/sage_docbuild/builders.py @@ -690,9 +690,6 @@ def pdf(self): html = re.sub(r'Sage(.*)Documentation', r'Sage\2Documentation', html) - html = re.sub(r'Reference Manual', - r'Reference Manual (PDF version)', - html) html = re.sub(r'
  • ', r'
PREP Tutorials