From 6167f32a64b506b7b8805d68d641df741e8065d4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 1 Oct 2023 13:24:35 -0700 Subject: [PATCH 01/96] build/pkgs/brial/type: Change to experimental --- build/pkgs/brial/type | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/brial/type b/build/pkgs/brial/type index a6a7b9cd726..9839eb20815 100644 --- a/build/pkgs/brial/type +++ b/build/pkgs/brial/type @@ -1 +1 @@ -standard +experimental From 665d4029ee6fff38bf9f5866eba2739aeeb39cdf Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 May 2024 19:50:23 -0700 Subject: [PATCH 02/96] src/setup.py: Add brial to optional packages excluded in monolithic install --- src/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup.py b/src/setup.py index dfa2e59b2e1..a50b60f2ab1 100755 --- a/src/setup.py +++ b/src/setup.py @@ -76,7 +76,7 @@ log.info("Discovering Python/Cython source code...") - optional_packages = ['mcqd', 'bliss', 'tdlib', + optional_packages = ['mcqd', 'bliss', 'brial', 'tdlib', 'coxeter3', 'sirocco', 'meataxe'] distributions_to_exclude = [f"sagemath-{pkg}" for pkg in optional_packages] From 1041e9c87b3baf8f0f9258a38b61d6a4d06f33a7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 12 Apr 2024 21:27:57 -0700 Subject: [PATCH 03/96] build/pkgs/sagelib/dependencies*: Reduce brial to optional --- build/pkgs/sagelib/dependencies | 2 +- build/pkgs/sagelib/dependencies_optional | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/sagelib/dependencies_optional diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies index b1ebfd0825e..acd3a2a5e84 100644 --- a/build/pkgs/sagelib/dependencies +++ b/build/pkgs/sagelib/dependencies @@ -1,4 +1,4 @@ -FORCE $(SCRIPTS) boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml importlib_metadata importlib_resources jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy $(PYTHON) requests rw sage_conf singular symmetrica typing_extensions $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup $(PYTHON) pythran +FORCE $(SCRIPTS) boost_cropped $(BLAS) cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml importlib_metadata importlib_resources jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy $(PYTHON) requests rw sage_conf singular symmetrica typing_extensions $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup $(PYTHON) pythran ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/sagelib/dependencies_optional b/build/pkgs/sagelib/dependencies_optional new file mode 100644 index 00000000000..96f2ad18fa7 --- /dev/null +++ b/build/pkgs/sagelib/dependencies_optional @@ -0,0 +1 @@ +brial From 4a17cbe75b08a7479c4aeaa7a383913fcef14958 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 6 Oct 2023 18:30:24 -0700 Subject: [PATCH 04/96] src/sage/features/sagemath.py: Change type of sage.rings.polynomial.pbori to experimental --- src/sage/features/sagemath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/features/sagemath.py b/src/sage/features/sagemath.py index fc54853bc9b..eabf9d92700 100644 --- a/src/sage/features/sagemath.py +++ b/src/sage/features/sagemath.py @@ -935,7 +935,7 @@ def __init__(self): """ JoinFeature.__init__(self, 'sage.rings.polynomial.pbori', [PythonModule('sage.rings.polynomial.pbori.pbori')], - spkg='sagemath_brial', type='standard') + spkg='sagemath_brial', type='experimental') class sage__rings__real_double(PythonModule): From ceaf4b01eaf86f04d0ab334e3980fc0347e6eb7c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 1 Oct 2023 13:38:21 -0700 Subject: [PATCH 05/96] build/make/Makefile.in (PYPI_WHEEL_PACKAGES): Add sagemath_brial --- build/make/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/make/Makefile.in b/build/make/Makefile.in index 7a13e5a9e23..65fe1c27ab8 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -146,7 +146,8 @@ PYPI_WHEEL_PACKAGES = $(PYPI_NOARCH_WHEEL_PACKAGES) \ sagemath_tdlib \ sagemath_coxeter3 \ sagemath_sirocco \ - sagemath_meataxe + sagemath_meataxe \ + sagemath_brial # sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib WHEEL_PACKAGES = $(PYPI_WHEEL_PACKAGES) \ From 4261f0bcbeaeef886c2166b99939c330fb7ecf3b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 12 Apr 2024 21:37:32 -0700 Subject: [PATCH 06/96] build/pkgs/sagemath_brial, pkgs/sagemath-brial: New (from #35095) --- build/pkgs/sagemath_brial/SPKG.rst | 1 + build/pkgs/sagemath_brial/bootstrap | 1 + build/pkgs/sagemath_brial/dependencies | 1 + build/pkgs/sagemath_brial/dependencies_check | 1 + build/pkgs/sagemath_brial/package-version.txt | 1 + build/pkgs/sagemath_brial/spkg-check | 1 + build/pkgs/sagemath_brial/spkg-install.in | 1 + build/pkgs/sagemath_brial/spkg-src | 24 ++++ build/pkgs/sagemath_brial/src | 1 + build/pkgs/sagemath_brial/type | 1 + .../sagemath_brial/version_requirements.txt | 2 + pkgs/sagemath-brial/MANIFEST.in | 21 ++++ pkgs/sagemath-brial/README.rst | 30 +++++ pkgs/sagemath-brial/VERSION.txt | 1 + pkgs/sagemath-brial/pyproject.toml.m4 | 57 +++++++++ .../requirements-editable.txt.m4 | 6 + pkgs/sagemath-brial/requirements.txt.m4 | 2 + pkgs/sagemath-brial/sage | 1 + pkgs/sagemath-brial/setup.py | 6 + pkgs/sagemath-brial/tox.ini | 118 ++++++++++++++++++ 20 files changed, 277 insertions(+) create mode 120000 build/pkgs/sagemath_brial/SPKG.rst create mode 120000 build/pkgs/sagemath_brial/bootstrap create mode 100644 build/pkgs/sagemath_brial/dependencies create mode 120000 build/pkgs/sagemath_brial/dependencies_check create mode 120000 build/pkgs/sagemath_brial/package-version.txt create mode 120000 build/pkgs/sagemath_brial/spkg-check create mode 120000 build/pkgs/sagemath_brial/spkg-install.in create mode 100755 build/pkgs/sagemath_brial/spkg-src create mode 120000 build/pkgs/sagemath_brial/src create mode 100644 build/pkgs/sagemath_brial/type create mode 100644 build/pkgs/sagemath_brial/version_requirements.txt create mode 100644 pkgs/sagemath-brial/MANIFEST.in create mode 100644 pkgs/sagemath-brial/README.rst create mode 120000 pkgs/sagemath-brial/VERSION.txt create mode 100644 pkgs/sagemath-brial/pyproject.toml.m4 create mode 100644 pkgs/sagemath-brial/requirements-editable.txt.m4 create mode 100644 pkgs/sagemath-brial/requirements.txt.m4 create mode 120000 pkgs/sagemath-brial/sage create mode 100644 pkgs/sagemath-brial/setup.py create mode 100644 pkgs/sagemath-brial/tox.ini diff --git a/build/pkgs/sagemath_brial/SPKG.rst b/build/pkgs/sagemath_brial/SPKG.rst new file mode 120000 index 00000000000..b4545b4bda6 --- /dev/null +++ b/build/pkgs/sagemath_brial/SPKG.rst @@ -0,0 +1 @@ +src/README.rst \ No newline at end of file diff --git a/build/pkgs/sagemath_brial/bootstrap b/build/pkgs/sagemath_brial/bootstrap new file mode 120000 index 00000000000..40542346a4e --- /dev/null +++ b/build/pkgs/sagemath_brial/bootstrap @@ -0,0 +1 @@ +../sagelib/bootstrap \ No newline at end of file diff --git a/build/pkgs/sagemath_brial/dependencies b/build/pkgs/sagemath_brial/dependencies new file mode 100644 index 00000000000..ea96958d8f6 --- /dev/null +++ b/build/pkgs/sagemath_brial/dependencies @@ -0,0 +1 @@ +$(PYTHON) cypari memory_allocator sagemath_categories brial | $(PYTHON_TOOLCHAIN) sage_setup sagemath_environment cython pkgconfig diff --git a/build/pkgs/sagemath_brial/dependencies_check b/build/pkgs/sagemath_brial/dependencies_check new file mode 120000 index 00000000000..e3d1f535f9e --- /dev/null +++ b/build/pkgs/sagemath_brial/dependencies_check @@ -0,0 +1 @@ +../sagemath_categories/dependencies_check \ No newline at end of file diff --git a/build/pkgs/sagemath_brial/package-version.txt b/build/pkgs/sagemath_brial/package-version.txt new file mode 120000 index 00000000000..c4540217bba --- /dev/null +++ b/build/pkgs/sagemath_brial/package-version.txt @@ -0,0 +1 @@ +src/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_brial/spkg-check b/build/pkgs/sagemath_brial/spkg-check new file mode 120000 index 00000000000..91c6b1835fc --- /dev/null +++ b/build/pkgs/sagemath_brial/spkg-check @@ -0,0 +1 @@ +../sagemath_objects/spkg-check \ No newline at end of file diff --git a/build/pkgs/sagemath_brial/spkg-install.in b/build/pkgs/sagemath_brial/spkg-install.in new file mode 120000 index 00000000000..d83cc631c9a --- /dev/null +++ b/build/pkgs/sagemath_brial/spkg-install.in @@ -0,0 +1 @@ +../sagemath_objects/spkg-install.in \ No newline at end of file diff --git a/build/pkgs/sagemath_brial/spkg-src b/build/pkgs/sagemath_brial/spkg-src new file mode 100755 index 00000000000..e911f19255e --- /dev/null +++ b/build/pkgs/sagemath_brial/spkg-src @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# +# Script to prepare an sdist tarball for sagemath-brial +# This script is not used during build. +# +# HOW TO MAKE THE TARBALL: +# ./sage --sh build/pkgs/sagemath_brial/spkg-src + +if [ -z "$SAGE_ROOT" ] ; then + echo >&2 "Error - SAGE_ROOT undefined ... exiting" + echo >&2 "Maybe run 'sage -sh'?" + exit 1 +fi + +# Exit on failure +set -e + +cd build/pkgs/sagemath_brial + +cd src +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_brial/src b/build/pkgs/sagemath_brial/src new file mode 120000 index 00000000000..91b20962d0b --- /dev/null +++ b/build/pkgs/sagemath_brial/src @@ -0,0 +1 @@ +../../../pkgs/sagemath-brial \ No newline at end of file diff --git a/build/pkgs/sagemath_brial/type b/build/pkgs/sagemath_brial/type new file mode 100644 index 00000000000..9839eb20815 --- /dev/null +++ b/build/pkgs/sagemath_brial/type @@ -0,0 +1 @@ +experimental diff --git a/build/pkgs/sagemath_brial/version_requirements.txt b/build/pkgs/sagemath_brial/version_requirements.txt new file mode 100644 index 00000000000..c8732a9fefd --- /dev/null +++ b/build/pkgs/sagemath_brial/version_requirements.txt @@ -0,0 +1,2 @@ +# This file is updated on every release by the sage-update-version script +sagemath-brial diff --git a/pkgs/sagemath-brial/MANIFEST.in b/pkgs/sagemath-brial/MANIFEST.in new file mode 100644 index 00000000000..c3f2800773a --- /dev/null +++ b/pkgs/sagemath-brial/MANIFEST.in @@ -0,0 +1,21 @@ +prune sage + +include VERSION.txt + +graft sage/libs/polybori +graft sage/rings/polynomial/pbori + +global-exclude *.c +global-exclude *.cpp + +global-exclude all__sagemath_*.py +global-include all__sagemath_brial.py + +global-exclude __pycache__ +global-exclude *.py[co] +global-exclude *.bak +global-exclude *.so +global-exclude *~ +prune .tox +prune build +prune dist diff --git a/pkgs/sagemath-brial/README.rst b/pkgs/sagemath-brial/README.rst new file mode 100644 index 00000000000..8646fcfb769 --- /dev/null +++ b/pkgs/sagemath-brial/README.rst @@ -0,0 +1,30 @@ +========================================================================= + Sage: Open Source Mathematics Software: Boolean Ring Algebra with BRiAl +========================================================================= + +About SageMath +-------------- + + "Creating a Viable Open Source Alternative to + Magma, Maple, Mathematica, and MATLAB" + + Copyright (C) 2005-2023 The Sage Development Team + + https://www.sagemath.org + +SageMath fully supports all major Linux distributions, recent versions of +macOS, and Windows (using Cygwin or Windows Subsystem for Linux). + +The traditional and recommended way to install SageMath is from source via +Sage-the-distribution (https://www.sagemath.org/download-source.html). +Sage-the-distribution first builds a large number of open source packages from +source (unless it finds suitable versions installed in the system) and then +installs the Sage Library (sagelib, implemented in Python and Cython). + + +About this pip-installable source distribution +---------------------------------------------- + +This pip-installable source distribution ``sagemath-brial`` provides +a Boolean Ring Algebra implementation using binary decision diagrams, +implemented by the BRiAl library, the successor to PolyBoRi. diff --git a/pkgs/sagemath-brial/VERSION.txt b/pkgs/sagemath-brial/VERSION.txt new file mode 120000 index 00000000000..43f4773d7de --- /dev/null +++ b/pkgs/sagemath-brial/VERSION.txt @@ -0,0 +1 @@ +../../src/VERSION.txt \ No newline at end of file diff --git a/pkgs/sagemath-brial/pyproject.toml.m4 b/pkgs/sagemath-brial/pyproject.toml.m4 new file mode 100644 index 00000000000..5ff250e0f6b --- /dev/null +++ b/pkgs/sagemath-brial/pyproject.toml.m4 @@ -0,0 +1,57 @@ +include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*- +[build-system] +# Minimum requirements for the build system to execute. +requires = [ + SPKG_INSTALL_REQUIRES_setuptools + SPKG_INSTALL_REQUIRES_pkgconfig + SPKG_INSTALL_REQUIRES_sage_setup + SPKG_INSTALL_REQUIRES_sagemath_categories + SPKG_INSTALL_REQUIRES_sagemath_environment + SPKG_INSTALL_REQUIRES_sagemath_objects + SPKG_INSTALL_REQUIRES_cython + SPKG_INSTALL_REQUIRES_cysignals +] +build-backend = "setuptools.build_meta" + +[project] +name = "sagemath-brial" +description = "Sage: Open Source Mathematics Software: Boolean Ring Algebra with BRiAl" +dependencies = [ + SPKG_INSTALL_REQUIRES_sagemath_categories + SPKG_INSTALL_REQUIRES_sagemath_environment + SPKG_INSTALL_REQUIRES_cysignals +] +dynamic = ["version"] +include(`pyproject_toml_metadata.m4')dnl' + +[project.readme] +file = "README.rst" +content-type = "text/x-rst" + +[project.optional-dependencies] +# No test requirements; see comment in tox.ini +test = [] + +[tool.setuptools] +include-package-data = false + +[tool.setuptools.dynamic] +version = {file = ["VERSION.txt"]} + +[external] +# External dependencies in the format proposed by https://peps.python.org/pep-0725 +build-requires = [ + "virtual:compiler/c", + "virtual:compiler/cpp", + "pkg:generic/pkg-config", +] + +host-requires = [ + "pkg:generic/brial", + "pkg:generic/gmp", + "pkg:generic/mpc", + "pkg:generic/mpfr", +] + +dependencies = [ +] diff --git a/pkgs/sagemath-brial/requirements-editable.txt.m4 b/pkgs/sagemath-brial/requirements-editable.txt.m4 new file mode 100644 index 00000000000..36ce34fa058 --- /dev/null +++ b/pkgs/sagemath-brial/requirements-editable.txt.m4 @@ -0,0 +1,6 @@ +include(`sage_spkg_versions.m4')dnl +dnl Same as setup.cfg.m4 install_requires; FIXME: should pin to built wheels. +SPKG_INSTALL_REQUIRES_gmpy2 +SPKG_INSTALL_REQUIRES_cysignals +-e ../sagemath-objects +-e ../sagemath-categories diff --git a/pkgs/sagemath-brial/requirements.txt.m4 b/pkgs/sagemath-brial/requirements.txt.m4 new file mode 100644 index 00000000000..8b6ca03b0b9 --- /dev/null +++ b/pkgs/sagemath-brial/requirements.txt.m4 @@ -0,0 +1,2 @@ +Cython==esyscmd(`printf $(sed "s/[.]p.*//;" ../cython/package-version.txt)') +sagemath-standard==esyscmd(`printf $(sed "s/[.]p.*//;" ../sagelib/package-version.txt)') diff --git a/pkgs/sagemath-brial/sage b/pkgs/sagemath-brial/sage new file mode 120000 index 00000000000..e0da5daa6f2 --- /dev/null +++ b/pkgs/sagemath-brial/sage @@ -0,0 +1 @@ +../../src/sage \ No newline at end of file diff --git a/pkgs/sagemath-brial/setup.py b/pkgs/sagemath-brial/setup.py new file mode 100644 index 00000000000..f01bf6c0626 --- /dev/null +++ b/pkgs/sagemath-brial/setup.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +from sage_setup import sage_setup + +sage_setup(['sagemath-brial'], + required_modules=('m4ri', 'libpng')) diff --git a/pkgs/sagemath-brial/tox.ini b/pkgs/sagemath-brial/tox.ini new file mode 100644 index 00000000000..8f78e420ba8 --- /dev/null +++ b/pkgs/sagemath-brial/tox.ini @@ -0,0 +1,118 @@ +# To build and test in the tox environment: +# +# ./sage -sh -c '(cd pkgs/sagemath-glpk && tox -v -v -v -e sagepython)' +# +# To test interactively: +# +# pkgs/sagemath-glpk/.tox/sagepython/bin/python +# +[tox] +envlist = + sagepython-sagewheels-nopypi-norequirements + +requires = + # Auto-provision a modern tox. + # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance + tox>=4.2 + +[pkgenv] +# Environment in which to build the sdist. +# https://tox.wiki/en/latest/upgrading.html#packaging-environments +passenv = + # Variables set by .homebrew-build-env + CPATH + LIBRARY_PATH + PKG_CONFIG_PATH + # Parallel build + SAGE_NUM_THREADS + SAGE_NUM_THREADS_PARALLEL + # SAGE_VENV only for referring to the basepython or finding the wheels + sagepython, sagewheels: SAGE_VENV + # Location of the wheels + sagewheels: SAGE_SPKG_WHEELS + +setenv = + # We supply pip options by environment variables so that they + # apply both to the installation of the dependencies and of the package + sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels} + nopypi: PIP_NO_INDEX=true + +[testenv] +deps = + !norequirements: -rrequirements.txt + +extras = test + +passenv = {[pkgenv]passenv} + +setenv = {[pkgenv]setenv} + # Sage scripts such as sage-runtests like to use $HOME/.sage + HOME={envdir} + # Stop 'sage -t --installed' from picking up doc installed in SAGE_LOCAL + SAGE_DOC=/doesnotexist + KNOWN_TEST_FAILURES={toxinidir}/known-test-failures.json + +allowlist_externals = + bash + +commands = + # Beware of the treacherous non-src layout. "./sage/" shadows the install sage package. + {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.all__sagemath_brial; import sage.rings.polynomial.pbori' + # bash -c 'cd $(python -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") \ + # && sage-runtests -p --force-lib --initial --environment=sage.all__sagemath_polyhedra --baseline-stats-path={toxinidir}/known-test-failures.json ./sage/numerical/backends/glpk*.pyx' + + +[testenv:.tox] +# Allow access to PyPI for auto-provisioning a suitable tox version +passenv = +setenv = PIP_NO_INDEX=false + +[testenv:.pkg-sagepython] +# Environment in which to build the sdist. +# inherits from [pkgenv] - https://tox.wiki/en/latest/upgrading.html#packaging-environments +basepython = {env:SAGE_VENV}/bin/python3 + +[testenv:.pkg-sagepython-sagewheels-nopypi] +passenv = {[pkgenv]passenv} + SAGE_VENV + SAGE_SPKG_WHEELS + +setenv = {[pkgenv]setenv} + PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels} + PIP_NO_INDEX=true + +basepython = {env:SAGE_VENV}/bin/python3 + +[testenv:.pkg-sagepython-sagewheels-nopypi-editable] +config_settings_build_editable = + editable_mode = strict + + +[testenv:sagepython] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython + +[testenv:sagepython-sagewheels-nopypi] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython-sagewheels-nopypi + +[testenv:sagepython-sagewheels] +basepython = {env:SAGE_VENV}/bin/python +package_env = .pkg-sagepython + +[testenv:sagepython-norequirements] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython + + +[testenv:sagepython-sagewheels-nopypi-norequirements] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython-sagewheels-nopypi + +[testenv:sagepython-sagewheels-nopypi-editable] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython-sagewheels-nopypi-editable +package = editable +deps = -r requirements-editable.txt +config_settings_build_editable = + editable_mode = strict From ac5f7e5d85e5c4fc9ddbfda09dc8a6fc6c23d704 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 12 Apr 2024 21:46:59 -0700 Subject: [PATCH 07/96] src/sage_setup/{__init__.py,find.py,command}: Update from #35095 --- src/sage_setup/__init__.py | 156 +++++++++++++++++++++++++++++++++++++ src/sage_setup/find.py | 18 +++-- 2 files changed, 168 insertions(+), 6 deletions(-) diff --git a/src/sage_setup/__init__.py b/src/sage_setup/__init__.py index e69de29bb2d..e7b88606df7 100644 --- a/src/sage_setup/__init__.py +++ b/src/sage_setup/__init__.py @@ -0,0 +1,156 @@ +def sage_setup(distributions, *, + interpreters=(), + required_modules=(), optional_modules=(), + recurse_packages=(), + package_data=None): + r""" + Replacement for :func:`setuptools.setup` for building distribution packages of the Sage library + + INPUT: + + - ``distributions`` -- (typically one-element) sequence of strings, the distribution names + shipped with this distribution package. + + - ``interpreters`` -- sequence of strings, the interpreters to build with :mod:`sage_setup.autogen`. + + - ``required_modules`` -- sequence of strings, pkgconfig modules that are required for the build. + + - ``optional_modules`` -- sequence of strings, pkgconfig modules to checked for the build. + + - ``package_data`` -- ``None`` or a dictionary mapping package names to lists of filename + glob patterns, the package data to install. + + * If ``None``, all of ``package_data`` is taken from ``pyproject.toml``. + + * If a dictionary, use it as package data and ignore ``package_data`` in ``pyproject.toml``. + """ + import time + + from setuptools import setup, find_namespace_packages + from distutils import log + from setuptools.dist import Distribution + from sage_setup.command.sage_build_ext_minimal import sage_build_ext_minimal + from sage_setup.command.sage_build_py import sage_build_py + from sage_setup.cython_options import compiler_directives, compile_time_env_variables + from sage_setup.extensions import create_extension + from sage_setup.find import find_python_sources, find_extra_files + + # Work around a Cython problem in Python 3.8.x on macOS + # https://github.com/cython/cython/issues/3262 + import os + if os.uname().sysname == 'Darwin': + import multiprocessing + multiprocessing.set_start_method('fork', force=True) + + # setuptools plugins considered harmful: + # If build isolation is not in use and setuptools_scm is installed, + # then its file_finders entry point is invoked, which we don't need. + # Workaround from ​https://github.com/pypa/setuptools_scm/issues/190#issuecomment-351181286 + try: + import setuptools_scm.integration + setuptools_scm.integration.find_files = lambda _: [] + except ImportError: + pass + + # And with setuptools_scm 8, we get more trouble: + # LookupError: pyproject.toml does not contain a tool.setuptools_scm section + # LookupError: setuptools-scm was unable to detect version ... + # We just remove all handling of "setuptools.finalize_distribution_options" entry points. + Distribution._removed = staticmethod(lambda ep: True) + + # Different workaround: disable `walk_revctrl` in setuptools + # This is needed for setuptools_scm >= 8, should work for any version + import setuptools.command.egg_info + setuptools.command.egg_info.walk_revctrl = lambda: () + + import sys + + from sage_setup.excepthook import excepthook + sys.excepthook = excepthook + + from sage_setup.setenv import setenv + setenv() + + import sage.env + sage.env.default_required_modules = required_modules + sage.env.default_optional_modules = optional_modules + + cmdclass = dict(build_ext=sage_build_ext_minimal, + build_py=sage_build_py) + + sdist = len(sys.argv) > 1 and (sys.argv[1] in ["sdist", "egg_info", "dist_info"]) + + # ######################################################## + # ## Discovering Sources + # ######################################################## + if sdist: + extensions = [] + python_modules = [] + python_packages = [] + else: + if interpreters: + log.info("Generating auto-generated sources") + # from sage_setup.autogen import autogen_all + # autogen_all() + from sage_setup.autogen.interpreters import rebuild + rebuild(os.path.join("sage", "ext", "interpreters"), + interpreters=interpreters, + distribution=distributions[0], force=True) + + log.info("Discovering Python/Cython source code....") + t = time.time() + + python_packages, python_modules, cython_modules = find_python_sources( + '.', ['sage'], distributions=distributions) + extra_files = find_extra_files( + '.', ['sage'], '/doesnotexist', distributions=distributions) + + python_packages += find_namespace_packages(where='.', include=recurse_packages) + + if package_data is not None: + package_data.update({"": [f + for pkg, files in extra_files.items() + for f in files]}) + python_packages += list(package_data) + + log.warn('python_packages = {0}'.format(sorted(python_packages))) + log.warn('python_modules = {0}'.format(sorted(m if isinstance(m, str) else m.name for m in python_modules))) + log.warn('cython_modules = {0}'.format(sorted(m if isinstance(m, str) else m.name for m in cython_modules))) + log.warn('package_data = {0}'.format(package_data)) + + log.info(f"Discovered Python/Cython sources, time: {(time.time() - t):.2f} seconds.") + + # from sage_build_cython: + import Cython.Compiler.Options + Cython.Compiler.Options.embed_pos_in_docstring = True + gdb_debug = os.environ.get('SAGE_DEBUG', None) != 'no' + + try: + from Cython.Build import cythonize + from sage.env import cython_aliases, sage_include_directories + from sage.misc.package_dir import cython_namespace_package_support + with cython_namespace_package_support(): + extensions = cythonize( + cython_modules, + include_path=sage_include_directories(use_sources=True) + ['.'], + compile_time_env=compile_time_env_variables(), + compiler_directives=compiler_directives(False), + aliases=cython_aliases(), + create_extension=create_extension, + gdb_debug=gdb_debug, + nthreads=4) + except Exception as exception: + log.warn(f"Exception while cythonizing source files: {repr(exception)}") + raise + + kwds = {} + + if package_data is not None: + kwds['package_data'] = package_data + + setup(cmdclass=cmdclass, + packages=python_packages, + py_modules=python_modules, + ext_modules=extensions, + **kwds + ) diff --git a/src/sage_setup/find.py b/src/sage_setup/find.py index 8762e08ad0f..155853c54da 100644 --- a/src/sage_setup/find.py +++ b/src/sage_setup/find.py @@ -131,7 +131,7 @@ def find_python_sources(src_dir, modules=['sage'], distributions=None, sage: find_python_sources(SAGE_SRC, modules=['sage_setup']) (['sage_setup', ...], [...'sage_setup.find'...], []) """ - from setuptools import Extension + from setuptools.extension import Extension PYMOD_EXT = get_extensions('source')[0] @@ -147,13 +147,12 @@ def find_python_sources(src_dir, modules=['sage'], distributions=None, for module in modules: for dirpath, dirnames, filenames in os.walk(module): package = dirpath.replace(os.path.sep, '.') - if not is_package_or_namespace_package_dir(dirpath): + if not is_package_or_namespace_package_dir(dirpath, distribution_filter=distribution_filter): # Skip any subdirectories dirnames[:] = [] continue # Ordinary package or namespace package. - if distributions is None or '' in distributions: - python_packages.append(package) + python_packages.append(package) for filename in filenames: base, ext = os.path.splitext(filename) @@ -260,7 +259,7 @@ def _cythonized_dir(src_dir=None, editable_install=None): def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[], *, - distributions=None): + distributions=None, exclude_distributions=None): """ Find all extra files which should be installed. @@ -293,6 +292,11 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[], *, ``distribution`` (from a ``# sage_setup: distribution = PACKAGE`` directive in the file) is an element of ``distributions``. + - ``exclude_distributions`` -- (default: ``None``) if not ``None``, + should be a sequence or set of strings: exclude modules whose + ``distribution`` (from a ``# sage_setup: distribution = PACKAGE`` + directive in the module source file) is in ``exclude_distributions``. + OUTPUT: dict with items ``{dir: files}`` where ``dir`` is a directory relative to ``src_dir`` and ``files`` is a list of filenames inside that directory. @@ -311,12 +315,14 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[], *, data_files = {} cy_exts = ('.pxd', '.pxi', '.pyx') + distribution_filter = SourceDistributionFilter(distributions, exclude_distributions) + cwd = os.getcwd() try: os.chdir(src_dir) for module in modules: for dir, dirnames, filenames in os.walk(module): - if not is_package_or_namespace_package_dir(dir): + if not is_package_or_namespace_package_dir(dir, distribution_filter=distribution_filter): continue sdir = os.path.join(src_dir, dir) cydir = os.path.join(cythonized_dir, dir) From baefb9ab0edb54a203a6e6c90a63bf177ed29a9e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 12 Apr 2024 21:51:43 -0700 Subject: [PATCH 08/96] build/pkgs/{brial,sagemath_brial}: Change to optional --- build/pkgs/brial/type | 2 +- build/pkgs/sagemath_brial/type | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/brial/type b/build/pkgs/brial/type index 9839eb20815..134d9bc32d5 100644 --- a/build/pkgs/brial/type +++ b/build/pkgs/brial/type @@ -1 +1 @@ -experimental +optional diff --git a/build/pkgs/sagemath_brial/type b/build/pkgs/sagemath_brial/type index 9839eb20815..134d9bc32d5 100644 --- a/build/pkgs/sagemath_brial/type +++ b/build/pkgs/sagemath_brial/type @@ -1 +1 @@ -experimental +optional From 4c8b66e5bed593776208bf76f2b5468f7554c668 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 12 Apr 2024 22:23:12 -0700 Subject: [PATCH 09/96] Add all__sagemath_brial.py files --- src/sage/all__sagemath_brial.py | 3 +++ src/sage/libs/all__sagemath_brial.py | 1 + src/sage/rings/all__sagemath_brial.py | 1 + src/sage/rings/polynomial/all__sagemath_brial.py | 1 + 4 files changed, 6 insertions(+) create mode 100644 src/sage/all__sagemath_brial.py create mode 100644 src/sage/libs/all__sagemath_brial.py create mode 100644 src/sage/rings/all__sagemath_brial.py create mode 100644 src/sage/rings/polynomial/all__sagemath_brial.py diff --git a/src/sage/all__sagemath_brial.py b/src/sage/all__sagemath_brial.py new file mode 100644 index 00000000000..6395af675fe --- /dev/null +++ b/src/sage/all__sagemath_brial.py @@ -0,0 +1,3 @@ +# sage_setup: distribution = sagemath-brial + +from .all__sagemath_categories import * diff --git a/src/sage/libs/all__sagemath_brial.py b/src/sage/libs/all__sagemath_brial.py new file mode 100644 index 00000000000..016ca38a057 --- /dev/null +++ b/src/sage/libs/all__sagemath_brial.py @@ -0,0 +1 @@ +# sage_setup: distribution = sagemath-brial diff --git a/src/sage/rings/all__sagemath_brial.py b/src/sage/rings/all__sagemath_brial.py new file mode 100644 index 00000000000..016ca38a057 --- /dev/null +++ b/src/sage/rings/all__sagemath_brial.py @@ -0,0 +1 @@ +# sage_setup: distribution = sagemath-brial diff --git a/src/sage/rings/polynomial/all__sagemath_brial.py b/src/sage/rings/polynomial/all__sagemath_brial.py new file mode 100644 index 00000000000..016ca38a057 --- /dev/null +++ b/src/sage/rings/polynomial/all__sagemath_brial.py @@ -0,0 +1 @@ +# sage_setup: distribution = sagemath-brial From 6a8d03b2234b2709b6a512748a00c295326ac2c5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 16 Oct 2023 20:18:31 -0700 Subject: [PATCH 10/96] pkgs/sagemath-brial/tox.ini: Fix references to package name --- pkgs/sagemath-brial/tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/sagemath-brial/tox.ini b/pkgs/sagemath-brial/tox.ini index 8f78e420ba8..c7bfd0d0923 100644 --- a/pkgs/sagemath-brial/tox.ini +++ b/pkgs/sagemath-brial/tox.ini @@ -1,10 +1,10 @@ # To build and test in the tox environment: # -# ./sage -sh -c '(cd pkgs/sagemath-glpk && tox -v -v -v -e sagepython)' +# ./sage -sh -c '(cd pkgs/sagemath-brial && tox -v -v -v -e sagepython)' # # To test interactively: # -# pkgs/sagemath-glpk/.tox/sagepython/bin/python +# pkgs/sagemath-brial/.tox/sagepython/bin/python # [tox] envlist = From de1aa5dbbd63452f17e4ff23d4f8b6da2ed1782a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 12 Apr 2024 22:46:01 -0700 Subject: [PATCH 11/96] src/sage/features/sagemath.py: Make sagemath-brial optional, not experimental --- src/sage/features/sagemath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/features/sagemath.py b/src/sage/features/sagemath.py index eabf9d92700..52eee422d91 100644 --- a/src/sage/features/sagemath.py +++ b/src/sage/features/sagemath.py @@ -935,7 +935,7 @@ def __init__(self): """ JoinFeature.__init__(self, 'sage.rings.polynomial.pbori', [PythonModule('sage.rings.polynomial.pbori.pbori')], - spkg='sagemath_brial', type='experimental') + spkg='sagemath_brial', type='optional') class sage__rings__real_double(PythonModule): From ac7523e197693b8420409224cea8816fc01bb92d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 12 Apr 2024 22:56:31 -0700 Subject: [PATCH 12/96] build/pkgs/sagemath_brial/dependencies: Move PYTHON to end --- build/pkgs/sagemath_brial/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/sagemath_brial/dependencies b/build/pkgs/sagemath_brial/dependencies index ea96958d8f6..83674279e69 100644 --- a/build/pkgs/sagemath_brial/dependencies +++ b/build/pkgs/sagemath_brial/dependencies @@ -1 +1 @@ -$(PYTHON) cypari memory_allocator sagemath_categories brial | $(PYTHON_TOOLCHAIN) sage_setup sagemath_environment cython pkgconfig +cypari memory_allocator sagemath_categories brial | $(PYTHON_TOOLCHAIN) sage_setup sagemath_environment cython pkgconfig $(PYTHON) From 10ad2a931aa7897d600dc667a1c0965481930073 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 16 Apr 2024 23:25:40 -0700 Subject: [PATCH 13/96] src/sage_setup/find.py: Restore --- src/sage_setup/find.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/sage_setup/find.py b/src/sage_setup/find.py index 155853c54da..8762e08ad0f 100644 --- a/src/sage_setup/find.py +++ b/src/sage_setup/find.py @@ -131,7 +131,7 @@ def find_python_sources(src_dir, modules=['sage'], distributions=None, sage: find_python_sources(SAGE_SRC, modules=['sage_setup']) (['sage_setup', ...], [...'sage_setup.find'...], []) """ - from setuptools.extension import Extension + from setuptools import Extension PYMOD_EXT = get_extensions('source')[0] @@ -147,12 +147,13 @@ def find_python_sources(src_dir, modules=['sage'], distributions=None, for module in modules: for dirpath, dirnames, filenames in os.walk(module): package = dirpath.replace(os.path.sep, '.') - if not is_package_or_namespace_package_dir(dirpath, distribution_filter=distribution_filter): + if not is_package_or_namespace_package_dir(dirpath): # Skip any subdirectories dirnames[:] = [] continue # Ordinary package or namespace package. - python_packages.append(package) + if distributions is None or '' in distributions: + python_packages.append(package) for filename in filenames: base, ext = os.path.splitext(filename) @@ -259,7 +260,7 @@ def _cythonized_dir(src_dir=None, editable_install=None): def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[], *, - distributions=None, exclude_distributions=None): + distributions=None): """ Find all extra files which should be installed. @@ -292,11 +293,6 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[], *, ``distribution`` (from a ``# sage_setup: distribution = PACKAGE`` directive in the file) is an element of ``distributions``. - - ``exclude_distributions`` -- (default: ``None``) if not ``None``, - should be a sequence or set of strings: exclude modules whose - ``distribution`` (from a ``# sage_setup: distribution = PACKAGE`` - directive in the module source file) is in ``exclude_distributions``. - OUTPUT: dict with items ``{dir: files}`` where ``dir`` is a directory relative to ``src_dir`` and ``files`` is a list of filenames inside that directory. @@ -315,14 +311,12 @@ def find_extra_files(src_dir, modules, cythonized_dir, special_filenames=[], *, data_files = {} cy_exts = ('.pxd', '.pxi', '.pyx') - distribution_filter = SourceDistributionFilter(distributions, exclude_distributions) - cwd = os.getcwd() try: os.chdir(src_dir) for module in modules: for dir, dirnames, filenames in os.walk(module): - if not is_package_or_namespace_package_dir(dir, distribution_filter=distribution_filter): + if not is_package_or_namespace_package_dir(dir): continue sdir = os.path.join(src_dir, dir) cydir = os.path.join(cythonized_dir, dir) From 82ad499fbd7b0b3c6299bf9fb9925a8c356e669d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 17 Apr 2024 00:01:12 -0700 Subject: [PATCH 14/96] pkgs/sagemath-brial/pyproject.toml.m4: Remove runtime dependencies on sagemath* for now --- pkgs/sagemath-brial/pyproject.toml.m4 | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/sagemath-brial/pyproject.toml.m4 b/pkgs/sagemath-brial/pyproject.toml.m4 index 5ff250e0f6b..51ab91b28db 100644 --- a/pkgs/sagemath-brial/pyproject.toml.m4 +++ b/pkgs/sagemath-brial/pyproject.toml.m4 @@ -17,8 +17,6 @@ build-backend = "setuptools.build_meta" name = "sagemath-brial" description = "Sage: Open Source Mathematics Software: Boolean Ring Algebra with BRiAl" dependencies = [ - SPKG_INSTALL_REQUIRES_sagemath_categories - SPKG_INSTALL_REQUIRES_sagemath_environment SPKG_INSTALL_REQUIRES_cysignals ] dynamic = ["version"] From 84d6e675300e92be286e40c4ec4eced08cb6db12 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 17 Apr 2024 11:05:11 -0700 Subject: [PATCH 15/96] build/pkgs/sagemath_brial: Depend on sagelib instead of sagemath_categories for now --- build/pkgs/sagemath_brial/dependencies | 2 +- build/pkgs/sagemath_brial/spkg-install.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/sagemath_brial/dependencies b/build/pkgs/sagemath_brial/dependencies index 83674279e69..ae30ae46bf7 100644 --- a/build/pkgs/sagemath_brial/dependencies +++ b/build/pkgs/sagemath_brial/dependencies @@ -1 +1 @@ -cypari memory_allocator sagemath_categories brial | $(PYTHON_TOOLCHAIN) sage_setup sagemath_environment cython pkgconfig $(PYTHON) +cypari memory_allocator brial sagelib | $(PYTHON_TOOLCHAIN) sage_setup cython pkgconfig $(PYTHON) diff --git a/build/pkgs/sagemath_brial/spkg-install.in b/build/pkgs/sagemath_brial/spkg-install.in index d83cc631c9a..935c21a7554 120000 --- a/build/pkgs/sagemath_brial/spkg-install.in +++ b/build/pkgs/sagemath_brial/spkg-install.in @@ -1 +1 @@ -../sagemath_objects/spkg-install.in \ No newline at end of file +../sagemath_tdlib/spkg-install.in \ No newline at end of file From 21a55d4603aee0bff7e1945577e6cbc28f78ae3c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 17 Apr 2024 19:31:33 -0700 Subject: [PATCH 16/96] pkgs/sagemath-brial/tox.ini: Update from sagemath-categories --- pkgs/sagemath-brial/tox.ini | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/sagemath-brial/tox.ini b/pkgs/sagemath-brial/tox.ini index c7bfd0d0923..649c4188b20 100644 --- a/pkgs/sagemath-brial/tox.ini +++ b/pkgs/sagemath-brial/tox.ini @@ -13,7 +13,9 @@ envlist = requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 tox>=4.2 + tox<4.14.1 [pkgenv] # Environment in which to build the sdist. @@ -26,6 +28,7 @@ passenv = # Parallel build SAGE_NUM_THREADS SAGE_NUM_THREADS_PARALLEL + MAKEFLAGS # SAGE_VENV only for referring to the basepython or finding the wheels sagepython, sagewheels: SAGE_VENV # Location of the wheels @@ -51,16 +54,15 @@ setenv = {[pkgenv]setenv} # Stop 'sage -t --installed' from picking up doc installed in SAGE_LOCAL SAGE_DOC=/doesnotexist KNOWN_TEST_FAILURES={toxinidir}/known-test-failures.json + # See src/bin/sage-env + PYDEVD_DISABLE_FILE_VALIDATION=1 allowlist_externals = bash commands = - # Beware of the treacherous non-src layout. "./sage/" shadows the install sage package. + # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.all__sagemath_brial; import sage.rings.polynomial.pbori' - # bash -c 'cd $(python -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") \ - # && sage-runtests -p --force-lib --initial --environment=sage.all__sagemath_polyhedra --baseline-stats-path={toxinidir}/known-test-failures.json ./sage/numerical/backends/glpk*.pyx' - [testenv:.tox] # Allow access to PyPI for auto-provisioning a suitable tox version From 71c02046a1af15e8758670a159d8be8bc7adc3d9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 17 Apr 2024 19:31:52 -0700 Subject: [PATCH 17/96] pkgs/sagemath-brial/pyproject.toml.m4: Declare test requirements --- pkgs/sagemath-brial/pyproject.toml.m4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/sagemath-brial/pyproject.toml.m4 b/pkgs/sagemath-brial/pyproject.toml.m4 index 51ab91b28db..b99d59c3365 100644 --- a/pkgs/sagemath-brial/pyproject.toml.m4 +++ b/pkgs/sagemath-brial/pyproject.toml.m4 @@ -27,8 +27,10 @@ file = "README.rst" content-type = "text/x-rst" [project.optional-dependencies] -# No test requirements; see comment in tox.ini -test = [] +test = [ + SPKG_INSTALL_REQUIRES_sagemath_categories + SPKG_INSTALL_REQUIRES_sagemath_repl +] [tool.setuptools] include-package-data = false From fe739a42aaf57ada95ad894be2f466b5682ee30e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 21 May 2024 22:51:02 -0700 Subject: [PATCH 18/96] .gitignore: Handle pkgs/sagemath-brial --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 1d7eacdf9e4..5d073edb277 100644 --- a/.gitignore +++ b/.gitignore @@ -219,6 +219,7 @@ build/pkgs/wheel/version_requirements.txt /pkgs/sagemath-objects/setup.cfg /pkgs/sagemath-bliss/setup.cfg +/pkgs/sagemath-brial/setup.cfg /pkgs/sagemath-coxeter3/setup.cfg /pkgs/sagemath-mcqd/setup.cfg /pkgs/sagemath-meataxe/setup.cfg @@ -229,6 +230,7 @@ build/pkgs/wheel/version_requirements.txt /pkgs/sagemath-repl/setup.cfg /pkgs/sagemath-objects/pyproject.toml /pkgs/sagemath-bliss/pyproject.toml +/pkgs/sagemath-brial/pyproject.toml /pkgs/sagemath-coxeter3/pyproject.toml /pkgs/sagemath-mcqd/pyproject.toml /pkgs/sagemath-meataxe/pyproject.toml @@ -239,6 +241,7 @@ build/pkgs/wheel/version_requirements.txt /pkgs/sagemath-repl/pyproject.toml /pkgs/sagemath-objects/requirements*.txt /pkgs/sagemath-bliss/requirements*.txt +/pkgs/sagemath-brial/requirements*.txt /pkgs/sagemath-coxeter3/requirements*.txt /pkgs/sagemath-mcqd/requirements*.txt /pkgs/sagemath-meataxe/requirements*.txt From 8550f3b1133b3c202a988863d40f774d13830a64 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 May 2024 20:09:03 -0700 Subject: [PATCH 19/96] src/setup.cfg.m4: Define extra 'brial' --- src/setup.cfg.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/setup.cfg.m4 b/src/setup.cfg.m4 index 76aa08f8833..ec1a70a8689 100644 --- a/src/setup.cfg.m4 +++ b/src/setup.cfg.m4 @@ -131,6 +131,7 @@ sage = [options.extras_require] R = SPKG_INSTALL_REQUIRES_rpy2 bliss = SPKG_INSTALL_REQUIRES_sagemath_bliss +brial = SPKG_INSTALL_REQUIRES_sagemath_brial coxeter3 = SPKG_INSTALL_REQUIRES_sagemath_coxeter3 mcqd = SPKG_INSTALL_REQUIRES_sagemath_mcqd meataxe = SPKG_INSTALL_REQUIRES_sagemath_meataxe From 48841128829d405cc93505a727ac98396ef02dbe Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 May 2024 21:34:54 -0700 Subject: [PATCH 20/96] pkgs/sagemath-{objects,categories,repl,environment}/MANIFEST.in: Update from #35095 --- pkgs/sagemath-categories/MANIFEST.in.m4 | 221 +++++++++++++++++++++++- pkgs/sagemath-environment/MANIFEST.in | 1 + pkgs/sagemath-objects/MANIFEST.in | 23 ++- pkgs/sagemath-repl/MANIFEST.in | 12 ++ 4 files changed, 246 insertions(+), 11 deletions(-) diff --git a/pkgs/sagemath-categories/MANIFEST.in.m4 b/pkgs/sagemath-categories/MANIFEST.in.m4 index b2e35673ec0..585640540e2 100644 --- a/pkgs/sagemath-categories/MANIFEST.in.m4 +++ b/pkgs/sagemath-categories/MANIFEST.in.m4 @@ -28,15 +28,222 @@ exclude sage/categories/sets_with_partial_maps.* exclude sage/categories/subobjects.* exclude sage/categories/subquotients.* exclude sage/categories/with_realizations.* -# Exclude to make it a namespace package -exclude sage/categories/__init__.py -include sage/rings/ideal.* -include sage/rings/ring.* +include sage/geometry/abc.p* + +# Interfaces +include sage/interfaces/all.p* +include sage/interfaces/abc.p* +include sage/interfaces/process.p* # needed for sage.parallel +include sage/interfaces/tab_completion.p* +include sage/misc/object_multiplexer.p* +include sage/misc/multireplace.p* +include sage/interfaces/sagespawn.p* +include sage/interfaces/quit.p* +include sage/interfaces/cleaner.p* +include sage/interfaces/expect.p* +include sage/interfaces/interface.p* +include sage/interfaces/sage0.p* + +graft sage/parallel + graft sage/typeset # dep of sage.categories.tensor -# include sage/rings/integer*.* # depends on cypari, flint - https://github.com/sagemath/sage/issues/30022 -# include sage/rings/rational*.* -# include sage/rings/infinity.* + +include sage/groups/generic.p* +include sage/groups/groups_catalog.p* + +include sage/monoids/monoid.p* + +include sage/rings/ring.* +include sage/rings/quotient_ring*.p* +include sage/rings/homset.p* +include sage/rings/ideal*.p* +include sage/rings/noncommutative_ideals.p* +include sage/rings/localization.p* +include sage/rings/morphism.p* + +include sage/rings/abc.* +include sage/rings/integer*.p* +exclude sage/rings/integer_fake.pxd # in sagemath-objects +include sage/rings/rational*.* +include sage/rings/infinity.* +include sage/rings/factorint.p* +include sage/rings/sum_of_squares.p* +include sage/rings/generic.p* + +include sage/misc/allocator.* +include sage/misc/latex*.* +include sage/misc/html.p* +include sage/misc/mathml.p* +include sage/misc/table.p* +include sage/misc/map_threaded.p* +include sage/misc/mrange.p* +include sage/misc/defaults.p* +include sage/misc/converting_dict.p* +include sage/misc/parser.p* +include sage/misc/method_decorator.p* +include sage/misc/random_testing.p* +include sage/misc/rest_index_of_methods.p* +include sage/misc/callable_dict.p* +include sage/misc/search.p* +include sage/misc/stopgap.p* + +## Data structures +include sage/misc/binary_tree.p* +graft sage/data_structures # bitset needed by sage.graphs and sage.geometry.polyhedron +exclude sage/data_structures/bounded_integer_sequences.* # depends on flint +exclude sage/data_structures/stream.* +graft sage/groups/perm_gps/partn_ref # but not partn_ref2, which depends on GAP +exclude sage/groups/perm_gps/partn_ref/refinement_graphs.p* # sagemath-graphs +exclude sage/groups/perm_gps/partn_ref/refinement_matrices.p* # sagemath-modules +exclude sage/groups/perm_gps/partn_ref/refinement_binary.p* # sagemath-modules + + +# These might later go to a separate distribution sagemath-functions (> sagemath-objects); +# but sage.functions currently depends on basic rings (QQ etc) +graft sage/arith +# Exclude what is included in sagemath-objects already +exclude sage/arith/long.p* +exclude sage/arith/numerical_approx.p* +exclude sage/arith/power.p* + +include sage/calculus/functional.p* +include sage/calculus/functions.p* +include sage/misc/derivative.p* +include sage/misc/functional.p* +include sage/symbolic/symbols.p* +include sage/symbolic/function.p* +graft sage/functions + + +include sage/rings/finite_rings/element_base.* +include sage/rings/finite_rings/stdint.* +include sage/rings/finite_rings/finite_field_base.p* +include sage/rings/finite_rings/finite_field_constructor.p* +include sage/rings/finite_rings/finite_field_prime_modn.p* +include sage/rings/finite_rings/residue_field.p* +include sage/rings/finite_rings/hom_finite_field.p* +include sage/rings/finite_rings/hom_prime_finite_field.p* +include sage/rings/finite_rings/homset.p* +include sage/rings/fast_arith.* +include sage/rings/finite_rings/integer_mod_limits.h +include sage/rings/finite_rings/integer_mod.p* +include sage/rings/finite_rings/integer_mod_ring.p* +include sage/rings/finite_rings/conway_polynomials.p* +include sage/rings/finite_rings/galois_group.p* +include sage/rings/algebraic_closure_finite_field.p* + +include sage/rings/number_field/number_field_base.p* +include sage/rings/number_field/number_field_element_base.p* +include sage/rings/number_field/number_field_ideal.p* +include sage/rings/real_double.p* + +include sage/rings/real_lazy.p* + +include sage/rings/fraction_field.p* +include sage/rings/fraction_field_element.p* +include sage/rings/qqbar_decorators.p* + +include sage/rings/padics/padic_generic.p* +include sage/rings/padics/local_generic.p* +include sage/rings/padics/local_generic_element.p* +include sage/rings/padics/precision_error.p* +include sage/rings/padics/misc.p* + +include sage/rings/polynomial/polynomial_ring.p* +include sage/rings/polynomial/polynomial_ring_constructor.p* +include sage/rings/polynomial/polynomial_ring_homomorphism.p* +include sage/rings/polynomial/polynomial_quotient_ring.p* +include sage/rings/polynomial/polynomial_singular_interface.p* +include sage/rings/polynomial/multi_polynomial_ring.p* +include sage/rings/polynomial/multi_polynomial_ring_base.p* +include sage/rings/polynomial/multi_polynomial_sequence.p* +include sage/rings/polynomial/multi_polynomial_ideal.p* +include sage/rings/polynomial/infinite_polynomial_*.p* +include sage/rings/polynomial/commutative_polynomial.p* +include sage/rings/polynomial/polynomial_compiled.p* +include sage/rings/polynomial/polynomial_element.p* +include sage/rings/polynomial/polynomial_element_generic.p* +include sage/rings/polynomial/polynomial_fateman.p* +include sage/rings/polynomial/polynomial_quotient_ring_element.p* +include sage/rings/polynomial/multi_polynomial.p* +include sage/rings/polynomial/multi_polynomial_element.p* +include sage/rings/polynomial/polydict.p* +include sage/rings/polynomial/term_order.p* +include sage/rings/polynomial/flatten.p* +include sage/rings/polynomial/cyclotomic.p* +include sage/rings/polynomial/laurent_polynomial_ring*.p* +include sage/rings/polynomial/laurent_polynomial_ideal.p* +include sage/rings/polynomial/laurent_polynomial.p* # but not laurent_polynomial_mpair, which needs Matrix +include sage/rings/polynomial/ideal.p* +include sage/rings/polynomial/toy*.p* +include sage/rings/polynomial/symmetric_*.p* +## include sage/rings/polynomial/ore*.p* # need for sage.categories.drinfeld_modules + +include sage/rings/continued_fraction*.p* + +graft sage/rings/function_field +exclude sage/rings/function_field/*_polymod.* # needs Singular +exclude sage/rings/function_field/derivations*.* # module elements +exclude sage/rings/function_field/differential.* # module elements +exclude sage/rings/function_field/divisor.* # module elements +exclude sage/rings/function_field/hermite_form_polynomial.* # cimports Matrix +exclude sage/rings/function_field/valuation*.* # ?? +prune sage/rings/function_field/drinfeld_modules # needs ore_polynomial etc. + +include sage/rings/power_series_mpoly.p* +include sage/rings/power_series_poly.p* +include sage/rings/power_series_ring_element.p* +include sage/rings/power_series_ring.p* +include sage/rings/multi_power_series_ring.py +include sage/rings/multi_power_series_ring_element.py +include sage/rings/laurent_series_ring*.p* +include sage/rings/puiseux_series_ring*.p* + +graft sage/rings/semirings + +include sage/rings/tests.p* +include sage/rings/big_oh.p* + +include sage/ext/fast_*.p* + +include sage/combinat/integer_vector.p* +graft sage/combinat/integer_lists +include sage/combinat/backtrack.p* +include sage/combinat/combinat.p* +include sage/combinat/combinat_cython.p* +include sage/combinat/combination.p* +include sage/combinat/combinatorial_map.p* +include sage/combinat/composition.p* +include sage/combinat/permutation.p* +include sage/combinat/permutation_cython.p* +include sage/combinat/ranker.py # for sage.sets.finite_set_map_cy +include sage/combinat/subset.p* +include sage/combinat/tools.p* +include sage/combinat/tuple.p* +# leave out partition - has complicated deps +# leave out integer_vector_weighted - needs combinat.words.word +include sage/combinat/subsets_hereditary.p* +include sage/combinat/subsets_pairwise.p* +include sage/combinat/dlx.p* +include sage/combinat/matrices/dancing_links.p* +include sage/combinat/matrices/dancing_links_c.h +include sage/combinat/matrices/dlxcpp.p* + +# see src/sage/schemes/generic/notes/imports.txt +graft sage/schemes/generic +graft sage/schemes/affine +graft sage/schemes/projective +graft sage/schemes/product_projective + +graft sage/sets +exclude sage/sets/pythonclass.* # sagemath-objects + +include sage/numerical/backends/generic*backend.p* + +## These two should probably go to sagemath-combinat instead. +# include sage/data_structures/stream.p* +# include sage/rings/lazy_series*.p* global-exclude *.c global-exclude *.cpp diff --git a/pkgs/sagemath-environment/MANIFEST.in b/pkgs/sagemath-environment/MANIFEST.in index ca4266e2bf4..f7b1523ef88 100644 --- a/pkgs/sagemath-environment/MANIFEST.in +++ b/pkgs/sagemath-environment/MANIFEST.in @@ -6,6 +6,7 @@ include sage/misc/package.py include sage/misc/package_dir.py include sage/misc/temporary_file.py include sage/misc/viewer.py + graft sage/features include VERSION.txt diff --git a/pkgs/sagemath-objects/MANIFEST.in b/pkgs/sagemath-objects/MANIFEST.in index c9b25189372..8df65d2eccb 100644 --- a/pkgs/sagemath-objects/MANIFEST.in +++ b/pkgs/sagemath-objects/MANIFEST.in @@ -32,6 +32,7 @@ include sage/misc/classcall_metaclass.* include sage/misc/inherit_comparison*.* include sage/misc/weak_dict.* include sage/misc/nested_class*.* +include sage/misc/test_nested_class*.p* include sage/misc/abstract_method.* include sage/misc/cachefunc.* include sage/misc/decorators.* @@ -46,41 +47,55 @@ include sage/misc/constant_function.* include sage/misc/call.* include sage/misc/bindable_class.* include sage/misc/namespace_package.p* -include sage/misc/package_dir.py include sage/misc/verbose.* include sage/misc/repr.* include sage/misc/superseded.* include sage/misc/misc_c.* # prod include sage/misc/flatten.* # dep of sage/categories/coxeter_groups.py - +include sage/misc/lazy_list.p* include sage/misc/lazy_import*.* include sage/misc/sageinspect.* # dep of sage/misc/lazy_import include sage/misc/instancedoc.* # dep of sage/misc/lazy_import include sage/misc/persist.* include sage/misc/sage_unittest.* # dep of sage/misc/persist +include sage/misc/fpickle.p* include sage/misc/randstate.* # used in sage.doctest include sage/misc/prandom.* # dep of sage/rings/ring include sage/ext/stdsage.pxd +include sage/ext/mod_int.* +include sage/ext/cplusplus.pxd include sage/sets/pythonclass.* include sage/arith/power.* include sage/arith/numerical_approx.* # integers... include sage/arith/long.* include sage/rings/integer_fake.* -graft sage/libs/gmp +# coerce actions needs is_Group +include sage/groups/group.* +include sage/groups/old.* +# needed for sage.structure.formal_sum +include sage/modules/module.p* + +graft sage/libs/gmp +include sage/libs/gmpxx.pxd ## What we do not want: # sage/misc/latex -- this should really go to another package -## FIXME: Needed for doctesting +## Needed for doctesting; we keep sagemath-repl pure Python include sage/misc/misc.* # some_tuples used in sage.misc.sage_unittest include sage/misc/timing.p* # walltime, cputime used in sage.doctest +include sage/misc/globals.p* +include sage/misc/sage_timeit*.p* +include sage/misc/session.p* +include sage/misc/reset.p* +include sage/misc/sage_ostools.p* global-exclude all__*.py global-include all__sagemath_objects.py diff --git a/pkgs/sagemath-repl/MANIFEST.in b/pkgs/sagemath-repl/MANIFEST.in index ba331ec2931..f160c046d47 100644 --- a/pkgs/sagemath-repl/MANIFEST.in +++ b/pkgs/sagemath-repl/MANIFEST.in @@ -2,11 +2,23 @@ prune sage graft sage/doctest graft sage/repl +graft sage/tests + include sage/misc/banner.py include sage/misc/sagedoc.py include sage/misc/sage_input.py include sage/misc/sage_eval.py +include sage/misc/explain_pickle.py +include sage/misc/trace.py +include sage/misc/profiler.py +include sage/misc/dev_tools.py +include sage/misc/edit_module.py +include sage/misc/pager.py + +include sage/misc/cython.py +include sage/misc/inline_fortran.py + include VERSION.txt global-exclude all__*.py From 0c5ea52ff7e63bcf3061ed7e6e3c938c836449be Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 May 2024 21:41:49 -0700 Subject: [PATCH 21/96] pkgs/sagemath-{objects,categories,repl,environment}/pyproject.toml: Update from #35095 --- pkgs/sagemath-categories/pyproject.toml.m4 | 7 ++++++- pkgs/sagemath-objects/pyproject.toml.m4 | 2 +- pkgs/sagemath-repl/pyproject.toml.m4 | 10 +++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/sagemath-categories/pyproject.toml.m4 b/pkgs/sagemath-categories/pyproject.toml.m4 index edbafa59242..a1ad47838e9 100644 --- a/pkgs/sagemath-categories/pyproject.toml.m4 +++ b/pkgs/sagemath-categories/pyproject.toml.m4 @@ -3,12 +3,13 @@ include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*- # Minimum requirements for the build system to execute. requires = [ SPKG_INSTALL_REQUIRES_setuptools - SPKG_INSTALL_REQUIRES_wheel SPKG_INSTALL_REQUIRES_sage_setup + SPKG_INSTALL_REQUIRES_jinja2 SPKG_INSTALL_REQUIRES_sagemath_environment SPKG_INSTALL_REQUIRES_sagemath_objects SPKG_INSTALL_REQUIRES_cython SPKG_INSTALL_REQUIRES_gmpy2 + SPKG_INSTALL_REQUIRES_memory_allocator SPKG_INSTALL_REQUIRES_cysignals SPKG_INSTALL_REQUIRES_pkgconfig ] @@ -19,6 +20,7 @@ name = "sagemath-categories" description = "Sage: Open Source Mathematics Software: Sage categories and basic rings" dependencies = [ SPKG_INSTALL_REQUIRES_sagemath_objects + SPKG_INSTALL_REQUIRES_memory_allocator ] dynamic = ["version"] include(`pyproject_toml_metadata.m4')dnl' @@ -38,6 +40,9 @@ include-package-data = false [tool.setuptools.dynamic] version = {file = ["VERSION.txt"]} +[tool.setuptools.package-data] +"sage.rings.finite_rings" = ["integer_mod_limits.h"] + [external] # External dependencies in the format proposed by https://peps.python.org/pep-0725 build-requires = [ diff --git a/pkgs/sagemath-objects/pyproject.toml.m4 b/pkgs/sagemath-objects/pyproject.toml.m4 index 68cfbafe935..07683a53d42 100644 --- a/pkgs/sagemath-objects/pyproject.toml.m4 +++ b/pkgs/sagemath-objects/pyproject.toml.m4 @@ -3,7 +3,6 @@ include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*- # Minimum requirements for the build system to execute. requires = [ SPKG_INSTALL_REQUIRES_setuptools - SPKG_INSTALL_REQUIRES_wheel SPKG_INSTALL_REQUIRES_sage_setup SPKG_INSTALL_REQUIRES_sagemath_environment SPKG_INSTALL_REQUIRES_cython @@ -40,6 +39,7 @@ version = {file = ["VERSION.txt"]} [tool.setuptools.package-data] "sage.cpython" = [ + "pycore_long.h", "pyx_visit.h", "string_impl.h", "cython_metaclass.h", diff --git a/pkgs/sagemath-repl/pyproject.toml.m4 b/pkgs/sagemath-repl/pyproject.toml.m4 index 459a599f1fb..ed4ca23eef2 100644 --- a/pkgs/sagemath-repl/pyproject.toml.m4 +++ b/pkgs/sagemath-repl/pyproject.toml.m4 @@ -3,7 +3,6 @@ include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*- # Minimum requirements for the build system to execute. requires = [ SPKG_INSTALL_REQUIRES_setuptools - SPKG_INSTALL_REQUIRES_wheel ] build-backend = "setuptools.build_meta" @@ -39,6 +38,14 @@ py-modules = [ "sage.misc.sagedoc", "sage.misc.sage_input", "sage.misc.sage_eval", + "sage.misc.explain_pickle", + "sage.misc.trace", + "sage.misc.profiler", + "sage.misc.dev_tools", + "sage.misc.edit_module", + "sage.misc.pager", + "sage.misc.cython", + "sage.misc.inline_fortran", ] packages = [ "sage.doctest", @@ -46,6 +53,7 @@ packages = [ "sage.repl.display", "sage.repl.ipython_kernel", "sage.repl.rich_output", + "sage.tests", ] script-files = [ # Other scripts that should be in the path also for OS packaging of sage: From b4919e85730d5edaea90af4af0b452609d15ddab Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 May 2024 22:09:31 -0700 Subject: [PATCH 22/96] pkgs/sagemath-categories/MANIFEST.in.m4: exclude sage/rings/function_field/khuri_makdisi.p* --- pkgs/sagemath-categories/MANIFEST.in.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/sagemath-categories/MANIFEST.in.m4 b/pkgs/sagemath-categories/MANIFEST.in.m4 index 585640540e2..7a1826212d5 100644 --- a/pkgs/sagemath-categories/MANIFEST.in.m4 +++ b/pkgs/sagemath-categories/MANIFEST.in.m4 @@ -189,6 +189,7 @@ exclude sage/rings/function_field/differential.* # module exclude sage/rings/function_field/divisor.* # module elements exclude sage/rings/function_field/hermite_form_polynomial.* # cimports Matrix exclude sage/rings/function_field/valuation*.* # ?? +exclude sage/rings/function_field/khuri_makdisi.p* prune sage/rings/function_field/drinfeld_modules # needs ore_polynomial etc. include sage/rings/power_series_mpoly.p* From ef95af537f0d954114bc14589c008e52ae22dd99 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 21 May 2024 23:01:02 -0700 Subject: [PATCH 23/96] sage -fixdistributions --set all: Handle sagemath-brial --- src/sage/misc/package_dir.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/misc/package_dir.py b/src/sage/misc/package_dir.py index a16f144f400..6a72fe53a77 100644 --- a/src/sage/misc/package_dir.py +++ b/src/sage/misc/package_dir.py @@ -481,6 +481,7 @@ def _distribution_from_all_filename(filename): if distribution == 'all': distributions = ["sagemath-bliss", + "sagemath-brial", "sagemath-coxeter3", "sagemath-mcqd", "sagemath-meataxe", From 60ea2186d23db890f2e4170bef1cb0f4d964e933 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 10 Jun 2024 19:00:37 -0700 Subject: [PATCH 24/96] Update all__sagemath_{objects,categories,repl,environment}.py from #37900 --- src/sage/arith/all__sagemath_objects.py | 2 + src/sage/calculus/all__sagemath_categories.py | 1 + src/sage/combinat/all__sagemath_categories.py | 27 +++++++ .../matrices/all__sagemath_categories.py | 4 + .../all__sagemath_categories.py | 1 + src/sage/ext/all__sagemath_categories.py | 2 + src/sage/geometry/all__sagemath_categories.py | 0 src/sage/groups/all__sagemath_categories.py | 10 +++ src/sage/groups/all__sagemath_objects.py | 0 .../perm_gps/all__sagemath_categories.py | 0 .../partn_ref/all__sagemath_categories.py | 0 .../interfaces/all__sagemath_categories.py | 0 src/sage/misc/all__sagemath_categories.py | 77 +++++++++++++++++++ src/sage/misc/all__sagemath_repl.py | 12 +++ src/sage/modules/all__sagemath_objects.py | 0 src/sage/monoids/all__sagemath_categories.py | 0 .../numerical/all__sagemath_categories.py | 0 .../backends/all__sagemath_categories.py | 0 src/sage/rings/all__sagemath_categories.py | 26 ++++++- .../finite_rings/all__sagemath_categories.py | 8 ++ .../all__sagemath_categories.py | 1 + .../number_field/all__sagemath_categories.py | 0 .../rings/padics/all__sagemath_categories.py | 1 + .../polynomial/all__sagemath_categories.py | 21 +++++ src/sage/schemes/all__sagemath_categories.py | 4 + src/sage/symbolic/all__sagemath_categories.py | 0 26 files changed, 195 insertions(+), 2 deletions(-) create mode 100644 src/sage/calculus/all__sagemath_categories.py create mode 100644 src/sage/combinat/all__sagemath_categories.py create mode 100644 src/sage/combinat/matrices/all__sagemath_categories.py create mode 100644 src/sage/data_structures/all__sagemath_categories.py create mode 100644 src/sage/ext/all__sagemath_categories.py create mode 100644 src/sage/geometry/all__sagemath_categories.py create mode 100644 src/sage/groups/all__sagemath_categories.py create mode 100644 src/sage/groups/all__sagemath_objects.py create mode 100644 src/sage/groups/perm_gps/all__sagemath_categories.py create mode 100644 src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py create mode 100644 src/sage/interfaces/all__sagemath_categories.py create mode 100644 src/sage/misc/all__sagemath_categories.py create mode 100644 src/sage/modules/all__sagemath_objects.py create mode 100644 src/sage/monoids/all__sagemath_categories.py create mode 100644 src/sage/numerical/all__sagemath_categories.py create mode 100644 src/sage/numerical/backends/all__sagemath_categories.py create mode 100644 src/sage/rings/finite_rings/all__sagemath_categories.py create mode 100644 src/sage/rings/function_field/all__sagemath_categories.py create mode 100644 src/sage/rings/number_field/all__sagemath_categories.py create mode 100644 src/sage/rings/padics/all__sagemath_categories.py create mode 100644 src/sage/rings/polynomial/all__sagemath_categories.py create mode 100644 src/sage/schemes/all__sagemath_categories.py create mode 100644 src/sage/symbolic/all__sagemath_categories.py diff --git a/src/sage/arith/all__sagemath_objects.py b/src/sage/arith/all__sagemath_objects.py index 40da49fdd73..31d80d17daa 100644 --- a/src/sage/arith/all__sagemath_objects.py +++ b/src/sage/arith/all__sagemath_objects.py @@ -1,3 +1,5 @@ # sage_setup: distribution = sagemath-objects # The presence of this file ensures that sage_setup for sagemath-objects # considers this directory as a namespace package + +from sage.arith.power import generic_power as power diff --git a/src/sage/calculus/all__sagemath_categories.py b/src/sage/calculus/all__sagemath_categories.py new file mode 100644 index 00000000000..cf9a7fbd0b2 --- /dev/null +++ b/src/sage/calculus/all__sagemath_categories.py @@ -0,0 +1 @@ +from sage.calculus.functional import diff, derivative, expand, simplify, taylor diff --git a/src/sage/combinat/all__sagemath_categories.py b/src/sage/combinat/all__sagemath_categories.py new file mode 100644 index 00000000000..f7ef4460977 --- /dev/null +++ b/src/sage/combinat/all__sagemath_categories.py @@ -0,0 +1,27 @@ +from sage.combinat.matrices.all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +# Integer lists +from sage.combinat.integer_lists import IntegerListsLex +from sage.combinat.integer_vector import IntegerVectors + +from sage.combinat.combinat import (CombinatorialObject, + bell_number, bell_polynomial, bernoulli_polynomial, + catalan_number, euler_number, + fibonacci, fibonacci_sequence, fibonacci_xrange, + lucas_number1, lucas_number2, + number_of_tuples, number_of_unordered_tuples, + polygonal_number, stirling_number1, stirling_number2, + tuples, unordered_tuples) + +from sage.combinat.combination import Combinations +from sage.combinat.composition import Composition, Compositions +from sage.combinat.permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition +from sage.combinat.subset import Subsets, subsets, powerset, uniq +from sage.combinat.tuple import Tuples, UnorderedTuples + + +from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover + +del lazy_import diff --git a/src/sage/combinat/matrices/all__sagemath_categories.py b/src/sage/combinat/matrices/all__sagemath_categories.py new file mode 100644 index 00000000000..b168b0b1127 --- /dev/null +++ b/src/sage/combinat/matrices/all__sagemath_categories.py @@ -0,0 +1,4 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.combinat.matrices.dlxcpp', 'DLXCPP') +del lazy_import diff --git a/src/sage/data_structures/all__sagemath_categories.py b/src/sage/data_structures/all__sagemath_categories.py new file mode 100644 index 00000000000..fe98668667d --- /dev/null +++ b/src/sage/data_structures/all__sagemath_categories.py @@ -0,0 +1 @@ +from sage.data_structures.bitset import Bitset, FrozenBitset diff --git a/src/sage/ext/all__sagemath_categories.py b/src/sage/ext/all__sagemath_categories.py new file mode 100644 index 00000000000..ec13d6e405f --- /dev/null +++ b/src/sage/ext/all__sagemath_categories.py @@ -0,0 +1,2 @@ +from sage.ext.fast_callable import fast_callable +from sage.ext.fast_eval import fast_float diff --git a/src/sage/geometry/all__sagemath_categories.py b/src/sage/geometry/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/all__sagemath_categories.py b/src/sage/groups/all__sagemath_categories.py new file mode 100644 index 00000000000..cf28b7d6bff --- /dev/null +++ b/src/sage/groups/all__sagemath_categories.py @@ -0,0 +1,10 @@ +from sage.groups.all__sagemath_objects import * + +from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, + linear_relation, multiple, multiples, order_from_multiple) + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.groups', 'groups_catalog', 'groups') + +del lazy_import diff --git a/src/sage/groups/all__sagemath_objects.py b/src/sage/groups/all__sagemath_objects.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/all__sagemath_categories.py b/src/sage/groups/perm_gps/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_categories.py b/src/sage/interfaces/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/misc/all__sagemath_categories.py b/src/sage/misc/all__sagemath_categories.py new file mode 100644 index 00000000000..0806bdf7aec --- /dev/null +++ b/src/sage/misc/all__sagemath_categories.py @@ -0,0 +1,77 @@ + +from sage.misc.all__sagemath_objects import * + +from sage.misc.html import html, pretty_print_default + +from sage.misc.mathml import mathml + +from sage.misc.table import table + +from sage.misc.map_threaded import map_threaded + +from sage.misc.mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator + +from sage.misc.defaults import (set_default_variable_name, + series_precision, set_series_precision) + + +from sage.misc.functional import (additive_order, + base_ring, + base_field, + basis, + category, + charpoly, + characteristic_polynomial, + coerce, + cyclotomic_polynomial, + decomposition, + denominator, + det, + dimension, + dim, + discriminant, + disc, + eta, + fcp, + gen, + gens, + hecke_operator, + image, + integral, integrate, + integral_closure, + interval, + xinterval, + is_even, + is_odd, + kernel, + krull_dimension, + lift, + log as log_b, + minimal_polynomial, + minpoly, + multiplicative_order, + ngens, + norm, + numerator, + numerical_approx, + n, N, + objgens, + objgen, + order, + rank, + regulator, + round, + quotient, + quo, + isqrt, + squarefree_part, + sqrt, + symbolic_sum as sum, + symbolic_prod as product, + transpose) + +from sage.misc.latex import LatexExpr, latex, view + +from sage.misc.fpickle import pickle_function, unpickle_function + +from sage.misc.persist import unpickle_global diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index 9631c49d0bd..9c29d75ac03 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -1,4 +1,16 @@ # sage_setup: distribution = sagemath-repl + +from sage.misc.all__sagemath_objects import * + from sage.misc.sage_eval import sage_eval, sageobj from sage.misc.sage_input import sage_input + +from sage.misc.banner import version + +lazy_import('sage.misc.sagedoc', ['browse_sage_doc', + 'search_src', 'search_def', 'search_doc', + 'tutorial', 'reference', 'manual', 'developer', + 'constructions', 'help']) + +lazy_import('pydoc', 'help', 'python_help') diff --git a/src/sage/modules/all__sagemath_objects.py b/src/sage/modules/all__sagemath_objects.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/monoids/all__sagemath_categories.py b/src/sage/monoids/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/all__sagemath_categories.py b/src/sage/numerical/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/backends/all__sagemath_categories.py b/src/sage/numerical/backends/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index 4c0efe7b507..99a78aac8df 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -1,7 +1,29 @@ # sage_setup: distribution = sagemath-categories + +from sage.misc.lazy_import import lazy_import + # Ring base classes -from sage.rings.ring import Ring +from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, + PrincipalIdealDomain) + +lazy_import("sage.rings.ring", "DedekindDomain") + +# Ring element base classes +from sage.structure.element import (CommutativeAlgebraElement, + RingElement, CommutativeRingElement, IntegralDomainElement, + DedekindDomainElement, PrincipalIdealDomainElement, + EuclideanDomainElement, FieldElement) + # Ideals from sage.rings.ideal import Ideal - ideal = Ideal + +# To be added in #36566: + +# from sage.rings.finite_rings.all__sagemath_categories import * +# from sage.rings.function_field.all__sagemath_categories import * +# from sage.rings.number_field.all__sagemath_categories import * +# from sage.rings.padics.all__sagemath_categories import * +# from sage.rings.polynomial.all__sagemath_categories import * + +del lazy_import diff --git a/src/sage/rings/finite_rings/all__sagemath_categories.py b/src/sage/rings/finite_rings/all__sagemath_categories.py new file mode 100644 index 00000000000..a2330a07fe4 --- /dev/null +++ b/src/sage/rings/finite_rings/all__sagemath_categories.py @@ -0,0 +1,8 @@ +from sage.rings.finite_rings.finite_field_constructor import FiniteField + +GF = FiniteField + +from sage.rings.finite_rings.conway_polynomials import conway_polynomial, exists_conway_polynomial + +# Finite residue fields +from sage.rings.finite_rings.residue_field import ResidueField diff --git a/src/sage/rings/function_field/all__sagemath_categories.py b/src/sage/rings/function_field/all__sagemath_categories.py new file mode 100644 index 00000000000..1cc1f1b8b2f --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_categories.py @@ -0,0 +1 @@ +from sage.rings.function_field.constructor import FunctionField diff --git a/src/sage/rings/number_field/all__sagemath_categories.py b/src/sage/rings/number_field/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/padics/all__sagemath_categories.py b/src/sage/rings/padics/all__sagemath_categories.py new file mode 100644 index 00000000000..fec72979f02 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_categories.py @@ -0,0 +1 @@ +from sage.rings.padics.padic_generic import local_print_mode diff --git a/src/sage/rings/polynomial/all__sagemath_categories.py b/src/sage/rings/polynomial/all__sagemath_categories.py new file mode 100644 index 00000000000..2b79da92a4c --- /dev/null +++ b/src/sage/rings/polynomial/all__sagemath_categories.py @@ -0,0 +1,21 @@ +# Quotient of polynomial ring +from sage.rings.polynomial.polynomial_quotient_ring import PolynomialQuotientRing +from sage.rings.polynomial.polynomial_quotient_ring_element import PolynomialQuotientRingElement + +# Univariate Polynomial Rings +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing +from sage.rings.polynomial.polynomial_ring import polygen, polygens +from sage.rings.polynomial.polynomial_element import Polynomial + +# Multivariate Polynomial Rings +from sage.rings.polynomial.term_order import TermOrder +from sage.rings.polynomial.multi_polynomial_element import degree_lowest_rational_function + +# Infinite Polynomial Rings +from sage.rings.polynomial.infinite_polynomial_ring import InfinitePolynomialRing + +# Laurent Polynomial Rings +from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing + +# Evaluation of cyclotomic polynomials +from sage.rings.polynomial.cyclotomic import cyclotomic_value diff --git a/src/sage/schemes/all__sagemath_categories.py b/src/sage/schemes/all__sagemath_categories.py new file mode 100644 index 00000000000..02c6722874e --- /dev/null +++ b/src/sage/schemes/all__sagemath_categories.py @@ -0,0 +1,4 @@ +from sage.schemes.generic.all import * +from sage.schemes.affine.all import * +from sage.schemes.projective.all import * +from sage.schemes.product_projective.all import * diff --git a/src/sage/symbolic/all__sagemath_categories.py b/src/sage/symbolic/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d From 3cc461fd162c8535eb225cde36438151ae5c97bf Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 10 Jun 2024 19:05:37 -0700 Subject: [PATCH 25/96] Update 'all' files --- src/sage/arith/all.py | 2 + src/sage/calculus/all.py | 5 +- src/sage/combinat/all.py | 25 +---- src/sage/combinat/matrices/all.py | 6 +- src/sage/data_structures/all.py | 3 +- src/sage/data_structures/binary_search.pxd | 2 +- src/sage/groups/all.py | 9 +- src/sage/misc/all.py | 124 ++------------------- src/sage/misc/all__sagemath_objects.py | 6 + src/sage/misc/all__sagemath_repl.py | 30 +++++ src/sage/misc/search.pxd | 2 +- src/sage/rings/all.py | 86 +++----------- src/sage/rings/all__sagemath_categories.py | 75 ++++++++++++- src/sage/rings/finite_rings/all.py | 4 +- src/sage/rings/function_field/all.py | 3 +- src/sage/rings/padics/all.py | 3 +- src/sage/rings/polynomial/all.py | 26 +---- src/sage/schemes/all.py | 10 +- 18 files changed, 160 insertions(+), 261 deletions(-) diff --git a/src/sage/arith/all.py b/src/sage/arith/all.py index f1fc716071c..8fcffa6e4b9 100644 --- a/src/sage/arith/all.py +++ b/src/sage/arith/all.py @@ -1,3 +1,5 @@ +from sage.arith.all__sagemath_objects import * + from sage.misc.lazy_import import lazy_import from sage.arith.misc import (algdep, bernoulli, is_prime, is_prime_power, diff --git a/src/sage/calculus/all.py b/src/sage/calculus/all.py index fc7f54a6758..73e701dbce7 100644 --- a/src/sage/calculus/all.py +++ b/src/sage/calculus/all.py @@ -1,3 +1,4 @@ +from sage.calculus.all__sagemath_categories import * from .calculus import maxima as maxima_calculus from .calculus import (laplace, inverse_laplace, @@ -8,10 +9,6 @@ from .interpolation import spline, Spline -from .functional import (diff, derivative, - expand, - taylor, simplify) - from .functions import (wronskian, jacobian) from .ode import ode_solver, ode_system diff --git a/src/sage/combinat/all.py b/src/sage/combinat/all.py index c55f8e01c48..4c9f90fefc2 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -53,16 +53,9 @@ install_dict(__package__, {'quickref': quickref, 'tutorial': tutorial}) del quickref, tutorial -from sage.misc.lazy_import import lazy_import +from sage.combinat.all__sagemath_categories import * -from sage.combinat.combinat import (CombinatorialObject, - bell_number, bell_polynomial, bernoulli_polynomial, - catalan_number, euler_number, - fibonacci, fibonacci_sequence, fibonacci_xrange, - lucas_number1, lucas_number2, - number_of_tuples, number_of_unordered_tuples, - polygonal_number, stirling_number1, stirling_number2, - tuples, unordered_tuples) +from sage.misc.lazy_import import lazy_import from sage.combinat.expnums import expnums @@ -70,8 +63,6 @@ from sage.combinat.crystals.all import * from sage.combinat.rigged_configurations.all import * -from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover - # block designs, etc from sage.combinat.designs.all import * @@ -86,7 +77,6 @@ from sage.combinat.yang_baxter_graph import YangBaxterGraph # Permutations -from sage.combinat.permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition from sage.combinat.affine_permutation import AffinePermutationGroup lazy_import('sage.combinat.colored_permutations', ['ColoredPermutations', 'SignedPermutation', @@ -103,11 +93,7 @@ # PerfectMatchings from sage.combinat.perfect_matching import PerfectMatching, PerfectMatchings -# Integer lists -from sage.combinat.integer_lists import IntegerListsLex - # Compositions -from sage.combinat.composition import Composition, Compositions from sage.combinat.composition_signed import SignedCompositions # Partitions @@ -170,9 +156,6 @@ from sage.combinat.graph_path import GraphPaths -# Tuples -from sage.combinat.tuple import Tuples, UnorderedTuples - # Alternating sign matrices lazy_import('sage.combinat.alternating_sign_matrix', ('AlternatingSignMatrix', 'AlternatingSignMatrices', @@ -210,7 +193,6 @@ lazy_import('sage.combinat.multiset_partition_into_sets_ordered', ['OrderedMultisetPartitionIntoSets', 'OrderedMultisetPartitionsIntoSets']) -from sage.combinat.subset import Subsets, subsets, powerset, uniq from sage.combinat.necklace import Necklaces lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) lazy_import('sage.combinat.nu_dyck_word', ('NuDyckWords', 'NuDyckWord')) @@ -295,3 +277,6 @@ # Bijectionist lazy_import('sage.combinat.bijectionist', 'Bijectionist') +del lazy_import +del install_dict +del install_doc diff --git a/src/sage/combinat/matrices/all.py b/src/sage/combinat/matrices/all.py index 0f6adbb5355..92df248b91b 100644 --- a/src/sage/combinat/matrices/all.py +++ b/src/sage/combinat/matrices/all.py @@ -10,10 +10,14 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +from sage.combinat.matrices.all__sagemath_categories import * + from sage.misc.lazy_import import lazy_import lazy_import('sage.combinat.matrices.latin', ['LatinSquare', 'LatinSquare_generator']) -lazy_import('sage.combinat.matrices.dlxcpp', 'DLXCPP') lazy_import('sage.combinat.matrices.hadamard_matrix', ['hadamard_matrix', 'hadamard_matrix_www']) + +del install_doc +del lazy_import diff --git a/src/sage/data_structures/all.py b/src/sage/data_structures/all.py index eac1b4b8931..7062ccf447e 100644 --- a/src/sage/data_structures/all.py +++ b/src/sage/data_structures/all.py @@ -1,2 +1 @@ - -from sage.data_structures.bitset import Bitset, FrozenBitset +from sage.data_structures.all__sagemath_categories import * diff --git a/src/sage/data_structures/binary_search.pxd b/src/sage/data_structures/binary_search.pxd index 5eee088e8b8..afd10246a97 100644 --- a/src/sage/data_structures/binary_search.pxd +++ b/src/sage/data_structures/binary_search.pxd @@ -1,2 +1,2 @@ cdef Py_ssize_t binary_search(Py_ssize_t* v, Py_ssize_t n, Py_ssize_t x, Py_ssize_t* ins) noexcept -cdef Py_ssize_t binary_search0(Py_ssize_t* v, Py_ssize_t n, Py_ssize_t x) noexcept \ No newline at end of file +cdef Py_ssize_t binary_search0(Py_ssize_t* v, Py_ssize_t n, Py_ssize_t x) noexcept diff --git a/src/sage/groups/all.py b/src/sage/groups/all.py index 66f3a106e54..fdc3e3847f5 100644 --- a/src/sage/groups/all.py +++ b/src/sage/groups/all.py @@ -1,3 +1,5 @@ +from sage.groups.all__sagemath_categories import * + from sage.misc.lazy_import import lazy_import from sage.groups.pari_group import PariGroup @@ -7,9 +9,6 @@ from sage.groups.perm_gps.all import * -from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, - linear_relation, multiple, multiples, order_from_multiple) - lazy_import('sage.groups.class_function', 'ClassFunction') from sage.groups.additive_abelian.all import * @@ -28,10 +27,10 @@ lazy_import('sage.groups.artin', 'ArtinGroup') lazy_import('sage.groups.raag', 'RightAngledArtinGroup') -lazy_import('sage.groups', 'groups_catalog', 'groups') - lazy_import('sage.groups.semimonomial_transformations.semimonomial_transformation_group', 'SemimonomialTransformationGroup') lazy_import('sage.groups.group_exp', ['GroupExp', 'GroupExp_Class', 'GroupExpElement']) lazy_import('sage.groups.group_semidirect_product', ['GroupSemidirectProduct', 'GroupSemidirectProductElement']) + +del lazy_import diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index fa14ec98696..0705e0f7858 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -1,137 +1,29 @@ from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute -from sage.misc.lazy_import import lazy_import -from sage.misc.all__sagemath_objects import * +# from sage.misc.all__sagemath_objects import * from sage.misc.all__sagemath_environment import * +from sage.misc.all__sagemath_categories import * from sage.misc.all__sagemath_repl import * from sage.misc.misc import (BackslashOperator, - exists, forall, is_iterator, - random_sublist, - pad_zeros, - SAGE_DB, - newton_method_sizes, compose, - nest) - -from sage.misc.banner import version - -from sage.misc.dev_tools import import_statements - -from sage.misc.html import html, pretty_print_default - -from sage.misc.table import table - -from sage.misc.sage_timeit_class import timeit - -from sage.misc.edit_module import edit - -from sage.misc.map_threaded import map_threaded - -from sage.misc.session import load_session, save_session, show_identifiers + exists, forall, is_iterator, + random_sublist, + pad_zeros, + SAGE_DB, + newton_method_sizes, compose, + nest) from sage.misc.remote_file import get_remote_file -from sage.misc.mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator - -from sage.misc.fpickle import pickle_function, unpickle_function - lazy_import('sage.misc.pager', 'pager') -lazy_import('sage.misc.sagedoc', ['browse_sage_doc', - 'search_src', 'search_def', 'search_doc', - 'tutorial', 'reference', 'manual', 'developer', - 'constructions', 'help']) -lazy_import('pydoc', 'help', 'python_help') - from sage.misc.classgraph import class_graph -from sage.misc.reset import reset, restore - from sage.misc.mathml import mathml -from sage.misc.defaults import (set_default_variable_name, - series_precision, set_series_precision) - lazy_import("sage.misc.cython", "cython_lambda") lazy_import("sage.misc.cython", "cython_compile", "cython") from sage.misc.func_persist import func_persist -from sage.misc.functional import (additive_order, - base_ring, - base_field, - basis, - category, - charpoly, - characteristic_polynomial, - coerce, - cyclotomic_polynomial, - decomposition, - denominator, - det, - dimension, - dim, - discriminant, - disc, - eta, - fcp, - gen, - gens, - hecke_operator, - image, - integral, integrate, - integral_closure, - interval, - xinterval, - is_even, - is_odd, - kernel, - krull_dimension, - lift, - log as log_b, - minimal_polynomial, - minpoly, - multiplicative_order, - ngens, - norm, - numerator, - numerical_approx, - n, N, - objgens, - objgen, - order, - rank, - regulator, - round, - quotient, - quo, - isqrt, - squarefree_part, - sqrt, - symbolic_sum as sum, - symbolic_prod as product, - transpose) - - -from sage.misc.latex import LatexExpr, latex, view - -from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate - -from sage.misc.prandom import * - -from sage.misc.timing import walltime, cputime - -from sage.misc.explain_pickle import explain_pickle, unpickle_newobj, unpickle_global, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends - -lazy_import('sage.misc.inline_fortran', 'fortran') - -lazy_import('sage.misc.banner', 'banner', deprecation=34259) -lazy_import('sage.misc.dev_tools', 'runsnake', deprecation=34259) -lazy_import('sage.misc.edit_module', 'set_edit_template', deprecation=34259) -lazy_import('sage.misc.profiler', 'Profiler', deprecation=34259) -lazy_import('sage.misc.trace', 'trace', deprecation=34259) -lazy_import('sage.misc.package', ('installed_packages', 'is_package_installed', - 'package_versions'), - deprecation=34259) -lazy_import('sage.misc.benchmark', 'benchmark', deprecation=34259) lazy_import('sage.repl.interpreter', 'logstr', deprecation=34259) diff --git a/src/sage/misc/all__sagemath_objects.py b/src/sage/misc/all__sagemath_objects.py index 634584c5567..8dda37eb313 100644 --- a/src/sage/misc/all__sagemath_objects.py +++ b/src/sage/misc/all__sagemath_objects.py @@ -35,3 +35,9 @@ from sage.misc.abstract_method import abstract_method from sage.misc.timing import walltime, cputime + +from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate +from sage.misc.prandom import * +from sage.misc.sage_timeit_class import timeit +from sage.misc.session import load_session, save_session, show_identifiers +from sage.misc.reset import reset, restore diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index 9c29d75ac03..a43e127eb22 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -8,9 +8,39 @@ from sage.misc.banner import version +lazy_import('sage.misc.banner', 'banner', deprecation=34259) + lazy_import('sage.misc.sagedoc', ['browse_sage_doc', 'search_src', 'search_def', 'search_doc', 'tutorial', 'reference', 'manual', 'developer', 'constructions', 'help']) lazy_import('pydoc', 'help', 'python_help') + +from sage.misc.explain_pickle import (explain_pickle, unpickle_newobj, unpickle_build, + unpickle_instantiate, unpickle_persistent, + unpickle_extension, unpickle_appends) + +lazy_import('sage.misc.trace', 'trace', deprecation=34259) + +lazy_import('sage.misc.profiler', 'Profiler', deprecation=34259) + +from sage.misc.dev_tools import import_statements + +lazy_import('sage.misc.dev_tools', 'runsnake', deprecation=34259) + +from sage.misc.edit_module import edit + +lazy_import('sage.misc.edit_module', 'set_edit_template', deprecation=34259) + +lazy_import('sage.misc.pager', 'pager') + + +lazy_import("sage.misc.cython", "cython_lambda") +lazy_import("sage.misc.cython", "cython_compile", "cython") +lazy_import('sage.misc.inline_fortran', 'fortran') + +lazy_import('sage.misc.package', ('installed_packages', 'is_package_installed', + 'package_versions'), + deprecation=34259) +lazy_import('sage.misc.benchmark', 'benchmark', deprecation=34259) diff --git a/src/sage/misc/search.pxd b/src/sage/misc/search.pxd index 8cc43ba1b0f..f73e9061b8d 100644 --- a/src/sage/misc/search.pxd +++ b/src/sage/misc/search.pxd @@ -1 +1 @@ -cpdef search(object v, object x) \ No newline at end of file +cpdef search(object v, object x) diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index e3c7167fe12..d1cbc6d57ab 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -14,48 +14,9 @@ from sage.rings.all__sagemath_categories import * -# Ring base classes -from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, - PrincipalIdealDomain) - -lazy_import("sage.rings.ring", "DedekindDomain") - -# Ring element base classes -from sage.structure.element import (CommutativeAlgebraElement, - RingElement, CommutativeRingElement, IntegralDomainElement, - DedekindDomainElement, PrincipalIdealDomainElement, - EuclideanDomainElement, FieldElement) - -# Ideals -from sage.rings.ideal import Ideal -ideal = Ideal - -# Quotient -from sage.rings.quotient_ring import QuotientRing - -# Infinities -from sage.rings.infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing - -# Rational integers. -from sage.rings.integer_ring import IntegerRing, ZZ, crt_basis -from sage.rings.integer import Integer - -# Rational numbers -from sage.rings.rational_field import RationalField, QQ -from sage.rings.rational import Rational -Rationals = RationalField - -# Integers modulo n. -from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod -from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod -Integers = IntegerModRing - # Finite fields from sage.rings.finite_rings.all import * -# Number field -from sage.rings.number_field.all import * - # Function field from sage.rings.function_field.all import * @@ -66,6 +27,9 @@ from sage.rings.padics.all import * from sage.rings.padics.padic_printing import _printer_defaults as padic_printing +# Pseudo-ring of PARI objects. +from sage.rings.pari_ring import PariRing, Pari + # valuations from sage.rings.valuation.all import * @@ -74,12 +38,20 @@ # Real numbers from sage.rings.real_mpfr import (RealField, RR, - create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. + create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. + +# Lazy Laurent series ring +lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing', + 'LazySymmetricFunctions', 'LazyDirichletSeriesRing']) + +# Tate algebras +from sage.rings.tate_algebra import TateAlgebra + Reals = RealField -from sage.rings.real_double import RealDoubleField, RDF, RealDoubleElement +# Number field +from sage.rings.number_field.all import * -from sage.rings.real_lazy import RealLazyField, RLF, ComplexLazyField, CLF from sage.rings.real_arb import RealBallField, RBF @@ -115,35 +87,6 @@ lazy_import("sage.rings.imaginary_unit", "I") -# Power series rings -from sage.rings.power_series_ring import PowerSeriesRing - -# Laurent series ring in one variable -from sage.rings.laurent_series_ring import LaurentSeriesRing - -# Lazy Laurent series ring -lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing', - 'LazySymmetricFunctions', 'LazyDirichletSeriesRing']) - -# Tate algebras -from sage.rings.tate_algebra import TateAlgebra - -# Puiseux series ring -from sage.rings.puiseux_series_ring import PuiseuxSeriesRing - -# Pseudo-ring of PARI objects. -from sage.rings.pari_ring import PariRing, Pari - -# Big-oh notation -from sage.rings.big_oh import O - -# Fraction field -from sage.rings.fraction_field import FractionField -Frac = FractionField - -# Localization -from sage.rings.localization import Localization - # c-finite sequences from sage.rings.cfinite_sequence import CFiniteSequence, CFiniteSequences @@ -168,3 +111,4 @@ # Register classes in numbers abc from sage.rings import numbers_abc +del lazy_import diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index 99a78aac8df..85c1414a1af 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -14,16 +14,79 @@ DedekindDomainElement, PrincipalIdealDomainElement, EuclideanDomainElement, FieldElement) +# Integers modulo n. +from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod +from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod +Integers = IntegerModRing + +# Quotient +from sage.rings.quotient_ring import QuotientRing + +# Infinities +from sage.rings.infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing +oo = infinity + +# Rational integers. +from sage.rings.integer_ring import IntegerRing, ZZ, crt_basis +from sage.rings.integer import Integer + +# Rational numbers +from sage.rings.rational import Rational +from sage.rings.rational_field import RationalField, QQ +Rationals = RationalField + +# Integers modulo n. +from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod +from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod +Integers = IntegerModRing + +# Function field +from sage.rings.function_field.all__sagemath_categories import * + +# Double precision floating point numbers +from sage.rings.real_double import RealDoubleField, RDF, RealDoubleElement + +# Lazy reals +from sage.rings.real_lazy import RealLazyField, RLF, ComplexLazyField, CLF + # Ideals from sage.rings.ideal import Ideal ideal = Ideal -# To be added in #36566: +# Semirings +from sage.rings.semirings.all import * + +from sage.rings.finite_rings.all__sagemath_categories import * +from sage.rings.function_field.all__sagemath_categories import * +from sage.rings.number_field.all__sagemath_categories import * +from sage.rings.padics.all__sagemath_categories import * +from sage.rings.polynomial.all__sagemath_categories import * + +# Power series rings +from sage.rings.power_series_ring import PowerSeriesRing + +# Laurent series ring in one variable +from sage.rings.laurent_series_ring import LaurentSeriesRing + +# Puiseux series ring +from sage.rings.puiseux_series_ring import PuiseuxSeriesRing + +# Big-oh notation +from sage.rings.big_oh import O + +# Fraction field +from sage.rings.fraction_field import FractionField +Frac = FractionField + +# Localization +from sage.rings.localization import Localization + +# continued fractions +from sage.rings.continued_fraction import (continued_fraction, + continued_fraction_list) -# from sage.rings.finite_rings.all__sagemath_categories import * -# from sage.rings.function_field.all__sagemath_categories import * -# from sage.rings.number_field.all__sagemath_categories import * -# from sage.rings.padics.all__sagemath_categories import * -# from sage.rings.polynomial.all__sagemath_categories import * +# Preliminary version of real numbers for doctesting without sage.rings.real_mpfr. +# sage.rings.all redefines it. +RealNumber = RR = RDF # used by the preparser to wrap real literals del lazy_import diff --git a/src/sage/rings/finite_rings/all.py b/src/sage/rings/finite_rings/all.py index 6d8699c7b25..a3dbfe5764f 100644 --- a/src/sage/rings/finite_rings/all.py +++ b/src/sage/rings/finite_rings/all.py @@ -18,6 +18,4 @@ # https://www.gnu.org/licenses/ # ***************************************************************************** -from sage.rings.finite_rings.finite_field_constructor import FiniteField -from sage.rings.finite_rings.conway_polynomials import conway_polynomial, exists_conway_polynomial -GF = FiniteField +from sage.rings.finite_rings.all__sagemath_categories import * diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index b423a0d58f5..1d6db9e4516 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1,5 +1,6 @@ -from sage.rings.function_field.constructor import FunctionField +from sage.rings.function_field.all__sagemath_categories import * from sage.misc.lazy_import import lazy_import lazy_import("sage.rings.function_field.drinfeld_modules.drinfeld_module", "DrinfeldModule") +del lazy_import diff --git a/src/sage/rings/padics/all.py b/src/sage/rings/padics/all.py index 7ece4e00493..297cba75a4e 100644 --- a/src/sage/rings/padics/all.py +++ b/src/sage/rings/padics/all.py @@ -1,6 +1,7 @@ +from sage.rings.padics.all__sagemath_categories import * + from sage.rings.padics.factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZpFP, ZpLC, ZpLF, ZqCR, ZqCA, ZqFM, ZqFP, ZpER from sage.rings.padics.factory import Qp, Qq, Qp as pAdicField, QpCR, QpFP, QpLC, QpLF, QqCR, QqFP, QpER from sage.rings.padics.factory import pAdicExtension -from sage.rings.padics.padic_generic import local_print_mode from sage.rings.padics.pow_computer import PowComputer from sage.rings.padics.pow_computer_ext import PowComputer_ext_maker diff --git a/src/sage/rings/polynomial/all.py b/src/sage/rings/polynomial/all.py index 853f422bdc7..28832a0da57 100644 --- a/src/sage/rings/polynomial/all.py +++ b/src/sage/rings/polynomial/all.py @@ -18,18 +18,7 @@ from sage.misc.lazy_import import lazy_import -# Quotient of polynomial ring -from sage.rings.polynomial.polynomial_quotient_ring import PolynomialQuotientRing -from sage.rings.polynomial.polynomial_quotient_ring_element import PolynomialQuotientRingElement - -# Univariate Polynomial Rings -from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.rings.polynomial.polynomial_ring import polygen, polygens -from sage.rings.polynomial.polynomial_element import Polynomial - -# Multivariate Polynomial Rings -from sage.rings.polynomial.term_order import TermOrder -from sage.rings.polynomial.multi_polynomial_element import degree_lowest_rational_function +from sage.rings.polynomial.all__sagemath_categories import * # Generic convolution from sage.rings.polynomial.convolution import convolution @@ -38,19 +27,14 @@ from sage.rings.polynomial.polynomial_ring_constructor import BooleanPolynomialRing_constructor as BooleanPolynomialRing # Laurent Polynomial Rings -from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing lazy_import('sage.rings.polynomial.omega', 'MacMahonOmega') -# Infinite Polynomial Rings -from sage.rings.polynomial.infinite_polynomial_ring import InfinitePolynomialRing +# Integer-valued Univariate Polynomial Ring +lazy_import('sage.rings.polynomial.integer_valued_polynomials', + 'IntegerValuedPolynomialRing') # Ore Polynomial Rings lazy_import('sage.rings.polynomial.ore_polynomial_ring', 'OrePolynomialRing') SkewPolynomialRing = OrePolynomialRing -# Evaluation of cyclotomic polynomials -from sage.rings.polynomial.cyclotomic import cyclotomic_value - -# Integer-valued Univariate Polynomial Ring -lazy_import('sage.rings.polynomial.integer_valued_polynomials', - 'IntegerValuedPolynomialRing') +del lazy_import diff --git a/src/sage/schemes/all.py b/src/sage/schemes/all.py index f5126a0dee1..b6f24bb287e 100644 --- a/src/sage/schemes/all.py +++ b/src/sage/schemes/all.py @@ -20,6 +20,8 @@ # https://www.gnu.org/licenses/ # ***************************************************************************** +from sage.schemes.all__sagemath_categories import * + from sage.schemes.jacobians.all import * from sage.schemes.hyperelliptic_curves.all import * @@ -32,16 +34,8 @@ from sage.schemes.plane_quartics.all import * -from sage.schemes.generic.all import * - from sage.schemes.toric.all import * -from sage.schemes.affine.all import * - -from sage.schemes.projective.all import * - -from sage.schemes.product_projective.all import * - from sage.schemes.cyclic_covers.all import * from sage.schemes.berkovich.all import * From 415fd5b178479fc498ab17962e1f968705bef1b3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 13 May 2023 21:28:05 -0700 Subject: [PATCH 26/96] src/sage/misc/dev_tools.py (find_objects_from_name): Ignore objects from all__sagemath* --- src/sage/misc/dev_tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/misc/dev_tools.py b/src/sage/misc/dev_tools.py index da0a996424b..d1b423f6049 100644 --- a/src/sage/misc/dev_tools.py +++ b/src/sage/misc/dev_tools.py @@ -278,6 +278,8 @@ def find_objects_from_name(name, module_name=None, include_lazy_imports=False): for smodule_name, smodule in sys.modules.items(): if module_name and not smodule_name.startswith(module_name): continue + if smodule_name.rpartition('.')[2].startswith('all__sagemath_'): + continue if hasattr(smodule, '__dict__') and name in smodule.__dict__: u = smodule.__dict__[name] if (not isinstance(u, LazyImport) or include_lazy_imports) and all(v is not u for v in obj): From 1a416ab13cdefe1189140f84d94d2d6b257785d8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 22 May 2024 20:39:11 -0700 Subject: [PATCH 27/96] src/sage/rings/rational.pyx: Update from #35095 --- src/sage/rings/rational.pyx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx index 819a85dbc35..264a2cd348f 100644 --- a/src/sage/rings/rational.pyx +++ b/src/sage/rings/rational.pyx @@ -599,7 +599,7 @@ cdef class Rational(sage.structure.element.FieldElement): elif isinstance(x, integer.Integer): set_from_Integer(self, x) - elif isinstance(x, sage.rings.real_mpfr.RealNumber): + elif isinstance(x, RealNumber_classes): if x == 0: mpq_set_si(self.value, 0, 1) @@ -674,15 +674,24 @@ cdef class Rational(sage.structure.element.FieldElement): temp_rational = x.rational_reconstruction() mpq_set(self.value, temp_rational.value) - elif isinstance(x, (float, sage.rings.real_double.RealDoubleElement)): - self.__set_value(sage.rings.real_mpfr.RealNumber(sage.rings.real_mpfr.RR, x), base) + elif isinstance(x, RealDouble_classes): + try: + from sage.rings.real_mpfr import RR, RealNumber + except ImportError: + if base: + raise + from fractions import Fraction + self.__set_value(Fraction.from_float(float(x)), 0) + else: + self.__set_value(RealNumber(RR, x), base) elif is_numpy_type(type(x)): import numpy if isinstance(x, numpy.integer): self.__set_value(integer.Integer(x), base) elif isinstance(x, numpy.floating): - self.__set_value(sage.rings.real_mpfr.RR(x), base) + from sage.rings.real_mpfr import RR + self.__set_value(RR(x), base) else: raise TypeError("unable to convert {!r} to a rational".format(x)) From 6c46b0d6dd78c215b5a414ad747eabd9c4822f08 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 1 Jun 2024 23:57:49 -0700 Subject: [PATCH 28/96] src/sage/rings/rational.pyx: Revert --- src/sage/rings/rational.pyx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx index 264a2cd348f..819a85dbc35 100644 --- a/src/sage/rings/rational.pyx +++ b/src/sage/rings/rational.pyx @@ -599,7 +599,7 @@ cdef class Rational(sage.structure.element.FieldElement): elif isinstance(x, integer.Integer): set_from_Integer(self, x) - elif isinstance(x, RealNumber_classes): + elif isinstance(x, sage.rings.real_mpfr.RealNumber): if x == 0: mpq_set_si(self.value, 0, 1) @@ -674,24 +674,15 @@ cdef class Rational(sage.structure.element.FieldElement): temp_rational = x.rational_reconstruction() mpq_set(self.value, temp_rational.value) - elif isinstance(x, RealDouble_classes): - try: - from sage.rings.real_mpfr import RR, RealNumber - except ImportError: - if base: - raise - from fractions import Fraction - self.__set_value(Fraction.from_float(float(x)), 0) - else: - self.__set_value(RealNumber(RR, x), base) + elif isinstance(x, (float, sage.rings.real_double.RealDoubleElement)): + self.__set_value(sage.rings.real_mpfr.RealNumber(sage.rings.real_mpfr.RR, x), base) elif is_numpy_type(type(x)): import numpy if isinstance(x, numpy.integer): self.__set_value(integer.Integer(x), base) elif isinstance(x, numpy.floating): - from sage.rings.real_mpfr import RR - self.__set_value(RR(x), base) + self.__set_value(sage.rings.real_mpfr.RR(x), base) else: raise TypeError("unable to convert {!r} to a rational".format(x)) From 94fe9d34f1e0ae25686d4d0a298bc748fa91d33d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 2 Jun 2024 20:43:34 -0700 Subject: [PATCH 29/96] src/sage/schemes/elliptic_curves/ell_curve_isogeny.py: Fix # needs --- src/sage/schemes/elliptic_curves/ell_curve_isogeny.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py index bce46802b9c..bd2922eeb0c 100644 --- a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py +++ b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py @@ -3719,6 +3719,8 @@ def compute_intermediate_curves(E1, E2): EXAMPLES:: sage: from sage.schemes.elliptic_curves.ell_curve_isogeny import compute_intermediate_curves + + sage: # needs sage.rings.finite_rings sage: E = EllipticCurve(GF(83), [1,0,1,1,0]) sage: R. = GF(83)[]; f = x + 24 sage: phi = EllipticCurveIsogeny(E, f) From 93f3dd668214c7e6ce328c4b00121b50f6af07b8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 2 Jun 2024 21:08:19 -0700 Subject: [PATCH 30/96] src/sage/schemes/elliptic_curves/ell_curve_isogeny.py: Remove unnecessary # needs --- src/sage/schemes/elliptic_curves/ell_curve_isogeny.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py index bd2922eeb0c..b2a244998cd 100644 --- a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py +++ b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py @@ -3720,7 +3720,6 @@ def compute_intermediate_curves(E1, E2): sage: from sage.schemes.elliptic_curves.ell_curve_isogeny import compute_intermediate_curves - sage: # needs sage.rings.finite_rings sage: E = EllipticCurve(GF(83), [1,0,1,1,0]) sage: R. = GF(83)[]; f = x + 24 sage: phi = EllipticCurveIsogeny(E, f) From 1319ec789d3f70b478162065a210ec58056f5b66 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 3 Jun 2024 09:59:27 -0700 Subject: [PATCH 31/96] src/sage/schemes/elliptic_curves/ell_curve_isogeny.py: Revert add of blank line in doctest --- src/sage/schemes/elliptic_curves/ell_curve_isogeny.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py index b2a244998cd..bce46802b9c 100644 --- a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py +++ b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py @@ -3719,7 +3719,6 @@ def compute_intermediate_curves(E1, E2): EXAMPLES:: sage: from sage.schemes.elliptic_curves.ell_curve_isogeny import compute_intermediate_curves - sage: E = EllipticCurve(GF(83), [1,0,1,1,0]) sage: R. = GF(83)[]; f = x + 24 sage: phi = EllipticCurveIsogeny(E, f) From 35d0c715b0355fb7543aa19869e02e963be8694f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 13:00:53 -0700 Subject: [PATCH 32/96] Revert "src/sage/rings/rational.pyx: Revert" This reverts commit 729193f2996c8a2c86c3140af5ffca20a4ed53ff. --- src/sage/rings/rational.pyx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx index 819a85dbc35..264a2cd348f 100644 --- a/src/sage/rings/rational.pyx +++ b/src/sage/rings/rational.pyx @@ -599,7 +599,7 @@ cdef class Rational(sage.structure.element.FieldElement): elif isinstance(x, integer.Integer): set_from_Integer(self, x) - elif isinstance(x, sage.rings.real_mpfr.RealNumber): + elif isinstance(x, RealNumber_classes): if x == 0: mpq_set_si(self.value, 0, 1) @@ -674,15 +674,24 @@ cdef class Rational(sage.structure.element.FieldElement): temp_rational = x.rational_reconstruction() mpq_set(self.value, temp_rational.value) - elif isinstance(x, (float, sage.rings.real_double.RealDoubleElement)): - self.__set_value(sage.rings.real_mpfr.RealNumber(sage.rings.real_mpfr.RR, x), base) + elif isinstance(x, RealDouble_classes): + try: + from sage.rings.real_mpfr import RR, RealNumber + except ImportError: + if base: + raise + from fractions import Fraction + self.__set_value(Fraction.from_float(float(x)), 0) + else: + self.__set_value(RealNumber(RR, x), base) elif is_numpy_type(type(x)): import numpy if isinstance(x, numpy.integer): self.__set_value(integer.Integer(x), base) elif isinstance(x, numpy.floating): - self.__set_value(sage.rings.real_mpfr.RR(x), base) + from sage.rings.real_mpfr import RR + self.__set_value(RR(x), base) else: raise TypeError("unable to convert {!r} to a rational".format(x)) From 77e663766ba9a711b3e08d890afdaaec5adce4b6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 13:05:04 -0700 Subject: [PATCH 33/96] src/sage/rings/rational.pyx: Do not use RealDouble_classes for now --- src/sage/rings/rational.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx index 264a2cd348f..6f71fb82bbe 100644 --- a/src/sage/rings/rational.pyx +++ b/src/sage/rings/rational.pyx @@ -674,7 +674,7 @@ cdef class Rational(sage.structure.element.FieldElement): temp_rational = x.rational_reconstruction() mpq_set(self.value, temp_rational.value) - elif isinstance(x, RealDouble_classes): + elif isinstance(x, (float, sage.rings.real_double.RealDoubleElement)): try: from sage.rings.real_mpfr import RR, RealNumber except ImportError: From 69c5c8a8b4eec4a67f2f43bc8a46a10270f33944 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 13:15:11 -0700 Subject: [PATCH 34/96] ./sage -fixdoctests --distribution sagemath-categories --update-known-test-failures --- .../known-test-failures.json | 1266 +++++++++++++---- 1 file changed, 1004 insertions(+), 262 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index 80705635b7e..a5896c6f57a 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -1,81 +1,86 @@ { + "sage.arith.functions": { + "failed": true, + "ntests": 42 + }, + "sage.arith.misc": { + "failed": true, + "ntests": 903 + }, "sage.arith.numerical_approx": { "ntests": 1 }, "sage.arith.power": { - "failed": true, "ntests": 16 }, - "sage.categories.action": { + "sage.arith.rational_reconstruction": { + "ntests": 1 + }, + "sage.arith.srange": { "failed": true, + "ntests": 77 + }, + "sage.calculus.functional": { + "ntests": 2 + }, + "sage.categories.action": { "ntests": 78 }, "sage.categories.additive_groups": { "ntests": 9 }, "sage.categories.additive_magmas": { - "failed": true, "ntests": 134 }, "sage.categories.additive_monoids": { - "failed": true, "ntests": 16 }, "sage.categories.additive_semigroups": { - "failed": true, "ntests": 28 }, "sage.categories.affine_weyl_groups": { "ntests": 15 }, + "sage.categories.algebra_functor": { + "ntests": 7 + }, "sage.categories.algebra_ideals": { - "failed": true, "ntests": 8 }, "sage.categories.algebra_modules": { - "failed": true, "ntests": 9 }, "sage.categories.algebras": { - "failed": true, "ntests": 25 }, "sage.categories.algebras_with_basis": { - "failed": true, - "ntests": 46 + "ntests": 16 }, "sage.categories.aperiodic_semigroups": { "ntests": 1 }, "sage.categories.associative_algebras": { - "failed": true, "ntests": 5 }, "sage.categories.bialgebras": { - "ntests": 3 + "ntests": 4 }, "sage.categories.bialgebras_with_basis": { - "failed": true, - "ntests": 31 + "ntests": 24 }, "sage.categories.bimodules": { - "failed": true, "ntests": 15 }, "sage.categories.cartesian_product": { - "failed": true, "ntests": 42 }, "sage.categories.category": { - "failed": true, "ntests": 433 }, "sage.categories.category_cy_helper": { - "failed": true, "ntests": 27 }, "sage.categories.category_singleton": { - "failed": true, "ntests": 59 }, "sage.categories.category_types": { @@ -87,57 +92,48 @@ "ntests": 328 }, "sage.categories.chain_complexes": { - "failed": true, "ntests": 20 }, "sage.categories.coalgebras": { - "ntests": 6 + "ntests": 1 }, "sage.categories.coalgebras_with_basis": { - "failed": true, - "ntests": 23 + "ntests": 20 }, "sage.categories.coercion_methods": { - "failed": true, "ntests": 6 }, "sage.categories.commutative_additive_groups": { - "failed": true, "ntests": 17 }, "sage.categories.commutative_additive_monoids": { "ntests": 5 }, "sage.categories.commutative_additive_semigroups": { - "failed": true, "ntests": 6 }, "sage.categories.commutative_algebra_ideals": { - "failed": true, "ntests": 9 }, "sage.categories.commutative_algebras": { - "failed": true, "ntests": 11 }, "sage.categories.commutative_ring_ideals": { - "failed": true, "ntests": 7 }, "sage.categories.commutative_rings": { "failed": true, - "ntests": 41 + "ntests": 80 }, "sage.categories.complete_discrete_valuation": { "failed": true, "ntests": 30 }, "sage.categories.complex_reflection_groups": { - "failed": true, "ntests": 16 }, "sage.categories.complex_reflection_or_generalized_coxeter_groups": { - "ntests": 67 + "ntests": 47 }, "sage.categories.covariant_functorial_construction": { "failed": true, @@ -150,12 +146,13 @@ "failed": true, "ntests": 392 }, + "sage.categories.crystals": { + "ntests": 1 + }, "sage.categories.cw_complexes": { - "failed": true, "ntests": 36 }, "sage.categories.dedekind_domains": { - "failed": true, "ntests": 30 }, "sage.categories.discrete_valuation": { @@ -163,18 +160,15 @@ "ntests": 28 }, "sage.categories.distributive_magmas_and_additive_magmas": { - "failed": true, "ntests": 13 }, "sage.categories.division_rings": { "ntests": 11 }, "sage.categories.domains": { - "failed": true, "ntests": 7 }, "sage.categories.dual": { - "failed": true, "ntests": 1 }, "sage.categories.enumerated_sets": { @@ -182,26 +176,21 @@ "ntests": 132 }, "sage.categories.euclidean_domains": { - "failed": true, "ntests": 22 }, "sage.categories.examples.algebras_with_basis": { "ntests": 8 }, "sage.categories.examples.commutative_additive_monoids": { - "failed": true, "ntests": 14 }, "sage.categories.examples.commutative_additive_semigroups": { - "failed": true, "ntests": 28 }, "sage.categories.examples.cw_complexes": { - "failed": true, "ntests": 33 }, "sage.categories.examples.facade_sets": { - "failed": true, "ntests": 21 }, "sage.categories.examples.filtered_algebras_with_basis": { @@ -215,57 +204,45 @@ "ntests": 1 }, "sage.categories.examples.finite_enumerated_sets": { - "failed": true, "ntests": 29 }, "sage.categories.examples.finite_monoids": { - "failed": true, "ntests": 15 }, "sage.categories.examples.finite_semigroups": { - "failed": true, "ntests": 27 }, "sage.categories.examples.finite_weyl_groups": { - "failed": true, "ntests": 25 }, "sage.categories.examples.graded_modules_with_basis": { "ntests": 14 }, "sage.categories.examples.graphs": { - "failed": true, "ntests": 24 }, "sage.categories.examples.infinite_enumerated_sets": { - "failed": true, "ntests": 35 }, "sage.categories.examples.lie_algebras": { "ntests": 25 }, "sage.categories.examples.magmas": { - "failed": true, "ntests": 20 }, "sage.categories.examples.manifolds": { - "failed": true, "ntests": 15 }, "sage.categories.examples.monoids": { - "failed": true, "ntests": 16 }, "sage.categories.examples.posets": { - "failed": true, "ntests": 29 }, "sage.categories.examples.semigroups": { - "failed": true, "ntests": 83 }, "sage.categories.examples.semigroups_cython": { - "failed": true, "ntests": 47 }, "sage.categories.examples.sets_with_grading": { @@ -273,7 +250,6 @@ "ntests": 14 }, "sage.categories.facade_sets": { - "failed": true, "ntests": 27 }, "sage.categories.fields": { @@ -289,11 +265,9 @@ "ntests": 39 }, "sage.categories.filtered_hopf_algebras_with_basis": { - "failed": true, "ntests": 12 }, "sage.categories.filtered_modules": { - "failed": true, "ntests": 18 }, "sage.categories.filtered_modules_with_basis": { @@ -301,76 +275,65 @@ "ntests": 74 }, "sage.categories.finite_complex_reflection_groups": { - "failed": true, - "ntests": 189 + "ntests": 172 }, "sage.categories.finite_coxeter_groups": { "ntests": 6 }, "sage.categories.finite_dimensional_algebras_with_basis": { - "failed": true, - "ntests": 91 + "ntests": 82 }, "sage.categories.finite_dimensional_bialgebras_with_basis": { - "failed": true, "ntests": 4 }, "sage.categories.finite_dimensional_coalgebras_with_basis": { - "failed": true, "ntests": 4 }, "sage.categories.finite_dimensional_graded_lie_algebras_with_basis": { - "failed": true, "ntests": 22 }, "sage.categories.finite_dimensional_hopf_algebras_with_basis": { - "failed": true, "ntests": 3 }, "sage.categories.finite_dimensional_lie_algebras_with_basis": { "failed": true, - "ntests": 73 + "ntests": 107 }, "sage.categories.finite_dimensional_modules_with_basis": { "failed": true, - "ntests": 89 + "ntests": 94 }, "sage.categories.finite_dimensional_nilpotent_lie_algebras_with_basis": { - "failed": true, "ntests": 19 }, "sage.categories.finite_dimensional_semisimple_algebras_with_basis": { - "failed": true, - "ntests": 12 + "ntests": 11 }, "sage.categories.finite_enumerated_sets": { - "failed": true, "ntests": 123 }, "sage.categories.finite_fields": { - "failed": true, "ntests": 14 }, "sage.categories.finite_lattice_posets": { "ntests": 31 }, "sage.categories.finite_monoids": { - "failed": true, "ntests": 28 }, "sage.categories.finite_permutation_groups": { - "ntests": 2 + "ntests": 12 + }, + "sage.categories.finite_posets": { + "ntests": 19 }, "sage.categories.finite_semigroups": { - "failed": true, "ntests": 14 }, "sage.categories.finite_sets": { - "failed": true, "ntests": 14 }, "sage.categories.finite_weyl_groups": { - "failed": true, "ntests": 6 }, "sage.categories.finitely_generated_lambda_bracket_algebras": { @@ -380,15 +343,12 @@ "ntests": 10 }, "sage.categories.finitely_generated_magmas": { - "failed": true, "ntests": 6 }, "sage.categories.finitely_generated_semigroups": { - "failed": true, "ntests": 27 }, "sage.categories.function_fields": { - "failed": true, "ntests": 11 }, "sage.categories.functor": { @@ -405,63 +365,48 @@ "ntests": 12 }, "sage.categories.graded_algebras": { - "failed": true, "ntests": 8 }, "sage.categories.graded_algebras_with_basis": { - "failed": true, "ntests": 8 }, "sage.categories.graded_bialgebras": { - "failed": true, "ntests": 3 }, "sage.categories.graded_bialgebras_with_basis": { - "failed": true, "ntests": 3 }, "sage.categories.graded_coalgebras": { - "failed": true, "ntests": 6 }, "sage.categories.graded_coalgebras_with_basis": { - "failed": true, "ntests": 6 }, "sage.categories.graded_hopf_algebras": { - "failed": true, "ntests": 3 }, "sage.categories.graded_hopf_algebras_with_basis": { - "failed": true, "ntests": 12 }, "sage.categories.graded_lie_algebras": { - "failed": true, "ntests": 12 }, "sage.categories.graded_lie_algebras_with_basis": { - "failed": true, "ntests": 5 }, "sage.categories.graded_lie_conformal_algebras": { - "failed": true, "ntests": 5 }, "sage.categories.graded_modules": { - "failed": true, "ntests": 16 }, "sage.categories.graded_modules_with_basis": { - "failed": true, "ntests": 25 }, "sage.categories.graphs": { - "failed": true, "ntests": 25 }, "sage.categories.group_algebras": { - "failed": true, "ntests": 27 }, "sage.categories.groups": { @@ -471,7 +416,6 @@ "ntests": 4 }, "sage.categories.hecke_modules": { - "failed": true, "ntests": 16 }, "sage.categories.homset": { @@ -479,24 +423,19 @@ "ntests": 197 }, "sage.categories.homsets": { - "failed": true, "ntests": 56 }, "sage.categories.hopf_algebras": { - "failed": true, "ntests": 15 }, "sage.categories.hopf_algebras_with_basis": { - "failed": true, "ntests": 30 }, "sage.categories.infinite_enumerated_sets": { - "failed": true, "ntests": 13 }, "sage.categories.integral_domains": { - "failed": true, - "ntests": 22 + "ntests": 24 }, "sage.categories.isomorphic_objects": { "ntests": 2 @@ -505,14 +444,12 @@ "ntests": 1 }, "sage.categories.kac_moody_algebras": { - "failed": true, "ntests": 9 }, "sage.categories.l_trivial_semigroups": { "ntests": 5 }, "sage.categories.lambda_bracket_algebras": { - "failed": true, "ntests": 16 }, "sage.categories.lambda_bracket_algebras_with_basis": { @@ -522,43 +459,37 @@ "ntests": 10 }, "sage.categories.left_modules": { - "failed": true, "ntests": 4 }, "sage.categories.lie_algebras": { "failed": true, - "ntests": 135 + "ntests": 120 }, "sage.categories.lie_algebras_with_basis": { "ntests": 19 }, "sage.categories.lie_conformal_algebras": { - "failed": true, "ntests": 25 }, "sage.categories.lie_conformal_algebras_with_basis": { "ntests": 17 }, "sage.categories.lie_groups": { - "failed": true, "ntests": 9 }, "sage.categories.loop_crystals": { "ntests": 1 }, "sage.categories.magmas": { - "failed": true, "ntests": 147 }, "sage.categories.magmas_and_additive_magmas": { "ntests": 21 }, "sage.categories.magmatic_algebras": { - "failed": true, "ntests": 27 }, "sage.categories.manifolds": { - "failed": true, "ntests": 52 }, "sage.categories.map": { @@ -566,19 +497,15 @@ "ntests": 353 }, "sage.categories.matrix_algebras": { - "failed": true, "ntests": 3 }, "sage.categories.metric_spaces": { - "failed": true, "ntests": 46 }, "sage.categories.modular_abelian_varieties": { - "failed": true, "ntests": 8 }, "sage.categories.modules": { - "failed": true, "ntests": 120 }, "sage.categories.modules_with_basis": { @@ -586,27 +513,21 @@ "ntests": 240 }, "sage.categories.monoid_algebras": { - "failed": true, "ntests": 4 }, "sage.categories.monoids": { - "failed": true, "ntests": 81 }, "sage.categories.morphism": { - "failed": true, "ntests": 126 }, "sage.categories.noetherian_rings": { - "failed": true, "ntests": 19 }, "sage.categories.number_fields": { - "failed": true, "ntests": 41 }, "sage.categories.objects": { - "failed": true, "ntests": 12 }, "sage.categories.partially_ordered_monoids": { @@ -619,30 +540,25 @@ "ntests": 3 }, "sage.categories.polyhedra": { - "failed": true, "ntests": 4 }, "sage.categories.poor_man_map": { - "failed": true, "ntests": 59 }, "sage.categories.posets": { "ntests": 2 }, "sage.categories.primer": { - "failed": true, - "ntests": 162 + "ntests": 161 }, "sage.categories.principal_ideal_domains": { - "failed": true, - "ntests": 11 + "ntests": 29 }, "sage.categories.pushout": { "failed": true, "ntests": 624 }, "sage.categories.quantum_group_representations": { - "failed": true, "ntests": 13 }, "sage.categories.quotient_fields": { @@ -656,20 +572,20 @@ "ntests": 3 }, "sage.categories.realizations": { - "failed": true, "ntests": 21 }, + "sage.categories.regular_crystals": { + "ntests": 3 + }, "sage.categories.right_modules": { - "failed": true, "ntests": 4 }, "sage.categories.ring_ideals": { - "failed": true, "ntests": 9 }, "sage.categories.rings": { "failed": true, - "ntests": 146 + "ntests": 164 }, "sage.categories.rngs": { "ntests": 6 @@ -679,22 +595,18 @@ "ntests": 41 }, "sage.categories.semigroups": { - "failed": true, "ntests": 112 }, "sage.categories.semirings": { "ntests": 6 }, "sage.categories.semisimple_algebras": { - "failed": true, "ntests": 15 }, "sage.categories.sets_cat": { - "failed": true, "ntests": 412 }, "sage.categories.sets_with_grading": { - "failed": true, "ntests": 23 }, "sage.categories.sets_with_partial_maps": { @@ -704,7 +616,6 @@ "ntests": 5 }, "sage.categories.signed_tensor": { - "failed": true, "ntests": 10 }, "sage.categories.simplicial_complexes": { @@ -718,7 +629,6 @@ "ntests": 2 }, "sage.categories.super_algebras": { - "failed": true, "ntests": 8 }, "sage.categories.super_algebras_with_basis": { @@ -726,56 +636,113 @@ "ntests": 10 }, "sage.categories.super_hopf_algebras_with_basis": { - "failed": true, "ntests": 10 }, "sage.categories.super_lie_conformal_algebras": { - "failed": true, "ntests": 20 }, "sage.categories.super_modules": { - "failed": true, "ntests": 18 }, "sage.categories.super_modules_with_basis": { - "failed": true, "ntests": 10 }, "sage.categories.supercommutative_algebras": { - "failed": true, "ntests": 8 }, "sage.categories.tensor": { - "failed": true, "ntests": 9 }, "sage.categories.topological_spaces": { "ntests": 27 }, "sage.categories.triangular_kac_moody_algebras": { - "failed": true, "ntests": 15 }, "sage.categories.tutorial": { - "failed": true, "ntests": 4 }, "sage.categories.unique_factorization_domains": { - "failed": true, "ntests": 39 }, "sage.categories.unital_algebras": { - "failed": true, - "ntests": 37 + "ntests": 30 }, "sage.categories.vector_spaces": { - "failed": true, "ntests": 44 }, "sage.categories.with_realizations": { - "failed": true, "ntests": 24 }, + "sage.combinat.backtrack": { + "ntests": 28 + }, + "sage.combinat.combinat": { + "failed": true, + "ntests": 236 + }, + "sage.combinat.combinat_cython": { + "ntests": 22 + }, + "sage.combinat.combination": { + "ntests": 97 + }, + "sage.combinat.combinatorial_map": { + "ntests": 75 + }, + "sage.combinat.composition": { + "failed": true, + "ntests": 282 + }, + "sage.combinat.dlx": { + "ntests": 61 + }, + "sage.combinat.integer_lists.base": { + "ntests": 116 + }, + "sage.combinat.integer_lists.invlex": { + "ntests": 304 + }, + "sage.combinat.integer_lists.lists": { + "ntests": 56 + }, + "sage.combinat.integer_lists.nn": { + "ntests": 5 + }, + "sage.combinat.integer_vector": { + "ntests": 254 + }, + "sage.combinat.matrices.dancing_links": { + "ntests": 250 + }, + "sage.combinat.matrices.dlxcpp": { + "ntests": 9 + }, + "sage.combinat.permutation": { + "failed": true, + "ntests": 1174 + }, + "sage.combinat.permutation_cython": { + "ntests": 39 + }, + "sage.combinat.ranker": { + "ntests": 48 + }, + "sage.combinat.subset": { + "ntests": 280 + }, + "sage.combinat.subsets_hereditary": { + "ntests": 7 + }, + "sage.combinat.subsets_pairwise": { + "ntests": 32 + }, + "sage.combinat.tools": { + "ntests": 2 + }, + "sage.combinat.tuple": { + "ntests": 33 + }, "sage.cpython.atexit": { "ntests": 19 }, @@ -783,15 +750,12 @@ "ntests": 4 }, "sage.cpython.debug": { - "failed": true, "ntests": 13 }, "sage.cpython.dict_del_by_value": { - "failed": true, "ntests": 21 }, "sage.cpython.getattr": { - "failed": true, "ntests": 65 }, "sage.cpython.string": { @@ -804,8 +768,19 @@ "ntests": 7 }, "sage.cpython.wrapperdescr": { - "failed": true, - "ntests": 0 + "ntests": 13 + }, + "sage.data_structures.bitset": { + "ntests": 425 + }, + "sage.data_structures.blas_dict": { + "ntests": 61 + }, + "sage.data_structures.list_of_pairs": { + "ntests": 14 + }, + "sage.data_structures.mutable_poset": { + "ntests": 441 }, "sage.doctest.control": { "failed": true, @@ -826,14 +801,12 @@ "ntests": 313 }, "sage.doctest.reporting": { - "ntests": 115 + "ntests": 126 }, "sage.doctest.sources": { - "failed": true, "ntests": 343 }, "sage.doctest.test": { - "failed": true, "ntests": 23 }, "sage.doctest.util": { @@ -844,8 +817,15 @@ "failed": true, "ntests": 41 }, + "sage.ext.fast_callable": { + "failed": true, + "ntests": 317 + }, + "sage.ext.fast_eval": { + "ntests": 4 + }, "sage.features": { - "ntests": 143 + "ntests": 148 }, "sage.features.all": { "ntests": 14 @@ -856,6 +836,9 @@ "sage.features.cddlib": { "ntests": 4 }, + "sage.features.coxeter3": { + "ntests": 4 + }, "sage.features.csdp": { "ntests": 6 }, @@ -910,7 +893,6 @@ "ntests": 4 }, "sage.features.join_feature": { - "failed": true, "ntests": 25 }, "sage.features.kenzo": { @@ -968,12 +950,14 @@ "ntests": 28 }, "sage.features.sagemath": { - "failed": true, - "ntests": 151 + "ntests": 153 }, "sage.features.singular": { "ntests": 4 }, + "sage.features.sirocco": { + "ntests": 4 + }, "sage.features.sphinx": { "ntests": 4 }, @@ -987,61 +971,215 @@ "failed": true, "ntests": 6 }, - "sage.misc.abstract_method": { - "failed": true, - "ntests": 33 + "sage.functions.airy": { + "ntests": 99 }, - "sage.misc.banner": { - "failed": true, - "ntests": 12 + "sage.functions.bessel": { + "ntests": 160 }, - "sage.misc.bindable_class": { - "ntests": 47 + "sage.functions.error": { + "ntests": 94 }, - "sage.misc.c3_controlled": { - "failed": true, - "ntests": 150 + "sage.functions.exp_integral": { + "ntests": 156 }, - "sage.misc.cachefunc": { + "sage.functions.gamma": { "failed": true, - "ntests": 692 + "ntests": 140 + }, + "sage.functions.generalized": { + "ntests": 70 + }, + "sage.functions.hyperbolic": { + "ntests": 81 + }, + "sage.functions.hypergeometric": { + "ntests": 78 + }, + "sage.functions.jacobi": { + "ntests": 38 + }, + "sage.functions.log": { + "ntests": 153 + }, + "sage.functions.min_max": { + "ntests": 21 + }, + "sage.functions.orthogonal_polys": { + "ntests": 230 + }, + "sage.functions.other": { + "failed": true, + "ntests": 238 + }, + "sage.functions.piecewise": { + "ntests": 11 + }, + "sage.functions.prime_pi": { + "ntests": 4 + }, + "sage.functions.special": { + "ntests": 119 + }, + "sage.functions.spike_function": { + "ntests": 32 + }, + "sage.functions.transcendental": { + "ntests": 55 + }, + "sage.functions.trig": { + "ntests": 126 + }, + "sage.functions.wigner": { + "ntests": 24 + }, + "sage.geometry.abc": { + "ntests": 15 + }, + "sage.groups.generic": { + "failed": true, + "ntests": 122 + }, + "sage.groups.group": { + "failed": true, + "ntests": 51 + }, + "sage.groups.old": { + "ntests": 31 + }, + "sage.groups.perm_gps.partn_ref.canonical_augmentation": { + "ntests": 1 + }, + "sage.groups.perm_gps.partn_ref.data_structures": { + "ntests": 4 + }, + "sage.groups.perm_gps.partn_ref.refinement_lists": { + "ntests": 3 + }, + "sage.groups.perm_gps.partn_ref.refinement_python": { + "ntests": 101 + }, + "sage.groups.perm_gps.partn_ref.refinement_sets": { + "ntests": 156 + }, + "sage.interfaces.abc": { + "ntests": 8 + }, + "sage.interfaces.interface": { + "ntests": 4 + }, + "sage.interfaces.process": { + "ntests": 39 + }, + "sage.interfaces.quit": { + "ntests": 16 + }, + "sage.interfaces.sage0": { + "ntests": 4 + }, + "sage.interfaces.sagespawn": { + "ntests": 34 + }, + "sage.interfaces.tab_completion": { + "ntests": 13 + }, + "sage.misc.abstract_method": { + "ntests": 33 + }, + "sage.misc.banner": { + "ntests": 12 + }, + "sage.misc.binary_tree": { + "ntests": 61 + }, + "sage.misc.bindable_class": { + "ntests": 47 + }, + "sage.misc.c3_controlled": { + "ntests": 150 + }, + "sage.misc.cachefunc": { + "ntests": 692 }, "sage.misc.call": { "ntests": 28 }, + "sage.misc.callable_dict": { + "ntests": 12 + }, "sage.misc.classcall_metaclass": { "ntests": 78 }, "sage.misc.constant_function": { "ntests": 21 }, + "sage.misc.converting_dict": { + "ntests": 53 + }, "sage.misc.decorators": { - "failed": true, "ntests": 125 }, - "sage.misc.fast_methods": { + "sage.misc.defaults": { + "ntests": 14 + }, + "sage.misc.derivative": { + "ntests": 24 + }, + "sage.misc.dev_tools": { + "failed": true, + "ntests": 61 + }, + "sage.misc.edit_module": { + "ntests": 16 + }, + "sage.misc.explain_pickle": { "failed": true, + "ntests": 400 + }, + "sage.misc.fast_methods": { "ntests": 80 }, "sage.misc.flatten": { - "failed": true, "ntests": 15 }, + "sage.misc.fpickle": { + "ntests": 13 + }, "sage.misc.function_mangling": { "ntests": 32 }, + "sage.misc.functional": { + "failed": true, + "ntests": 271 + }, + "sage.misc.html": { + "failed": true, + "ntests": 64 + }, "sage.misc.inherit_comparison": { "ntests": 2 }, + "sage.misc.inline_fortran": { + "ntests": 12 + }, "sage.misc.instancedoc": { "ntests": 67 }, - "sage.misc.lazy_attribute": { + "sage.misc.latex": { + "failed": true, + "ntests": 211 + }, + "sage.misc.latex_macros": { "failed": true, + "ntests": 11 + }, + "sage.misc.latex_standalone": { + "ntests": 210 + }, + "sage.misc.lazy_attribute": { "ntests": 100 }, "sage.misc.lazy_format": { - "failed": true, "ntests": 23 }, "sage.misc.lazy_import": { @@ -1049,46 +1187,72 @@ "ntests": 279 }, "sage.misc.lazy_import_cache": { - "failed": true, "ntests": 8 }, + "sage.misc.lazy_list": { + "ntests": 227 + }, "sage.misc.lazy_string": { - "failed": true, "ntests": 131 }, + "sage.misc.map_threaded": { + "ntests": 1 + }, + "sage.misc.method_decorator": { + "ntests": 13 + }, "sage.misc.misc": { "failed": true, - "ntests": 176 + "ntests": 162 }, "sage.misc.misc_c": { - "failed": true, "ntests": 121 }, + "sage.misc.mrange": { + "ntests": 96 + }, + "sage.misc.multireplace": { + "ntests": 4 + }, "sage.misc.namespace_package": { "ntests": 7 }, "sage.misc.nested_class": { "ntests": 67 }, + "sage.misc.object_multiplexer": { + "ntests": 15 + }, "sage.misc.package": { - "ntests": 36 + "ntests": 22 }, "sage.misc.package_dir": { + "ntests": 29 + }, + "sage.misc.parser": { "failed": true, - "ntests": 35 + "ntests": 136 }, "sage.misc.persist": { - "failed": true, "ntests": 137 }, "sage.misc.prandom": { "failed": true, "ntests": 74 }, + "sage.misc.random_testing": { + "ntests": 18 + }, "sage.misc.repr": { - "failed": true, "ntests": 31 }, + "sage.misc.reset": { + "failed": true, + "ntests": 29 + }, + "sage.misc.rest_index_of_methods": { + "ntests": 22 + }, "sage.misc.sage_eval": { "failed": true, "ntests": 31 @@ -1097,8 +1261,16 @@ "failed": true, "ntests": 732 }, + "sage.misc.sage_ostools": { + "ntests": 41 + }, + "sage.misc.sage_timeit": { + "ntests": 44 + }, + "sage.misc.sage_timeit_class": { + "ntests": 6 + }, "sage.misc.sage_unittest": { - "failed": true, "ntests": 88 }, "sage.misc.sagedoc": { @@ -1107,20 +1279,37 @@ }, "sage.misc.sageinspect": { "failed": true, - "ntests": 322 + "ntests": 321 + }, + "sage.misc.search": { + "ntests": 4 + }, + "sage.misc.session": { + "failed": true, + "ntests": 61 + }, + "sage.misc.stopgap": { + "ntests": 11 }, "sage.misc.superseded": { "failed": true, "ntests": 59 }, + "sage.misc.table": { + "ntests": 66 + }, "sage.misc.temporary_file": { - "failed": true, "ntests": 80 }, + "sage.misc.test_nested_class": { + "ntests": 18 + }, "sage.misc.timing": { - "failed": true, "ntests": 35 }, + "sage.misc.trace": { + "ntests": 5 + }, "sage.misc.unknown": { "ntests": 22 }, @@ -1128,22 +1317,55 @@ "ntests": 22 }, "sage.misc.viewer": { - "failed": true, "ntests": 49 }, "sage.misc.weak_dict": { - "failed": true, "ntests": 251 }, + "sage.modules.module": { + "failed": true, + "ntests": 37 + }, + "sage.numerical.backends.generic_backend": { + "failed": true, + "ntests": 60 + }, + "sage.numerical.backends.generic_sdp_backend": { + "failed": true, + "ntests": 22 + }, + "sage.parallel.decorate": { + "ntests": 86 + }, + "sage.parallel.map_reduce": { + "failed": true, + "ntests": 293 + }, + "sage.parallel.multiprocessing_sage": { + "ntests": 9 + }, + "sage.parallel.ncpus": { + "ntests": 1 + }, + "sage.parallel.parallelism": { + "ntests": 53 + }, + "sage.parallel.reference": { + "ntests": 5 + }, + "sage.parallel.use_fork": { + "failed": true, + "ntests": 28 + }, "sage.repl.attach": { "failed": true, - "ntests": 128 + "ntests": 135 }, "sage.repl.configuration": { + "failed": true, "ntests": 22 }, "sage.repl.display.fancy_repr": { - "failed": true, "ntests": 27 }, "sage.repl.display.formatter": { @@ -1154,7 +1376,6 @@ "ntests": 25 }, "sage.repl.display.pretty_print": { - "failed": true, "ntests": 21 }, "sage.repl.display.util": { @@ -1165,6 +1386,7 @@ "ntests": 42 }, "sage.repl.inputhook": { + "failed": true, "ntests": 7 }, "sage.repl.interface_magic": { @@ -1184,11 +1406,9 @@ "ntests": 35 }, "sage.repl.ipython_kernel.interact": { - "failed": true, "ntests": 42 }, "sage.repl.ipython_kernel.kernel": { - "failed": true, "ntests": 12 }, "sage.repl.ipython_kernel.widgets": { @@ -1205,11 +1425,11 @@ }, "sage.repl.load": { "failed": true, - "ntests": 38 + "ntests": 40 }, "sage.repl.preparse": { "failed": true, - "ntests": 349 + "ntests": 353 }, "sage.repl.rich_output.backend_base": { "failed": true, @@ -1226,11 +1446,9 @@ "ntests": 75 }, "sage.repl.rich_output.buffer": { - "failed": true, "ntests": 49 }, "sage.repl.rich_output.display_manager": { - "failed": true, "ntests": 86 }, "sage.repl.rich_output.output_basic": { @@ -1252,92 +1470,595 @@ "ntests": 68 }, "sage.repl.rich_output.pretty_print": { - "failed": true, "ntests": 41 }, "sage.repl.rich_output.test_backend": { - "failed": true, "ntests": 37 }, - "sage.rings.ideal": { + "sage.rings.abc": { + "ntests": 91 + }, + "sage.rings.big_oh": { "failed": true, - "ntests": 336 + "ntests": 22 }, - "sage.rings.integer_fake.pxd": { - "ntests": 1 + "sage.rings.continued_fraction": { + "ntests": 286 }, - "sage.rings.ring": { - "failed": true, - "ntests": 298 + "sage.rings.continued_fraction_gosper": { + "ntests": 34 }, - "sage.sets.pythonclass": { + "sage.rings.factorint": { + "ntests": 10 + }, + "sage.rings.finite_rings.conway_polynomials": { + "ntests": 20 + }, + "sage.rings.finite_rings.element_base": { + "ntests": 13 + }, + "sage.rings.finite_rings.finite_field_base": { + "ntests": 24 + }, + "sage.rings.finite_rings.finite_field_constructor": { + "ntests": 17 + }, + "sage.rings.finite_rings.finite_field_prime_modn": { "failed": true, - "ntests": 55 + "ntests": 28 }, - "sage.structure.category_object": { + "sage.rings.finite_rings.galois_group": { + "ntests": 1 + }, + "sage.rings.finite_rings.hom_prime_finite_field": { + "ntests": 15 + }, + "sage.rings.finite_rings.integer_mod": { "failed": true, - "ntests": 140 + "ntests": 536 }, - "sage.structure.coerce": { + "sage.rings.finite_rings.integer_mod_ring": { "failed": true, - "ntests": 310 + "ntests": 253 }, - "sage.structure.coerce_actions": { + "sage.rings.finite_rings.residue_field": { "failed": true, - "ntests": 128 + "ntests": 41 }, - "sage.structure.coerce_dict": { + "sage.rings.fraction_field": { "failed": true, - "ntests": 289 + "ntests": 225 }, - "sage.structure.coerce_maps": { + "sage.rings.fraction_field_element": { "failed": true, - "ntests": 90 + "ntests": 271 }, - "sage.structure.debug_options": { - "ntests": 5 + "sage.rings.function_field.constructor": { + "ntests": 34 }, - "sage.structure.dynamic_class": { - "failed": true, - "ntests": 83 + "sage.rings.function_field.element": { + "ntests": 142 }, - "sage.structure.element": { - "failed": true, - "ntests": 562 + "sage.rings.function_field.element_rational": { + "ntests": 66 }, - "sage.structure.element.pxd": { + "sage.rings.function_field.extensions": { + "ntests": 7 + }, + "sage.rings.function_field.function_field": { "failed": true, - "ntests": 23 + "ntests": 190 }, - "sage.structure.element_wrapper": { + "sage.rings.function_field.function_field_rational": { "failed": true, - "ntests": 160 + "ntests": 135 }, - "sage.structure.factorization": { + "sage.rings.function_field.ideal": { "failed": true, - "ntests": 200 + "ntests": 92 }, - "sage.structure.factorization_integer": { + "sage.rings.function_field.ideal_rational": { + "ntests": 82 + }, + "sage.rings.function_field.jacobian_base": { "failed": true, - "ntests": 6 + "ntests": 208 }, - "sage.structure.factory": { + "sage.rings.function_field.jacobian_hess": { "failed": true, - "ntests": 99 + "ntests": 248 }, - "sage.structure.formal_sum": { + "sage.rings.function_field.jacobian_khuri_makdisi": { "failed": true, - "ntests": 67 + "ntests": 272 }, - "sage.structure.global_options": { + "sage.rings.function_field.maps": { + "ntests": 55 + }, + "sage.rings.function_field.order": { + "ntests": 29 + }, + "sage.rings.function_field.order_basis": { + "ntests": 20 + }, + "sage.rings.function_field.order_rational": { + "failed": true, + "ntests": 79 + }, + "sage.rings.function_field.place": { + "ntests": 51 + }, + "sage.rings.function_field.place_rational": { + "ntests": 7 + }, + "sage.rings.generic": { + "failed": true, + "ntests": 58 + }, + "sage.rings.homset": { + "ntests": 37 + }, + "sage.rings.ideal": { + "failed": true, + "ntests": 336 + }, + "sage.rings.ideal_monoid": { + "ntests": 22 + }, + "sage.rings.infinity": { + "ntests": 313 + }, + "sage.rings.integer": { + "failed": true, + "ntests": 1071 + }, + "sage.rings.integer_fake.pxd": { + "ntests": 1 + }, + "sage.rings.integer_ring": { + "failed": true, + "ntests": 202 + }, + "sage.rings.laurent_series_ring": { + "failed": true, + "ntests": 156 + }, + "sage.rings.laurent_series_ring_element": { + "failed": true, + "ntests": 381 + }, + "sage.rings.localization": { + "failed": true, + "ntests": 110 + }, + "sage.rings.morphism": { + "failed": true, + "ntests": 444 + }, + "sage.rings.multi_power_series_ring": { + "failed": true, + "ntests": 227 + }, + "sage.rings.multi_power_series_ring_element": { + "failed": true, + "ntests": 425 + }, + "sage.rings.number_field.number_field_base": { + "ntests": 1 + }, + "sage.rings.number_field.number_field_element_base": { + "ntests": 4 + }, + "sage.rings.number_field.number_field_ideal": { + "ntests": 9 + }, + "sage.rings.padics.local_generic": { + "ntests": 72 + }, + "sage.rings.padics.local_generic_element": { + "ntests": 12 + }, + "sage.rings.padics.misc": { + "ntests": 26 + }, + "sage.rings.padics.padic_generic": { + "ntests": 58 + }, + "sage.rings.polynomial.commutative_polynomial": { + "ntests": 7 + }, + "sage.rings.polynomial.cyclotomic": { + "ntests": 31 + }, + "sage.rings.polynomial.flatten": { + "failed": true, + "ntests": 133 + }, + "sage.rings.polynomial.ideal": { + "failed": true, + "ntests": 13 + }, + "sage.rings.polynomial.infinite_polynomial_element": { + "failed": true, + "ntests": 278 + }, + "sage.rings.polynomial.infinite_polynomial_ring": { + "failed": true, + "ntests": 275 + }, + "sage.rings.polynomial.laurent_polynomial": { + "failed": true, + "ntests": 414 + }, + "sage.rings.polynomial.laurent_polynomial_ideal": { + "ntests": 7 + }, + "sage.rings.polynomial.laurent_polynomial_ring": { + "failed": true, + "ntests": 85 + }, + "sage.rings.polynomial.laurent_polynomial_ring_base": { + "ntests": 5 + }, + "sage.rings.polynomial.multi_polynomial": { + "failed": true, + "ntests": 466 + }, + "sage.rings.polynomial.multi_polynomial_element": { + "failed": true, + "ntests": 269 + }, + "sage.rings.polynomial.multi_polynomial_ideal": { + "ntests": 99 + }, + "sage.rings.polynomial.multi_polynomial_ring": { + "failed": true, + "ntests": 149 + }, + "sage.rings.polynomial.multi_polynomial_ring_base": { + "failed": true, + "ntests": 227 + }, + "sage.rings.polynomial.multi_polynomial_sequence": { + "failed": true, + "ntests": 135 + }, + "sage.rings.polynomial.polydict": { + "failed": true, + "ntests": 396 + }, + "sage.rings.polynomial.polynomial_element": { + "failed": true, + "ntests": 1873 + }, + "sage.rings.polynomial.polynomial_element_generic": { + "failed": true, + "ntests": 193 + }, + "sage.rings.polynomial.polynomial_quotient_ring": { + "ntests": 36 + }, + "sage.rings.polynomial.polynomial_quotient_ring_element": { + "ntests": 13 + }, + "sage.rings.polynomial.polynomial_ring": { + "failed": true, + "ntests": 397 + }, + "sage.rings.polynomial.polynomial_ring_constructor": { + "failed": true, + "ntests": 130 + }, + "sage.rings.polynomial.polynomial_ring_homomorphism": { + "ntests": 24 + }, + "sage.rings.polynomial.polynomial_singular_interface": { + "failed": true, + "ntests": 42 + }, + "sage.rings.polynomial.symmetric_ideal": { + "ntests": 37 + }, + "sage.rings.polynomial.symmetric_reduction": { + "ntests": 9 + }, + "sage.rings.polynomial.term_order": { + "ntests": 319 + }, + "sage.rings.polynomial.toy_buchberger": { + "ntests": 32 + }, + "sage.rings.polynomial.toy_d_basis": { + "ntests": 51 + }, + "sage.rings.polynomial.toy_variety": { + "failed": true, + "ntests": 24 + }, + "sage.rings.power_series_mpoly": { + "failed": true, + "ntests": 4 + }, + "sage.rings.power_series_poly": { + "failed": true, + "ntests": 256 + }, + "sage.rings.power_series_ring": { + "failed": true, + "ntests": 245 + }, + "sage.rings.power_series_ring_element": { + "failed": true, + "ntests": 471 + }, + "sage.rings.puiseux_series_ring": { + "failed": true, + "ntests": 72 + }, + "sage.rings.puiseux_series_ring_element": { + "failed": true, + "ntests": 198 + }, + "sage.rings.quotient_ring": { + "failed": true, + "ntests": 185 + }, + "sage.rings.quotient_ring_element": { + "ntests": 100 + }, + "sage.rings.rational": { + "failed": true, + "ntests": 533 + }, + "sage.rings.rational_field": { + "failed": true, + "ntests": 189 + }, + "sage.rings.real_double": { + "failed": true, + "ntests": 288 + }, + "sage.rings.real_lazy": { + "ntests": 19 + }, + "sage.rings.ring": { + "failed": true, + "ntests": 214 + }, + "sage.rings.semirings.non_negative_integer_semiring": { + "ntests": 16 + }, + "sage.rings.semirings.tropical_semiring": { + "ntests": 120 + }, + "sage.rings.sum_of_squares": { + "ntests": 35 + }, + "sage.rings.tests": { + "ntests": 39 + }, + "sage.schemes.affine.affine_homset": { + "ntests": 52 + }, + "sage.schemes.affine.affine_morphism": { + "failed": true, + "ntests": 282 + }, + "sage.schemes.affine.affine_point": { + "failed": true, + "ntests": 69 + }, + "sage.schemes.affine.affine_rational_point": { + "ntests": 26 + }, + "sage.schemes.affine.affine_space": { + "failed": true, + "ntests": 167 + }, + "sage.schemes.affine.affine_subscheme": { + "failed": true, + "ntests": 88 + }, + "sage.schemes.generic.algebraic_scheme": { + "failed": true, + "ntests": 339 + }, + "sage.schemes.generic.ambient_space": { + "ntests": 60 + }, + "sage.schemes.generic.divisor_group": { + "failed": true, + "ntests": 49 + }, + "sage.schemes.generic.glue": { + "failed": true, + "ntests": 19 + }, + "sage.schemes.generic.homset": { + "failed": true, + "ntests": 117 + }, + "sage.schemes.generic.morphism": { + "failed": true, + "ntests": 391 + }, + "sage.schemes.generic.point": { + "ntests": 35 + }, + "sage.schemes.generic.scheme": { + "failed": true, + "ntests": 178 + }, + "sage.schemes.generic.spec": { + "ntests": 32 + }, + "sage.schemes.product_projective.homset": { + "failed": true, + "ntests": 26 + }, + "sage.schemes.product_projective.morphism": { + "failed": true, + "ntests": 99 + }, + "sage.schemes.product_projective.point": { + "failed": true, + "ntests": 111 + }, + "sage.schemes.product_projective.rational_point": { + "failed": true, + "ntests": 25 + }, + "sage.schemes.product_projective.space": { + "failed": true, + "ntests": 153 + }, + "sage.schemes.product_projective.subscheme": { + "failed": true, + "ntests": 62 + }, + "sage.schemes.projective.proj_bdd_height": { + "ntests": 21 + }, + "sage.schemes.projective.projective_homset": { + "ntests": 58 + }, + "sage.schemes.projective.projective_morphism": { + "failed": true, + "ntests": 480 + }, + "sage.schemes.projective.projective_point": { + "failed": true, + "ntests": 281 + }, + "sage.schemes.projective.projective_rational_point": { + "ntests": 34 + }, + "sage.schemes.projective.projective_space": { + "failed": true, + "ntests": 381 + }, + "sage.schemes.projective.projective_subscheme": { + "failed": true, + "ntests": 233 + }, + "sage.sets.cartesian_product": { + "ntests": 54 + }, + "sage.sets.condition_set": { + "ntests": 53 + }, + "sage.sets.disjoint_set": { + "failed": true, + "ntests": 252 + }, + "sage.sets.disjoint_union_enumerated_sets": { + "ntests": 61 + }, + "sage.sets.family": { + "ntests": 378 + }, + "sage.sets.finite_enumerated_set": { + "ntests": 84 + }, + "sage.sets.finite_set_map_cy": { + "ntests": 111 + }, + "sage.sets.finite_set_maps": { + "ntests": 86 + }, + "sage.sets.image_set": { + "failed": true, + "ntests": 58 + }, + "sage.sets.integer_range": { + "ntests": 166 + }, + "sage.sets.non_negative_integers": { + "ntests": 48 + }, + "sage.sets.positive_integers": { + "ntests": 14 + }, + "sage.sets.primes": { + "ntests": 39 + }, + "sage.sets.pythonclass": { + "ntests": 55 + }, + "sage.sets.real_set": { + "ntests": 23 + }, + "sage.sets.recursively_enumerated_set": { + "ntests": 336 + }, + "sage.sets.set": { + "failed": true, + "ntests": 352 + }, + "sage.sets.set_from_iterator": { + "ntests": 150 + }, + "sage.sets.totally_ordered_finite_set": { + "ntests": 69 + }, + "sage.structure.category_object": { + "ntests": 140 + }, + "sage.structure.coerce": { + "failed": true, + "ntests": 310 + }, + "sage.structure.coerce_actions": { + "failed": true, + "ntests": 133 + }, + "sage.structure.coerce_dict": { + "failed": true, + "ntests": 289 + }, + "sage.structure.coerce_maps": { + "failed": true, + "ntests": 90 + }, + "sage.structure.debug_options": { + "ntests": 5 + }, + "sage.structure.dynamic_class": { + "ntests": 83 + }, + "sage.structure.element": { + "failed": true, + "ntests": 562 + }, + "sage.structure.element.pxd": { + "failed": true, + "ntests": 23 + }, + "sage.structure.element_wrapper": { + "ntests": 160 + }, + "sage.structure.factorization": { + "failed": true, + "ntests": 200 + }, + "sage.structure.factorization_integer": { + "ntests": 6 + }, + "sage.structure.factory": { + "failed": true, + "ntests": 99 + }, + "sage.structure.formal_sum": { + "failed": true, + "ntests": 71 + }, + "sage.structure.global_options": { "ntests": 145 }, "sage.structure.indexed_generators": { - "failed": true, "ntests": 90 }, "sage.structure.list_clone": { - "failed": true, "ntests": 380 }, "sage.structure.list_clone_demo": { @@ -1350,7 +2071,6 @@ "ntests": 12 }, "sage.structure.mutability": { - "failed": true, "ntests": 68 }, "sage.structure.nonexact": { @@ -1362,7 +2082,6 @@ "ntests": 303 }, "sage.structure.parent_gens": { - "failed": true, "ntests": 24 }, "sage.structure.parent_old": { @@ -1376,60 +2095,83 @@ "ntests": 50 }, "sage.structure.richcmp": { - "failed": true, "ntests": 56 }, "sage.structure.richcmp.pxd": { "ntests": 24 }, "sage.structure.sage_object": { - "failed": true, "ntests": 84 }, "sage.structure.sequence": { - "failed": true, "ntests": 183 }, "sage.structure.set_factories": { - "failed": true, "ntests": 225 }, "sage.structure.set_factories_example": { - "failed": true, "ntests": 81 }, "sage.structure.support_view": { "ntests": 38 }, "sage.structure.test_factory": { - "failed": true, "ntests": 6 }, "sage.structure.unique_representation": { - "failed": true, "ntests": 226 }, + "sage.symbolic.function": { + "failed": true, + "ntests": 168 + }, + "sage.symbolic.symbols": { + "ntests": 3 + }, + "sage.tests.article_heuberger_krenn_kropf_fsm-in-sage": { + "ntests": 22 + }, + "sage.tests.book_schilling_zabrocki_kschur_primer": { + "ntests": 2 + }, + "sage.tests.book_stein_ent": { + "ntests": 8 + }, + "sage.tests.cmdline": { + "ntests": 137 + }, + "sage.tests.finite_poset": { + "ntests": 1 + }, + "sage.tests.functools_partial_src": { + "ntests": 3 + }, + "sage.tests.parigp": { + "ntests": 4 + }, + "sage.tests.startup": { + "ntests": 6 + }, + "sage.tests.test_deprecation": { + "ntests": 4 + }, "sage.typeset.ascii_art": { "failed": true, "ntests": 24 }, "sage.typeset.character_art": { - "failed": true, "ntests": 108 }, "sage.typeset.character_art_factory": { - "failed": true, "ntests": 53 }, "sage.typeset.symbols": { - "failed": true, "ntests": 28 }, "sage.typeset.unicode_art": { - "failed": true, "ntests": 18 }, "sage.typeset.unicode_characters": { "ntests": 27 } -} +} \ No newline at end of file From b99fdf0c48204396e64ce1b4b55917dd89326a53 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 13:16:56 -0700 Subject: [PATCH 35/96] ./sage -fixdoctests --distribution sagemath-repl --update-known-test-failures --- pkgs/sagemath-repl/known-test-failures.json | 31 ++++++++++----------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/pkgs/sagemath-repl/known-test-failures.json b/pkgs/sagemath-repl/known-test-failures.json index 6703c0a50cf..9f2a76a39c6 100644 --- a/pkgs/sagemath-repl/known-test-failures.json +++ b/pkgs/sagemath-repl/known-test-failures.json @@ -1,30 +1,28 @@ { "sage.doctest.control": { "failed": true, - "ntests": 0 + "ntests": 229 }, "sage.doctest.external": { - "ntests": 41 + "ntests": 40 }, "sage.doctest.fixtures": { - "failed": true, - "ntests": 59 + "ntests": 58 }, "sage.doctest.forker": { "failed": true, - "ntests": 432 + "ntests": 412 }, "sage.doctest.parsing": { "failed": true, - "ntests": 316 + "ntests": 308 }, "sage.doctest.reporting": { - "failed": true, - "ntests": 124 + "ntests": 126 }, "sage.doctest.sources": { "failed": true, - "ntests": 376 + "ntests": 341 }, "sage.doctest.test": { "ntests": 23 @@ -42,7 +40,7 @@ "ntests": 721 }, "sage.repl.attach": { - "ntests": 128 + "ntests": 135 }, "sage.repl.configuration": { "ntests": 22 @@ -78,7 +76,7 @@ }, "sage.repl.interpreter": { "failed": true, - "ntests": 109 + "ntests": 105 }, "sage.repl.ipython_extension": { "failed": true, @@ -86,7 +84,7 @@ }, "sage.repl.ipython_kernel.install": { "failed": true, - "ntests": 40 + "ntests": 35 }, "sage.repl.ipython_kernel.interact": { "failed": true, @@ -109,11 +107,11 @@ }, "sage.repl.load": { "failed": true, - "ntests": 41 + "ntests": 39 }, "sage.repl.preparse": { "failed": true, - "ntests": 343 + "ntests": 347 }, "sage.repl.rich_output.backend_base": { "failed": true, @@ -126,15 +124,14 @@ "ntests": 15 }, "sage.repl.rich_output.backend_ipython": { - "failed": true, - "ntests": 75 + "ntests": 73 }, "sage.repl.rich_output.buffer": { "ntests": 49 }, "sage.repl.rich_output.display_manager": { "failed": true, - "ntests": 85 + "ntests": 84 }, "sage.repl.rich_output.output_basic": { "ntests": 46 From efbee8c2b5c6b63ab8150429a219ad39faf33923 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 13:26:18 -0700 Subject: [PATCH 36/96] .github/workflows/dist.yml: Build sagemath-brial wheel --- .github/workflows/dist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 3d4028dfe78..0e774b95887 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -175,7 +175,7 @@ jobs: # SPKGs to install as system packages SPKGS: _bootstrap _prereq # Non-Python packages to install as spkgs - TARGETS_PRE: gmp mpfr mpc bliss coxeter3 mcqd meataxe sirocco boost_cropped tdlib + TARGETS_PRE: gmp mpfr mpc bliss coxeter3 mcqd meataxe sirocco boost_cropped tdlib brial # Disable building PyPy wheels on all platforms # Disable musllinux until #33083 provides alpine package information CIBW_SKIP: "pp* *-musllinux*" @@ -227,7 +227,7 @@ jobs: export PATH=build/bin:$PATH export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && if cp /host/sage-\$AUDITWHEEL_PLAT/config.status . 2>/dev/null; then chmod +x config.status; fi && if [ -x ./config.status ]; then ./config.status; else ./configure --enable-build-as-root ${{ startsWith(matrix.os, 'ubuntu') && '--prefix=/host/sage-\$AUDITWHEEL_PLAT' || '' }} && cp config.status prefix/; fi && MAKE=\"make -j6\" make V=0 $TARGETS_PRE && (echo \"sage_conf @ file://\$(pwd)/pkgs/sage-conf\" && echo \"sage_setup @ file://\$(pwd)/pkgs/sage-setup\") > constraints.txt" mkdir -p unpacked - for pkg in sagemath*objects sagemath*categories sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*tdlib; do + for pkg in sagemath*objects sagemath*categories sagemath*bliss sagemath*brial sagemath*coxeter3 sagemath*mcqd sagemath*tdlib; do case "$pkg:${{ matrix.arch }}" in sagemath*tdlib:i686) continue;; # broken - boost-related esac From 2f3ac967814577103e1d03642154b6e59c56fb3e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 14:16:13 -0700 Subject: [PATCH 37/96] pkgs/sagemath-brial/setup.py: Set up sys.path for now --- pkgs/sagemath-brial/setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/sagemath-brial/setup.py b/pkgs/sagemath-brial/setup.py index f01bf6c0626..219a8f81f63 100644 --- a/pkgs/sagemath-brial/setup.py +++ b/pkgs/sagemath-brial/setup.py @@ -1,5 +1,10 @@ #!/usr/bin/env python +# PEP 517 builds do not have . in sys.path +import os +import sys +sys.path.insert(0, os.path.dirname(__file__)) + from sage_setup import sage_setup sage_setup(['sagemath-brial'], From 7a7c795c1efd40d00d87e9ec9d35cfc651a032b1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 15:24:11 -0700 Subject: [PATCH 38/96] pkgs/sagemath-objects/pyproject.toml.m4: Add to package-data --- pkgs/sagemath-objects/pyproject.toml.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/sagemath-objects/pyproject.toml.m4 b/pkgs/sagemath-objects/pyproject.toml.m4 index 07683a53d42..4a68c34f70e 100644 --- a/pkgs/sagemath-objects/pyproject.toml.m4 +++ b/pkgs/sagemath-objects/pyproject.toml.m4 @@ -45,6 +45,9 @@ version = {file = ["VERSION.txt"]} "cython_metaclass.h", "python_debug.h", ] +"sage.ext" = [ + "mod_int.h", +] "sage.rings" = ["integer_fake.h"] [external] From 0590be2dfaeb97c2a2da87ba8fdaaf15fc016e80 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 9 Jun 2024 14:17:05 -0700 Subject: [PATCH 39/96] pkgs/sagemath-{categories,environment}/README.rst: Update from #35095 --- pkgs/sagemath-categories/README.rst | 65 +++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/pkgs/sagemath-categories/README.rst b/pkgs/sagemath-categories/README.rst index 01e974442f8..07ae9c02fed 100644 --- a/pkgs/sagemath-categories/README.rst +++ b/pkgs/sagemath-categories/README.rst @@ -1,6 +1,6 @@ -========================================================================= - Sage: Open Source Mathematics Software: Sage categories and basic rings -========================================================================= +============================================================================================== + Sage: Open Source Mathematics Software: Sage categories, basic rings, polynomials, functions +============================================================================================== About SageMath -------------- @@ -33,19 +33,60 @@ available without introducing dependencies on additional mathematical libraries. -Dependencies ------------- +What is included +---------------- -When building from source, development packages of `gmp`, `mpfr`, and `mpc` are needed. +* `Structure `_, `Coercion framework `_, `Base Classes, Metaclasses `_ + +* `Categories and functorial constructions `_ + +* `Sets `_ + +* Basic Combinatorial and Data Structures: `Binary trees `_, `Bitsets `_, `Permutations `_, Combinations + +* Basic Rings and Fields: `Integers, Rationals `_, `Double Precision Reals `_, `Z/nZ `_ + +* `Commutative Polynomials `_, `Power Series and Laurent Series `_, `Rational Function Fields `_ + +* Arithmetic Functions, `Elementary and Special Functions `_ as generic entry points + +* Base classes for Groups, Rings, `Finite Fields `_, `Number Fields `_, `Schemes `_ + +* Facilities for `Parallel Computing `_, `Formatted Output `_ +Available in other distribution packages +---------------------------------------- -Documentation -------------- +* `sagemath-combinat `_: + Algebraic combinatorics, combinatorial representation theory -* `Categories `_ +* `sagemath-graphs `_: + Graphs, posets, hypergraphs, designs, abstract complexes, combinatorial polyhedra, abelian sandpiles, quivers -* `Structure `_ +* `sagemath-groups `_: + Groups, invariant theory -* `Coercion `_ +* `sagemath-modules `_: + Vectors, matrices, tensors, vector spaces, affine spaces, + modules and algebras, additive groups, quadratic forms, root systems, homology, coding theory, matroids -* `Classes, Metaclasses `_ +* `sagemath-plot `_: + Plotting and graphics with Matplotlib, Three.JS, etc. + +* `sagemath-polyhedra `_: + Convex polyhedra in arbitrary dimension, triangulations, polyhedral fans, lattice points, geometric complexes, hyperplane arrangements + +* `sagemath-repl `_: + IPython REPL, the interactive language of SageMath (preparser), interacts, development tools + +* `sagemath-schemes `_: + Schemes, varieties, Groebner bases, elliptic curves, algebraic Riemann surfaces, modular forms, arithmetic dynamics + +* `sagemath-symbolics `_: + Symbolic expressions, calculus, differentiable manifolds, asymptotics + + +Dependencies +------------ + +When building from source, development packages of `gmp`, `mpfr`, and `mpc` are needed. From d3851cdb4c367f98519f4efb2fe6f6a71db8b49e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 9 Jun 2024 14:49:47 -0700 Subject: [PATCH 40/96] sage.categories: Update # needs --- .../finite_dimensional_algebras_with_basis.py | 20 +++++++++++++------ src/sage/categories/semigroups.py | 2 ++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/sage/categories/finite_dimensional_algebras_with_basis.py b/src/sage/categories/finite_dimensional_algebras_with_basis.py index 4df8a265f06..f9ebf49f620 100644 --- a/src/sage/categories/finite_dimensional_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_algebras_with_basis.py @@ -147,6 +147,7 @@ def radical_basis(self): We compute the radical basis in a subalgebra using the inherited product:: + sage: # needs sage.modules sage: scoeffs = {('a','e'): {'a':1}, ('b','e'): {'a':1, 'b':1}, ....: ('c','d'): {'a':1}, ('c','e'): {'c':1}} sage: L. = LieAlgebra(QQ, scoeffs) @@ -157,14 +158,14 @@ def radical_basis(self): TESTS:: - sage: A = KleinFourGroup().algebra(GF(2)) # needs sage.groups sage.modules - sage: A.radical_basis() # needs sage.groups sage.modules + sage: # needs sage.groups sage.modules + sage: A = KleinFourGroup().algebra(GF(2)) + sage: A.radical_basis() (() + (1,2)(3,4), (3,4) + (1,2)(3,4), (1,2) + (1,2)(3,4)) - - sage: A = KleinFourGroup().algebra(QQ, category=Monoids()) # needs sage.groups sage.modules - sage: A.radical_basis.__module__ # needs sage.groups sage.modules + sage: A = KleinFourGroup().algebra(QQ, category=Monoids()) + sage: A.radical_basis.__module__ 'sage.categories.finite_dimensional_algebras_with_basis' - sage: A.radical_basis() # needs sage.groups sage.modules + sage: A.radical_basis() () """ F = self.base_ring() @@ -425,6 +426,7 @@ def subalgebra(self, gens, category=None, *args, **opts): EXAMPLES:: + sage: # needs sage.modules sage: scoeffs = {('a','e'): {'a':1}, ('b','e'): {'a':1, 'b':1}, ....: ('c','d'): {'a':1}, ('c','e'): {'c':1}} sage: L. = LieAlgebra(QQ, scoeffs) @@ -433,6 +435,7 @@ def subalgebra(self, gens, category=None, *args, **opts): sage: A.dimension() 7 + sage: # needs sage.modules sage: L. = LieAlgebra(GF(3), {('x','z'): {'x':1, 'y':1}, ('y','z'): {'y':1}}) sage: MS = MatrixSpace(L.base_ring(), L.dimension()) sage: gens = [b.adjoint_matrix() for b in L.basis()] @@ -477,6 +480,7 @@ def ideal_submodule(self, gens, side='left', category=None, *args, **opts): EXAMPLES:: + sage: # needs sage.modules sage: scoeffs = {('a','e'): {'a':1}, ('b','e'): {'a':1, 'b':1}, ....: ('c','d'): {'a':1}, ('c','e'): {'c':1}} sage: L. = LieAlgebra(QQ, scoeffs) @@ -1541,18 +1545,21 @@ def simple_module_parameterization(self): EXAMPLES:: + sage: # needs sage.modules sage: TL = TemperleyLiebAlgebra(5, 30, QQ) # semisimple sage: len(TL.radical_basis()) 0 sage: TL.simple_module_parameterization() (1, 3, 5) + sage: # needs sage.modules sage: TL = TemperleyLiebAlgebra(5, 1, QQ) # not semisimple sage: len(TL.radical_basis()) 24 sage: TL.simple_module_parameterization() (1, 3, 5) + sage: # needs sage.modules sage: TL = TemperleyLiebAlgebra(6, 30, QQ) # semisimple sage: all(TL.cell_module(la).dimension() ....: == TL.cell_module(la).simple_module().dimension() @@ -1561,6 +1568,7 @@ def simple_module_parameterization(self): sage: TL.simple_module_parameterization() (0, 2, 4, 6) + sage: # needs sage.modules sage: TL = TemperleyLiebAlgebra(6, 0, QQ) # not semisimple sage: TL.simple_module_parameterization() (2, 4, 6) diff --git a/src/sage/categories/semigroups.py b/src/sage/categories/semigroups.py index 658b77c96b2..f53ee40d5be 100644 --- a/src/sage/categories/semigroups.py +++ b/src/sage/categories/semigroups.py @@ -516,6 +516,7 @@ def representation(self, module, on_basis, side="left", *args, **kwargs): EXAMPLES:: + sage: # needs sage.groups sage: G = CyclicPermutationGroup(3) sage: M = algebras.Exterior(QQ, 'x', 3) sage: def on_basis(g, m): # cyclically permute generators @@ -1064,6 +1065,7 @@ def representation(self, module, on_basis, side="left", *args, **kwargs): EXAMPLES:: + sage: # needs sage.broups sage: G = groups.permutation.Dihedral(5) sage: CFM = CombinatorialFreeModule(GF(2), [1, 2, 3, 4, 5]) sage: A = G.algebra(GF(2)) From 6cb3e71ff07d9f143298834334c681a440b7cf9e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 9 Jun 2024 15:17:08 -0700 Subject: [PATCH 41/96] sage -fixdoctests --distribution sagemath-categories --update-known-test-failures --- pkgs/sagemath-categories/known-test-failures.json | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index a5896c6f57a..e84b99ab042 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -281,7 +281,7 @@ "ntests": 6 }, "sage.categories.finite_dimensional_algebras_with_basis": { - "ntests": 82 + "ntests": 71 }, "sage.categories.finite_dimensional_bialgebras_with_basis": { "ntests": 4 @@ -297,7 +297,7 @@ }, "sage.categories.finite_dimensional_lie_algebras_with_basis": { "failed": true, - "ntests": 107 + "ntests": 167 }, "sage.categories.finite_dimensional_modules_with_basis": { "failed": true, @@ -510,7 +510,7 @@ }, "sage.categories.modules_with_basis": { "failed": true, - "ntests": 240 + "ntests": 242 }, "sage.categories.monoid_algebras": { "ntests": 4 @@ -556,7 +556,7 @@ }, "sage.categories.pushout": { "failed": true, - "ntests": 624 + "ntests": 619 }, "sage.categories.quantum_group_representations": { "ntests": 13 @@ -720,7 +720,7 @@ }, "sage.combinat.permutation": { "failed": true, - "ntests": 1174 + "ntests": 1177 }, "sage.combinat.permutation_cython": { "ntests": 39 @@ -794,7 +794,7 @@ }, "sage.doctest.forker": { "failed": true, - "ntests": 413 + "ntests": 414 }, "sage.doctest.parsing": { "failed": true, @@ -1278,7 +1278,6 @@ "ntests": 103 }, "sage.misc.sageinspect": { - "failed": true, "ntests": 321 }, "sage.misc.search": { From 046dbcf109e1ad6e48b881fcb512bbd691656e44 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 10 Jun 2024 19:16:05 -0700 Subject: [PATCH 42/96] src/sage/all__sagemath_categories.py: Update from #35095 --- src/sage/all__sagemath_categories.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/sage/all__sagemath_categories.py b/src/sage/all__sagemath_categories.py index cb37b0baf2f..93f6532dea8 100644 --- a/src/sage/all__sagemath_categories.py +++ b/src/sage/all__sagemath_categories.py @@ -1,6 +1,26 @@ # sage_setup: distribution = sagemath-categories from sage.all__sagemath_objects import * -from sage.categories.all import * +try: + # For doctesting + from sage.all__sagemath_repl import * +except ImportError: + pass +from sage.categories.all import * from sage.rings.all__sagemath_categories import * +from sage.sets.all import * +from sage.combinat.all__sagemath_categories import * +from sage.arith.all import * +from sage.data_structures.all import * +from sage.ext.all__sagemath_categories import * +from sage.groups.all__sagemath_categories import * +from sage.interfaces.all import * +from sage.misc.all__sagemath_categories import * +from sage.typeset.all import * +from sage.schemes.all__sagemath_categories import * + +from sage.calculus.all__sagemath_categories import * +from sage.functions.all import * + +from sage.parallel.all import * From 04dd503cb82dc3a901156123b38b3bb3eaab768b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 22 Jun 2024 14:31:22 -0700 Subject: [PATCH 43/96] src/sage/categories/semigroups.py: Fix # needs --- src/sage/categories/semigroups.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/categories/semigroups.py b/src/sage/categories/semigroups.py index f53ee40d5be..e426727b31b 100644 --- a/src/sage/categories/semigroups.py +++ b/src/sage/categories/semigroups.py @@ -1065,7 +1065,7 @@ def representation(self, module, on_basis, side="left", *args, **kwargs): EXAMPLES:: - sage: # needs sage.broups + sage: # needs sage.groups sage: G = groups.permutation.Dihedral(5) sage: CFM = CombinatorialFreeModule(GF(2), [1, 2, 3, 4, 5]) sage: A = G.algebra(GF(2)) From 9bd9f18b1abba3878fb4639b66e16d8bfbbf37fa Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 22 Jun 2024 18:24:10 -0700 Subject: [PATCH 44/96] src/sage/combinat/permutation.py: Use lazy_import for SJT --- src/sage/combinat/permutation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index 1ca90eff943..af83006853a 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -250,7 +250,6 @@ from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.categories.sets_with_grading import SetsWithGrading from sage.combinat.backtrack import GenericBacktracker -from sage.combinat.SJT import SJT from sage.combinat.combinat import CombinatorialElement, catalan_number from sage.combinat.combinatorial_map import combinatorial_map from sage.combinat.composition import Composition @@ -270,6 +269,7 @@ from sage.structure.element import Element, get_coercion_model from sage.structure.unique_representation import UniqueRepresentation +lazy_import('sage.combinat.SJT', 'SJT') lazy_import('sage.combinat.rsk', ['RSK', 'RSK_inverse']) lazy_import('sage.combinat.tableau', 'Tableau') lazy_import('sage.combinat.words.finite_word', 'evaluation_dict') From 1d29e4baf868e4f70d3eef28e9094181f75f97fc Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 22 Jun 2024 18:29:21 -0700 Subject: [PATCH 45/96] sage -fixdoctests --distribution sagemath-categories --update-known-test-failures --- .../known-test-failures.json | 42 ++++++++----------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index e84b99ab042..e5644f8f17e 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -17,8 +17,7 @@ "ntests": 1 }, "sage.arith.srange": { - "failed": true, - "ntests": 77 + "ntests": 72 }, "sage.calculus.functional": { "ntests": 2 @@ -92,7 +91,7 @@ "ntests": 328 }, "sage.categories.chain_complexes": { - "ntests": 20 + "ntests": 22 }, "sage.categories.coalgebras": { "ntests": 1 @@ -253,8 +252,7 @@ "ntests": 27 }, "sage.categories.fields": { - "failed": true, - "ntests": 109 + "ntests": 100 }, "sage.categories.filtered_algebras": { "failed": true, @@ -300,8 +298,7 @@ "ntests": 167 }, "sage.categories.finite_dimensional_modules_with_basis": { - "failed": true, - "ntests": 94 + "ntests": 56 }, "sage.categories.finite_dimensional_nilpotent_lie_algebras_with_basis": { "ntests": 19 @@ -315,6 +312,9 @@ "sage.categories.finite_fields": { "ntests": 14 }, + "sage.categories.finite_groups": { + "ntests": 5 + }, "sage.categories.finite_lattice_posets": { "ntests": 31 }, @@ -407,7 +407,7 @@ "ntests": 25 }, "sage.categories.group_algebras": { - "ntests": 27 + "ntests": 30 }, "sage.categories.groups": { "ntests": 45 @@ -622,8 +622,7 @@ "ntests": 17 }, "sage.categories.simplicial_sets": { - "failed": true, - "ntests": 98 + "ntests": 57 }, "sage.categories.subobjects": { "ntests": 2 @@ -720,7 +719,7 @@ }, "sage.combinat.permutation": { "failed": true, - "ntests": 1177 + "ntests": 1202 }, "sage.combinat.permutation_cython": { "ntests": 39 @@ -825,7 +824,7 @@ "ntests": 4 }, "sage.features": { - "ntests": 148 + "ntests": 146 }, "sage.features.all": { "ntests": 14 @@ -893,7 +892,7 @@ "ntests": 4 }, "sage.features.join_feature": { - "ntests": 25 + "ntests": 23 }, "sage.features.kenzo": { "ntests": 6 @@ -1380,10 +1379,6 @@ "sage.repl.display.util": { "ntests": 7 }, - "sage.repl.image": { - "failed": true, - "ntests": 42 - }, "sage.repl.inputhook": { "failed": true, "ntests": 7 @@ -1427,7 +1422,6 @@ "ntests": 40 }, "sage.repl.preparse": { - "failed": true, "ntests": 353 }, "sage.repl.rich_output.backend_base": { @@ -1536,10 +1530,10 @@ "ntests": 34 }, "sage.rings.function_field.element": { - "ntests": 142 + "ntests": 128 }, "sage.rings.function_field.element_rational": { - "ntests": 66 + "ntests": 71 }, "sage.rings.function_field.extensions": { "ntests": 7 @@ -1582,7 +1576,7 @@ }, "sage.rings.function_field.order_rational": { "failed": true, - "ntests": 79 + "ntests": 69 }, "sage.rings.function_field.place": { "ntests": 51 @@ -1674,7 +1668,6 @@ "ntests": 133 }, "sage.rings.polynomial.ideal": { - "failed": true, "ntests": 13 }, "sage.rings.polynomial.infinite_polynomial_element": { @@ -1728,7 +1721,7 @@ }, "sage.rings.polynomial.polynomial_element": { "failed": true, - "ntests": 1873 + "ntests": 1868 }, "sage.rings.polynomial.polynomial_element_generic": { "failed": true, @@ -2048,7 +2041,6 @@ "ntests": 99 }, "sage.structure.formal_sum": { - "failed": true, "ntests": 71 }, "sage.structure.global_options": { @@ -2118,7 +2110,7 @@ "ntests": 6 }, "sage.structure.unique_representation": { - "ntests": 226 + "ntests": 234 }, "sage.symbolic.function": { "failed": true, From 5d2efe10866f6f6615f65e5b0c7ebb6c1a11ebca Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 24 Jun 2024 14:20:16 -0700 Subject: [PATCH 46/96] src/sage/misc/dev_tools.py: Update doctest output --- src/sage/misc/dev_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/misc/dev_tools.py b/src/sage/misc/dev_tools.py index d1b423f6049..b15a965a1f7 100644 --- a/src/sage/misc/dev_tools.py +++ b/src/sage/misc/dev_tools.py @@ -148,6 +148,7 @@ def load_submodules(module=None, exclude_pattern=None): EXAMPLES:: sage: sage.misc.dev_tools.load_submodules(sage.combinat) + load sage.combinat.SJT... succeeded load sage.combinat.algebraic_combinatorics... succeeded ... load sage.combinat.words.suffix_trees... succeeded From dbdb7409ffdc0a836804b462ef5e6b06ee34da0c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 26 Jul 2024 13:24:25 +0200 Subject: [PATCH 47/96] src/sage/categories/triangular_kac_moody_algebras.py: Add # needs --- src/sage/categories/triangular_kac_moody_algebras.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sage/categories/triangular_kac_moody_algebras.py b/src/sage/categories/triangular_kac_moody_algebras.py index 677b20e06f4..a663fd65afc 100644 --- a/src/sage/categories/triangular_kac_moody_algebras.py +++ b/src/sage/categories/triangular_kac_moody_algebras.py @@ -216,6 +216,7 @@ def _triangular_key(self, x): EXAMPLES:: + sage: # needs sage.combinat sage.modules sage: L = lie_algebras.sl(QQ, 3) sage: La = L.cartan_type().root_system().weight_lattice().fundamental_weights() sage: sorted(L.basis().keys(), key=L._basis_key) @@ -353,6 +354,7 @@ def _transpose_basis_mapping(self): EXAMPLES:: + sage: # needs sage.combinat sage.modules sage: g = LieAlgebra(QQ, cartan_type=['A', 2]) sage: g._transpose_basis_mapping {-alpha[1]: alpha[1], @@ -385,6 +387,7 @@ def _transpose_on_basis(self, m): EXAMPLES:: + sage: # needs sage.combinat sage.modules sage: g = LieAlgebra(QQ, cartan_type=['B', 2]) sage: B = g.basis() sage: [(B[k], g._transpose_on_basis(k)) for k in B.keys()] @@ -408,6 +411,7 @@ def transpose(self): EXAMPLES:: + sage: # needs sage.combinat sage.modules sage: g = LieAlgebra(QQ, cartan_type=['B', 2]) sage: g.transpose Generic endomorphism of Lie algebra of ['B', 2] in the Chevalley basis @@ -426,6 +430,7 @@ def transpose(self): EXAMPLES:: + sage: # needs sage.combinat sage.modules sage: g = LieAlgebra(QQ, cartan_type=['G', 2]) sage: for b in g.basis(): ....: for bp in g.basis(): From 9cd16e3e11df730813d04f175bf2595696427071 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 26 Jul 2024 13:26:46 +0200 Subject: [PATCH 48/96] src/sage/tests/cmdline.py: Add # needs --- src/sage/tests/cmdline.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py index 5bfe85f6e4c..027e5b36d0f 100644 --- a/src/sage/tests/cmdline.py +++ b/src/sage/tests/cmdline.py @@ -553,6 +553,7 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False Some programs of which we check functionality using only ``--version``:: + sage: # needs sage.symbolic sage: (out, err, ret) = test_executable(["sage", "--maxima", "--version"]) sage: out.find("Maxima ") >= 0 True From 1a9c4c54e6137bfe3a10cd3c8c658de912170181 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 22 Aug 2024 09:11:42 -0700 Subject: [PATCH 49/96] ./sage --fixdistributions --set sagemath-brial --from-egg-info --- src/sage/libs/polybori/__init__.pxd | 1 + src/sage/libs/polybori/decl.pxd | 1 + src/sage/rings/polynomial/pbori/PyPolyBoRi.py | 1 + src/sage/rings/polynomial/pbori/__init__.py | 1 + src/sage/rings/polynomial/pbori/blocks.py | 1 + src/sage/rings/polynomial/pbori/cnf.py | 1 + src/sage/rings/polynomial/pbori/easy_polynomials.py | 1 + src/sage/rings/polynomial/pbori/fglm.py | 1 + src/sage/rings/polynomial/pbori/frontend.py | 1 + src/sage/rings/polynomial/pbori/gbcore.py | 1 + src/sage/rings/polynomial/pbori/gbrefs.py | 1 + src/sage/rings/polynomial/pbori/heuristics.py | 1 + src/sage/rings/polynomial/pbori/interpolate.py | 1 + src/sage/rings/polynomial/pbori/interred.py | 1 + src/sage/rings/polynomial/pbori/ll.py | 1 + src/sage/rings/polynomial/pbori/nf.py | 1 + src/sage/rings/polynomial/pbori/parallel.py | 1 + src/sage/rings/polynomial/pbori/pbori.pxd | 1 + src/sage/rings/polynomial/pbori/pbori.pyx | 1 + src/sage/rings/polynomial/pbori/randompoly.py | 1 + src/sage/rings/polynomial/pbori/rank.py | 1 + src/sage/rings/polynomial/pbori/specialsets.py | 1 + src/sage/rings/polynomial/pbori/statistics.py | 1 + 23 files changed, 23 insertions(+) diff --git a/src/sage/libs/polybori/__init__.pxd b/src/sage/libs/polybori/__init__.pxd index 361d7520c13..bc6ce2d1ff6 100644 --- a/src/sage/libs/polybori/__init__.pxd +++ b/src/sage/libs/polybori/__init__.pxd @@ -1 +1,2 @@ +# sage_setup: distribution = sagemath-brial # Insert a comment here to prevent repo corruption. diff --git a/src/sage/libs/polybori/decl.pxd b/src/sage/libs/polybori/decl.pxd index dd6a3aaf0b6..b516710851c 100644 --- a/src/sage/libs/polybori/decl.pxd +++ b/src/sage/libs/polybori/decl.pxd @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial # distutils: language = c++ # distutils: extra_compile_args = -std=c++11 diff --git a/src/sage/rings/polynomial/pbori/PyPolyBoRi.py b/src/sage/rings/polynomial/pbori/PyPolyBoRi.py index aa341f35c5d..032ec85161c 100644 --- a/src/sage/rings/polynomial/pbori/PyPolyBoRi.py +++ b/src/sage/rings/polynomial/pbori/PyPolyBoRi.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial r""" PolyBoRi's interface to libpolybori/BRiAL diff --git a/src/sage/rings/polynomial/pbori/__init__.py b/src/sage/rings/polynomial/pbori/__init__.py index 325ed646516..257a9b7d6a7 100644 --- a/src/sage/rings/polynomial/pbori/__init__.py +++ b/src/sage/rings/polynomial/pbori/__init__.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial """The PolyBoRi package implements a framework for computations with Polynomials in Boolean Ring. The core of PolyBoRi is a C++ library, which provides high-level data types for Boolean polynomials and monomials, diff --git a/src/sage/rings/polynomial/pbori/blocks.py b/src/sage/rings/polynomial/pbori/blocks.py index dac6ed81303..127cc826e58 100644 --- a/src/sage/rings/polynomial/pbori/blocks.py +++ b/src/sage/rings/polynomial/pbori/blocks.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial import sys from itertools import chain, islice diff --git a/src/sage/rings/polynomial/pbori/cnf.py b/src/sage/rings/polynomial/pbori/cnf.py index 61d85866013..a38c998d9fd 100644 --- a/src/sage/rings/polynomial/pbori/cnf.py +++ b/src/sage/rings/polynomial/pbori/cnf.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from random import Random from sage.rings.polynomial.pbori.pbori import if_then_else as ite from .PyPolyBoRi import Polynomial diff --git a/src/sage/rings/polynomial/pbori/easy_polynomials.py b/src/sage/rings/polynomial/pbori/easy_polynomials.py index 8451e7536ee..0b24da41ded 100644 --- a/src/sage/rings/polynomial/pbori/easy_polynomials.py +++ b/src/sage/rings/polynomial/pbori/easy_polynomials.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from .interpolate import variety_lex_leading_terms, nf_lex_points from .pbori import easy_linear_factors diff --git a/src/sage/rings/polynomial/pbori/fglm.py b/src/sage/rings/polynomial/pbori/fglm.py index 60559b31b85..f9e0d3a4fe4 100644 --- a/src/sage/rings/polynomial/pbori/fglm.py +++ b/src/sage/rings/polynomial/pbori/fglm.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from .pbori import BooleSet, FGLMStrategy from .PyPolyBoRi import BoolePolynomialVector, Polynomial diff --git a/src/sage/rings/polynomial/pbori/frontend.py b/src/sage/rings/polynomial/pbori/frontend.py index b0072cd5abf..94f03a44490 100644 --- a/src/sage/rings/polynomial/pbori/frontend.py +++ b/src/sage/rings/polynomial/pbori/frontend.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial # Import basic functionality r""" This module defines an initial ring, and patches the declare_ring to use diff --git a/src/sage/rings/polynomial/pbori/gbcore.py b/src/sage/rings/polynomial/pbori/gbcore.py index 8371577157d..5f5a8437d10 100644 --- a/src/sage/rings/polynomial/pbori/gbcore.py +++ b/src/sage/rings/polynomial/pbori/gbcore.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial import contextlib from copy import copy from itertools import chain diff --git a/src/sage/rings/polynomial/pbori/gbrefs.py b/src/sage/rings/polynomial/pbori/gbrefs.py index 4ac92f359c2..39b29af0baa 100644 --- a/src/sage/rings/polynomial/pbori/gbrefs.py +++ b/src/sage/rings/polynomial/pbori/gbrefs.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial import gzip from io import StringIO import base64 as uu diff --git a/src/sage/rings/polynomial/pbori/heuristics.py b/src/sage/rings/polynomial/pbori/heuristics.py index 5dcfca16f87..053694a7ba2 100644 --- a/src/sage/rings/polynomial/pbori/heuristics.py +++ b/src/sage/rings/polynomial/pbori/heuristics.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from .PyPolyBoRi import Polynomial, gauss_on_polys diff --git a/src/sage/rings/polynomial/pbori/interpolate.py b/src/sage/rings/polynomial/pbori/interpolate.py index 783e1209e2a..3136bf8eb3e 100644 --- a/src/sage/rings/polynomial/pbori/interpolate.py +++ b/src/sage/rings/polynomial/pbori/interpolate.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial # Copyright (c) 2005-2007 by The PolyBoRi Team from time import process_time as clock from random import Random diff --git a/src/sage/rings/polynomial/pbori/interred.py b/src/sage/rings/polynomial/pbori/interred.py index 9ecb705057f..712ddbbc890 100644 --- a/src/sage/rings/polynomial/pbori/interred.py +++ b/src/sage/rings/polynomial/pbori/interred.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from .pbori import ReductionStrategy from .PyPolyBoRi import Polynomial diff --git a/src/sage/rings/polynomial/pbori/ll.py b/src/sage/rings/polynomial/pbori/ll.py index 5292050d6a7..76b45e9eb68 100644 --- a/src/sage/rings/polynomial/pbori/ll.py +++ b/src/sage/rings/polynomial/pbori/ll.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from .pbori import (top_index, if_then_else, substitute_variables, BooleSet, ll_red_nf_redsb, ll_red_nf_noredsb, diff --git a/src/sage/rings/polynomial/pbori/nf.py b/src/sage/rings/polynomial/pbori/nf.py index 004abef5243..3a5f26177df 100644 --- a/src/sage/rings/polynomial/pbori/nf.py +++ b/src/sage/rings/polynomial/pbori/nf.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from sage.rings.polynomial.pbori.pbori import mod_mon_set from .pbori import (BooleSet, GroebnerStrategy, ReductionStrategy, parallel_reduce, easy_linear_factors) diff --git a/src/sage/rings/polynomial/pbori/parallel.py b/src/sage/rings/polynomial/pbori/parallel.py index 134ee6b2adb..2ef6840b449 100644 --- a/src/sage/rings/polynomial/pbori/parallel.py +++ b/src/sage/rings/polynomial/pbori/parallel.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial r""" parallel.py PolyBoRi diff --git a/src/sage/rings/polynomial/pbori/pbori.pxd b/src/sage/rings/polynomial/pbori/pbori.pxd index ae4ac1353d2..1cb2e136f8b 100644 --- a/src/sage/rings/polynomial/pbori/pbori.pxd +++ b/src/sage/rings/polynomial/pbori/pbori.pxd @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from libcpp.memory cimport unique_ptr, shared_ptr, make_shared from sage.rings.polynomial.multi_polynomial_ring_base cimport MPolynomialRing_base, BooleanPolynomialRing_base diff --git a/src/sage/rings/polynomial/pbori/pbori.pyx b/src/sage/rings/polynomial/pbori/pbori.pyx index 686edf8892d..0a1eb3b12a8 100644 --- a/src/sage/rings/polynomial/pbori/pbori.pyx +++ b/src/sage/rings/polynomial/pbori/pbori.pyx @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial # distutils: libraries = brial brial_groebner M4RI_LIBRARIES LIBPNG_LIBRARIES # distutils: library_dirs = M4RI_LIBDIR LIBPNG_LIBDIR # distutils: include_dirs = M4RI_INCDIR LIBPNG_INCDIR diff --git a/src/sage/rings/polynomial/pbori/randompoly.py b/src/sage/rings/polynomial/pbori/randompoly.py index 34cc53d5dd4..c0aaf1079c8 100644 --- a/src/sage/rings/polynomial/pbori/randompoly.py +++ b/src/sage/rings/polynomial/pbori/randompoly.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from random import Random from pprint import pformat diff --git a/src/sage/rings/polynomial/pbori/rank.py b/src/sage/rings/polynomial/pbori/rank.py index 98d0a1727c9..358311ba53f 100644 --- a/src/sage/rings/polynomial/pbori/rank.py +++ b/src/sage/rings/polynomial/pbori/rank.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial def input_signals(p): return list((p + p.lex_lead()).vars_as_monomial().variables()) diff --git a/src/sage/rings/polynomial/pbori/specialsets.py b/src/sage/rings/polynomial/pbori/specialsets.py index 9c5b4bdefc8..bb6a4d806c9 100644 --- a/src/sage/rings/polynomial/pbori/specialsets.py +++ b/src/sage/rings/polynomial/pbori/specialsets.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from .pbori import (top_index, if_then_else, mod_mon_set, BooleSet, BooleConstant) from .PyPolyBoRi import (Polynomial, Monomial, Variable) diff --git a/src/sage/rings/polynomial/pbori/statistics.py b/src/sage/rings/polynomial/pbori/statistics.py index efd49fcd005..aa5a9660402 100644 --- a/src/sage/rings/polynomial/pbori/statistics.py +++ b/src/sage/rings/polynomial/pbori/statistics.py @@ -1,3 +1,4 @@ +# sage_setup: distribution = sagemath-brial from .pbori import top_index, BooleConstant from .PyPolyBoRi import Monomial, Polynomial From 54b9aa0a1a5efd029199aad4081c5ce96454b33e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 4 Sep 2024 17:43:15 -0700 Subject: [PATCH 50/96] src/sage/sat/converters/polybori.py: Use lazy_import --- src/sage/sat/converters/polybori.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sage/sat/converters/polybori.py b/src/sage/sat/converters/polybori.py index d57f1c12c02..272d9009f09 100644 --- a/src/sage/sat/converters/polybori.py +++ b/src/sage/sat/converters/polybori.py @@ -29,13 +29,15 @@ ############################################################################## from random import Random -from sage.rings.polynomial.pbori.pbori import if_then_else as ite from sage.rings.integer_ring import ZZ from sage.functions.other import ceil from sage.misc.cachefunc import cached_method, cached_function +from sage.misc.lazy_import import lazy_import from sage.combinat.permutation import Permutations from sage.sat.converters import ANF2CNFConverter +lazy_import('sage.rings.polynomial.pbori.pbori', 'if_then_else', as_='ite') + class CNFEncoder(ANF2CNFConverter): """ From 65885602064666217552e04fe8824d0b14194ad5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 5 Sep 2024 20:31:39 -0700 Subject: [PATCH 51/96] src/sage_docbuild/builders.py: Actually test feature presence in '.. only' --- src/sage_docbuild/builders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py index 871cc4705a2..ab39d93c280 100644 --- a/src/sage_docbuild/builders.py +++ b/src/sage_docbuild/builders.py @@ -1054,7 +1054,7 @@ def get_modules(self, filename): try: tag_name = line[line.index('feature_') + 8:].strip() for feature in all_features(): - if tag_name == feature.name.replace('.', '_'): + if tag_name == feature.name.replace('.', '_') and feature.is_present(): break else: skip = True From c5f1ad143244267597862409dfc87de01e07e5ec Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 5 Sep 2024 22:02:54 -0700 Subject: [PATCH 52/96] ./sage --fixdoctests --distribution sagemath-categories --update-known-test-failures --- .../known-test-failures.json | 57 ++++++++++++------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index add2f5d0c15..7141993def5 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -5,7 +5,7 @@ }, "sage.arith.misc": { "failed": true, - "ntests": 903 + "ntests": 932 }, "sage.arith.numerical_approx": { "ntests": 1 @@ -87,7 +87,6 @@ "ntests": 74 }, "sage.categories.category_with_axiom": { - "failed": true, "ntests": 328 }, "sage.categories.chain_complexes": { @@ -585,7 +584,7 @@ }, "sage.categories.rings": { "failed": true, - "ntests": 164 + "ntests": 173 }, "sage.categories.rngs": { "ntests": 6 @@ -656,7 +655,7 @@ "ntests": 27 }, "sage.categories.triangular_kac_moody_algebras": { - "ntests": 15 + "ntests": 12 }, "sage.categories.tutorial": { "ntests": 4 @@ -691,7 +690,7 @@ }, "sage.combinat.composition": { "failed": true, - "ntests": 282 + "ntests": 287 }, "sage.combinat.dlx": { "ntests": 61 @@ -895,7 +894,7 @@ }, "sage.features.interfaces": { "failed": true, - "ntests": 33 + "ntests": 34 }, "sage.features.internet": { "ntests": 5 @@ -961,7 +960,10 @@ "ntests": 28 }, "sage.features.sagemath": { - "ntests": 153 + "ntests": 157 + }, + "sage.features.sat": { + "ntests": 16 }, "sage.features.singular": { "ntests": 4 @@ -970,7 +972,7 @@ "ntests": 4 }, "sage.features.sphinx": { - "ntests": 4 + "ntests": 8 }, "sage.features.symengine_py": { "ntests": 4 @@ -982,6 +984,9 @@ "failed": true, "ntests": 6 }, + "sage.features.topcom": { + "ntests": 8 + }, "sage.functions.airy": { "ntests": 99 }, @@ -1030,7 +1035,7 @@ "ntests": 4 }, "sage.functions.special": { - "ntests": 119 + "ntests": 121 }, "sage.functions.spike_function": { "ntests": 32 @@ -1049,7 +1054,7 @@ }, "sage.groups.generic": { "failed": true, - "ntests": 122 + "ntests": 127 }, "sage.groups.group": { "failed": true, @@ -1520,7 +1525,7 @@ }, "sage.rings.finite_rings.integer_mod": { "failed": true, - "ntests": 536 + "ntests": 539 }, "sage.rings.finite_rings.integer_mod_ring": { "failed": true, @@ -1532,7 +1537,7 @@ }, "sage.rings.fraction_field": { "failed": true, - "ntests": 225 + "ntests": 227 }, "sage.rings.fraction_field_element": { "failed": true, @@ -1615,7 +1620,7 @@ }, "sage.rings.integer": { "failed": true, - "ntests": 1071 + "ntests": 1068 }, "sage.rings.integer_fake.pxd": { "ntests": 1 @@ -1684,11 +1689,11 @@ }, "sage.rings.polynomial.infinite_polynomial_element": { "failed": true, - "ntests": 278 + "ntests": 298 }, "sage.rings.polynomial.infinite_polynomial_ring": { "failed": true, - "ntests": 275 + "ntests": 279 }, "sage.rings.polynomial.laurent_polynomial": { "failed": true, @@ -1827,14 +1832,26 @@ }, "sage.rings.ring": { "failed": true, - "ntests": 214 + "ntests": 206 }, "sage.rings.semirings.non_negative_integer_semiring": { "ntests": 16 }, + "sage.rings.semirings.tropical_mpolynomial": { + "failed": true, + "ntests": 118 + }, + "sage.rings.semirings.tropical_polynomial": { + "failed": true, + "ntests": 160 + }, "sage.rings.semirings.tropical_semiring": { "ntests": 120 }, + "sage.rings.semirings.tropical_variety": { + "failed": true, + "ntests": 126 + }, "sage.rings.sum_of_squares": { "ntests": 35 }, @@ -1880,7 +1897,7 @@ }, "sage.schemes.generic.homset": { "failed": true, - "ntests": 117 + "ntests": 128 }, "sage.schemes.generic.morphism": { "failed": true, @@ -2010,7 +2027,7 @@ }, "sage.structure.coerce": { "failed": true, - "ntests": 310 + "ntests": 311 }, "sage.structure.coerce_actions": { "failed": true, @@ -2126,7 +2143,7 @@ }, "sage.symbolic.function": { "failed": true, - "ntests": 168 + "ntests": 169 }, "sage.symbolic.symbols": { "ntests": 3 @@ -2141,7 +2158,7 @@ "ntests": 8 }, "sage.tests.cmdline": { - "ntests": 137 + "ntests": 133 }, "sage.tests.finite_poset": { "ntests": 1 From 5e71f53d492c235026e928228af175d5fd690093 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 25 Sep 2024 18:29:24 -0700 Subject: [PATCH 53/96] src/sage/functions/hypergeometric.py: Update # needs --- src/sage/functions/hypergeometric.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/functions/hypergeometric.py b/src/sage/functions/hypergeometric.py index 717f0c5b763..e25ae8672c5 100644 --- a/src/sage/functions/hypergeometric.py +++ b/src/sage/functions/hypergeometric.py @@ -298,7 +298,7 @@ def __call__(self, a, b, z, **kwargs): TESTS:: - sage: hypergeometric([2, 3, 4], [4, 1], 1) + sage: hypergeometric([2, 3, 4], [4, 1], 1) # needs sage.symbolic hypergeometric((2, 3, 4), (4, 1), 1) """ return BuiltinFunction.__call__(self, From ff660fc58ff941b259204d759e9a5157fcec32a7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 25 Sep 2024 18:33:17 -0700 Subject: [PATCH 54/96] src/sage/rings/function_field/element.pyx: Update # needs --- src/sage/rings/function_field/element.pyx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sage/rings/function_field/element.pyx b/src/sage/rings/function_field/element.pyx index f64c223f18b..2863732cf3b 100644 --- a/src/sage/rings/function_field/element.pyx +++ b/src/sage/rings/function_field/element.pyx @@ -202,6 +202,7 @@ cdef class FunctionFieldElement(FieldElement): We also substitute the generators in any base fields:: + sage: # needs sage.rings.function_field sage: K. = FunctionField(QQ) sage: R. = K[] sage: L. = K.extension(y^3 - (x^3 + 2*x*y + 1/x)) @@ -224,6 +225,8 @@ cdef class FunctionFieldElement(FieldElement): Traceback (most recent call last): ... TypeError: in_dict must be a dict + + sage: # needs sage.rings.function_field sage: R. = K[] sage: L. = K.extension(y^3 - (x^3 + 2*x*y + 1/x)) sage: f = x + y @@ -234,6 +237,7 @@ cdef class FunctionFieldElement(FieldElement): We can also substitute using dictionary syntax:: + sage: # needs sage.rings.function_field sage: K. = FunctionField(QQ) sage: R. = K[] sage: L. = K.extension(y^3 - (x^3 + 2*x*y + 1/x)) @@ -249,6 +253,7 @@ cdef class FunctionFieldElement(FieldElement): Check that we correctly handle extension fields:: + sage: # needs sage.rings.function_field sage: K. = FunctionField(QQ) sage: R. = K[] sage: L. = K.extension(y^3 - (x^3 + 2*x*y + 1/x)) @@ -270,6 +275,7 @@ cdef class FunctionFieldElement(FieldElement): Test that substitution works for rational functions:: + sage: # needs sage.rings.function_field sage: K. = FunctionField(QQ) sage: R. = K[] sage: L. = K.extension(y^4 - 3) @@ -298,6 +304,7 @@ cdef class FunctionFieldElement(FieldElement): Same purpose as above but over an extension field over the rationals:: + sage: # needs sage.rings.function_field sage: K. = FunctionField(QQ) sage: R. = K[] sage: L. = K.extension(y^3 - (x^3 + 2*x*y + 1/x)) @@ -319,6 +326,7 @@ cdef class FunctionFieldElement(FieldElement): Test proper handling of not making substitutions:: + sage: # needs sage.rings.function_field sage: K. = FunctionField(QQ) sage: f = x sage: f.subs() is f @@ -357,6 +365,7 @@ cdef class FunctionFieldElement(FieldElement): Test error handling with ambiguously named generators:: + sage: # needs sage.rings.function_field sage: K. = FunctionField(QQ) sage: R. = K[] sage: L. = K.extension(x^3 - x) From f90093f45f7f928118ba9bc8df0eca8c148f80c5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 28 Sep 2024 10:12:08 -0700 Subject: [PATCH 55/96] src/sage/rings/polynomial/pbori: Add # sage.doctest file directives --- src/sage/rings/polynomial/pbori/PyPolyBoRi.py | 1 + src/sage/rings/polynomial/pbori/blocks.py | 1 + src/sage/rings/polynomial/pbori/cnf.py | 1 + src/sage/rings/polynomial/pbori/easy_polynomials.py | 1 + src/sage/rings/polynomial/pbori/fglm.py | 1 + src/sage/rings/polynomial/pbori/frontend.py | 1 + src/sage/rings/polynomial/pbori/gbcore.py | 1 + src/sage/rings/polynomial/pbori/gbrefs.py | 1 + src/sage/rings/polynomial/pbori/heuristics.py | 1 + src/sage/rings/polynomial/pbori/interpolate.py | 1 + src/sage/rings/polynomial/pbori/interred.py | 1 + src/sage/rings/polynomial/pbori/ll.py | 1 + src/sage/rings/polynomial/pbori/nf.py | 1 + src/sage/rings/polynomial/pbori/parallel.py | 1 + src/sage/rings/polynomial/pbori/pbori.pyx | 1 + src/sage/rings/polynomial/pbori/randompoly.py | 1 + src/sage/rings/polynomial/pbori/rank.py | 1 + src/sage/rings/polynomial/pbori/specialsets.py | 1 + src/sage/rings/polynomial/pbori/statistics.py | 1 + 19 files changed, 19 insertions(+) diff --git a/src/sage/rings/polynomial/pbori/PyPolyBoRi.py b/src/sage/rings/polynomial/pbori/PyPolyBoRi.py index 032ec85161c..193cab95cac 100644 --- a/src/sage/rings/polynomial/pbori/PyPolyBoRi.py +++ b/src/sage/rings/polynomial/pbori/PyPolyBoRi.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori r""" PolyBoRi's interface to libpolybori/BRiAL diff --git a/src/sage/rings/polynomial/pbori/blocks.py b/src/sage/rings/polynomial/pbori/blocks.py index 127cc826e58..4125d16f54b 100644 --- a/src/sage/rings/polynomial/pbori/blocks.py +++ b/src/sage/rings/polynomial/pbori/blocks.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori import sys from itertools import chain, islice diff --git a/src/sage/rings/polynomial/pbori/cnf.py b/src/sage/rings/polynomial/pbori/cnf.py index a38c998d9fd..f94a0687a82 100644 --- a/src/sage/rings/polynomial/pbori/cnf.py +++ b/src/sage/rings/polynomial/pbori/cnf.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from random import Random from sage.rings.polynomial.pbori.pbori import if_then_else as ite from .PyPolyBoRi import Polynomial diff --git a/src/sage/rings/polynomial/pbori/easy_polynomials.py b/src/sage/rings/polynomial/pbori/easy_polynomials.py index 0b24da41ded..e67cbc106b2 100644 --- a/src/sage/rings/polynomial/pbori/easy_polynomials.py +++ b/src/sage/rings/polynomial/pbori/easy_polynomials.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from .interpolate import variety_lex_leading_terms, nf_lex_points from .pbori import easy_linear_factors diff --git a/src/sage/rings/polynomial/pbori/fglm.py b/src/sage/rings/polynomial/pbori/fglm.py index f9e0d3a4fe4..7512c399728 100644 --- a/src/sage/rings/polynomial/pbori/fglm.py +++ b/src/sage/rings/polynomial/pbori/fglm.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from .pbori import BooleSet, FGLMStrategy from .PyPolyBoRi import BoolePolynomialVector, Polynomial diff --git a/src/sage/rings/polynomial/pbori/frontend.py b/src/sage/rings/polynomial/pbori/frontend.py index 94f03a44490..c09f1d2073d 100644 --- a/src/sage/rings/polynomial/pbori/frontend.py +++ b/src/sage/rings/polynomial/pbori/frontend.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori # Import basic functionality r""" This module defines an initial ring, and patches the declare_ring to use diff --git a/src/sage/rings/polynomial/pbori/gbcore.py b/src/sage/rings/polynomial/pbori/gbcore.py index 5f5a8437d10..666441a134e 100644 --- a/src/sage/rings/polynomial/pbori/gbcore.py +++ b/src/sage/rings/polynomial/pbori/gbcore.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori import contextlib from copy import copy from itertools import chain diff --git a/src/sage/rings/polynomial/pbori/gbrefs.py b/src/sage/rings/polynomial/pbori/gbrefs.py index 39b29af0baa..14f70fea32e 100644 --- a/src/sage/rings/polynomial/pbori/gbrefs.py +++ b/src/sage/rings/polynomial/pbori/gbrefs.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori import gzip from io import StringIO import base64 as uu diff --git a/src/sage/rings/polynomial/pbori/heuristics.py b/src/sage/rings/polynomial/pbori/heuristics.py index 053694a7ba2..30a4bb3b3a2 100644 --- a/src/sage/rings/polynomial/pbori/heuristics.py +++ b/src/sage/rings/polynomial/pbori/heuristics.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from .PyPolyBoRi import Polynomial, gauss_on_polys diff --git a/src/sage/rings/polynomial/pbori/interpolate.py b/src/sage/rings/polynomial/pbori/interpolate.py index 3136bf8eb3e..c370d6d9d4b 100644 --- a/src/sage/rings/polynomial/pbori/interpolate.py +++ b/src/sage/rings/polynomial/pbori/interpolate.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori # Copyright (c) 2005-2007 by The PolyBoRi Team from time import process_time as clock from random import Random diff --git a/src/sage/rings/polynomial/pbori/interred.py b/src/sage/rings/polynomial/pbori/interred.py index 712ddbbc890..ca997faf452 100644 --- a/src/sage/rings/polynomial/pbori/interred.py +++ b/src/sage/rings/polynomial/pbori/interred.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from .pbori import ReductionStrategy from .PyPolyBoRi import Polynomial diff --git a/src/sage/rings/polynomial/pbori/ll.py b/src/sage/rings/polynomial/pbori/ll.py index 76b45e9eb68..3e42a979a95 100644 --- a/src/sage/rings/polynomial/pbori/ll.py +++ b/src/sage/rings/polynomial/pbori/ll.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from .pbori import (top_index, if_then_else, substitute_variables, BooleSet, ll_red_nf_redsb, ll_red_nf_noredsb, diff --git a/src/sage/rings/polynomial/pbori/nf.py b/src/sage/rings/polynomial/pbori/nf.py index 3a5f26177df..f34d281e319 100644 --- a/src/sage/rings/polynomial/pbori/nf.py +++ b/src/sage/rings/polynomial/pbori/nf.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from sage.rings.polynomial.pbori.pbori import mod_mon_set from .pbori import (BooleSet, GroebnerStrategy, ReductionStrategy, parallel_reduce, easy_linear_factors) diff --git a/src/sage/rings/polynomial/pbori/parallel.py b/src/sage/rings/polynomial/pbori/parallel.py index 2ef6840b449..3c27ae5a52c 100644 --- a/src/sage/rings/polynomial/pbori/parallel.py +++ b/src/sage/rings/polynomial/pbori/parallel.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori r""" parallel.py PolyBoRi diff --git a/src/sage/rings/polynomial/pbori/pbori.pyx b/src/sage/rings/polynomial/pbori/pbori.pyx index 0a1eb3b12a8..6222711d56b 100644 --- a/src/sage/rings/polynomial/pbori/pbori.pyx +++ b/src/sage/rings/polynomial/pbori/pbori.pyx @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori # distutils: libraries = brial brial_groebner M4RI_LIBRARIES LIBPNG_LIBRARIES # distutils: library_dirs = M4RI_LIBDIR LIBPNG_LIBDIR # distutils: include_dirs = M4RI_INCDIR LIBPNG_INCDIR diff --git a/src/sage/rings/polynomial/pbori/randompoly.py b/src/sage/rings/polynomial/pbori/randompoly.py index c0aaf1079c8..350bd4198e5 100644 --- a/src/sage/rings/polynomial/pbori/randompoly.py +++ b/src/sage/rings/polynomial/pbori/randompoly.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from random import Random from pprint import pformat diff --git a/src/sage/rings/polynomial/pbori/rank.py b/src/sage/rings/polynomial/pbori/rank.py index 358311ba53f..0d2fb165b70 100644 --- a/src/sage/rings/polynomial/pbori/rank.py +++ b/src/sage/rings/polynomial/pbori/rank.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori def input_signals(p): return list((p + p.lex_lead()).vars_as_monomial().variables()) diff --git a/src/sage/rings/polynomial/pbori/specialsets.py b/src/sage/rings/polynomial/pbori/specialsets.py index bb6a4d806c9..5c97b84ebf1 100644 --- a/src/sage/rings/polynomial/pbori/specialsets.py +++ b/src/sage/rings/polynomial/pbori/specialsets.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from .pbori import (top_index, if_then_else, mod_mon_set, BooleSet, BooleConstant) from .PyPolyBoRi import (Polynomial, Monomial, Variable) diff --git a/src/sage/rings/polynomial/pbori/statistics.py b/src/sage/rings/polynomial/pbori/statistics.py index aa5a9660402..58991cd0b6a 100644 --- a/src/sage/rings/polynomial/pbori/statistics.py +++ b/src/sage/rings/polynomial/pbori/statistics.py @@ -1,4 +1,5 @@ # sage_setup: distribution = sagemath-brial +# sage.doctest: needs sage.rings.polynomial.pbori from .pbori import top_index, BooleConstant from .PyPolyBoRi import Monomial, Polynomial From 2afb99c53ec382631c51ee455bb5b2fdbf9192e0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 28 Sep 2024 16:18:40 -0700 Subject: [PATCH 56/96] src/sage/structure/sequence.py: Use more lazy_import --- src/sage/structure/sequence.py | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/src/sage/structure/sequence.py b/src/sage/structure/sequence.py index cc9fcedadfe..2da0c8c4265 100644 --- a/src/sage/structure/sequence.py +++ b/src/sage/structure/sequence.py @@ -70,10 +70,17 @@ # https://www.gnu.org/licenses/ # **************************************************************************** - import sage.structure.sage_object import sage.structure.coerce +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.rings.polynomial.multi_polynomial_ideal', 'MPolynomialIdeal') +lazy_import('sage.rings.polynomial.multi_polynomial_ring', 'MPolynomialRing_base') +lazy_import('sage.rings.polynomial.multi_polynomial_sequence', 'PolynomialSequence') +lazy_import('sage.rings.polynomial.pbori.pbori', 'BooleanMonomialMonoid') +lazy_import('sage.rings.quotient_ring', 'QuotientRing_nc') + def Sequence(x, universe=None, check=True, immutable=False, cr=False, cr_str=None, use_sage_types=False): """ @@ -215,14 +222,9 @@ def Sequence(x, universe=None, check=True, immutable=False, cr=False, cr_str=Non universe = x.universe() x = list(x) else: - try: - from sage.rings.polynomial.multi_polynomial_ideal import MPolynomialIdeal - except ImportError: - pass - else: - if isinstance(x, MPolynomialIdeal): - universe = x.ring() - x = x.gens() + if isinstance(x, MPolynomialIdeal): + universe = x.ring() + x = x.gens() if universe is None: orig_x = x @@ -249,16 +251,8 @@ def Sequence(x, universe=None, check=True, immutable=False, cr=False, cr_str=Non if universe is None: # no type errors raised. universe = sage.structure.element.parent(x[len(x)-1]) - try: - from sage.rings.polynomial.multi_polynomial_sequence import PolynomialSequence - from sage.rings.polynomial.pbori.pbori import BooleanMonomialMonoid - from sage.rings.polynomial.multi_polynomial_ring import MPolynomialRing_base - from sage.rings.quotient_ring import QuotientRing_nc - except ImportError: - pass - else: - if isinstance(universe, MPolynomialRing_base) or isinstance(universe, BooleanMonomialMonoid) or (isinstance(universe, QuotientRing_nc) and isinstance(universe.cover_ring(), MPolynomialRing_base)): - return PolynomialSequence(x, universe, immutable=immutable, cr=cr, cr_str=cr_str) + if isinstance(universe, (MPolynomialRing_base, BooleanMonomialMonoid)) or (isinstance(universe, QuotientRing_nc) and isinstance(universe.cover_ring(), MPolynomialRing_base)): + return PolynomialSequence(x, universe, immutable=immutable, cr=cr, cr_str=cr_str) return Sequence_generic(x, universe, check, immutable, cr, cr_str, use_sage_types) From 8f00816eb7a00657ad3b42f18ed9f82d3ef9e7c9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 28 Sep 2024 16:21:27 -0700 Subject: [PATCH 57/96] src/sage/crypto/mq/sr.py: Add # needs --- src/sage/crypto/mq/sr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/crypto/mq/sr.py b/src/sage/crypto/mq/sr.py index 2ea8ee58c32..e71ac81cbe2 100644 --- a/src/sage/crypto/mq/sr.py +++ b/src/sage/crypto/mq/sr.py @@ -3318,7 +3318,7 @@ def test_consistency(max_n=2, **kwargs): has a more reasonable memory usage. :: sage: from sage.crypto.mq.sr import test_consistency - sage: test_consistency(1) # long time (65s on sage.math, 2012) + sage: test_consistency(1) # needs sage.rings.polynomial.pbori, long time (65s on sage.math, 2012) True """ consistent = True From e06bcf398125f0fc0d50db7ebe2c7feaa3953b66 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 28 Sep 2024 17:17:45 -0700 Subject: [PATCH 58/96] src/sage/rings/polynomial/multi_polynomial_libsingular.pyx: Add # needs --- src/sage/rings/polynomial/multi_polynomial_libsingular.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx index d177889bd6e..c2996653231 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx @@ -658,9 +658,9 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): Coercion from boolean polynomials, also by index:: - sage: B. = BooleanPolynomialRing(3) - sage: P. = QQ[] - sage: P(B.gen(0)) + sage: B. = BooleanPolynomialRing(3) # needs sage.rings.polynomial.pbori + sage: P. = QQ[] # needs sage.rings.polynomial.pbori + sage: P(B.gen(0)) # needs sage.rings.polynomial.pbori x If everything else fails, we try to convert to the base ring:: From 581bd4779554b20a271d81f3f6db9b39df677ede Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 28 Sep 2024 17:55:46 -0700 Subject: [PATCH 59/96] src/doc/en/reference/sat/index.rst: Add # needs --- src/doc/en/reference/sat/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/doc/en/reference/sat/index.rst b/src/doc/en/reference/sat/index.rst index c0cfb22f855..70ce91380b6 100644 --- a/src/doc/en/reference/sat/index.rst +++ b/src/doc/en/reference/sat/index.rst @@ -96,6 +96,7 @@ Converters Sage supports conversion from Boolean polynomials (also known as Algebraic Normal Form) to Conjunctive Normal Form:: + sage: # needs sage.rings.polynomial.pbori sage: B. = BooleanPolynomialRing() sage: from sage.sat.converters.polybori import CNFEncoder sage: from sage.sat.solvers.dimacs import DIMACS @@ -123,6 +124,7 @@ Highlevel Interfaces Sage provides various highlevel functions which make working with Boolean polynomials easier. We construct a very small-scale AES system of equations and pass it to a SAT solver:: + sage: # needs sage.rings.polynomial.pbori sage: sr = mq.SR(1,1,1,4,gf2=True,polybori=True) sage: while True: ....: try: From 0a400bfe7af2e32bffaddb1bcfaca98ef00bb6b3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 28 Sep 2024 18:25:08 -0700 Subject: [PATCH 60/96] src/sage/misc/citation.pyx: Recognize pbori use from a compiled module --- src/sage/misc/citation.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/misc/citation.pyx b/src/sage/misc/citation.pyx index fbe932ba49a..60ed09dbfa2 100644 --- a/src/sage/misc/citation.pyx +++ b/src/sage/misc/citation.pyx @@ -44,7 +44,7 @@ systems['MPFI'] = ['sage.rings.real_mpfi', 'sage.rings.complex_interval'] systems['M4RI'] = ['sage.matrix.matrix_mod2_dense'] systems['Givaro'] = ['sage.rings.finite_rings.element_givaro'] -systems['PolyBoRi'] = ['sage.rings.polynomial.pbori'] +systems['PolyBoRi'] = ['sage.rings.polynomial.pbori.pbori'] def get_systems(cmd): From 876fa673631448a6812715f4f2992e3630dc4933 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 1 Oct 2024 17:52:52 -0700 Subject: [PATCH 61/96] src/sage/sets/disjoint_set.pyx: Use LazyImport --- src/sage/sets/disjoint_set.pyx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sage/sets/disjoint_set.pyx b/src/sage/sets/disjoint_set.pyx index 7a832104295..ddd9a95a310 100644 --- a/src/sage/sets/disjoint_set.pyx +++ b/src/sage/sets/disjoint_set.pyx @@ -62,7 +62,10 @@ from sage.rings.integer cimport Integer from sage.structure.sage_object cimport SageObject from cpython.object cimport PyObject_RichCompare from sage.groups.perm_gps.partn_ref.data_structures cimport * -from sage.combinat.set_partition import SetPartition +from sage.misc.lazy_import import LazyImport + +SetPartition = LazyImport('sage.combinat.set_partition', 'SetPartition') + cpdef DisjointSet(arg): r""" From 462d20dfb418d00860c307a149d2aa9aa4cba840 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:15:11 -0700 Subject: [PATCH 62/96] src/sage/rings/power_series_ring.py: Use lazy_import --- src/sage/rings/power_series_ring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/power_series_ring.py b/src/sage/rings/power_series_ring.py index e6c932aadff..4d53fe62dc5 100644 --- a/src/sage/rings/power_series_ring.py +++ b/src/sage/rings/power_series_ring.py @@ -175,6 +175,7 @@ LaurentSeriesRing = () LaurentSeries = () +lazy_import('sage.rings.lazy_series', 'LazyPowerSeries') lazy_import('sage.rings.lazy_series_ring', 'LazyPowerSeriesRing') @@ -853,7 +854,6 @@ def _element_constructor_(self, f, prec=infinity, check=True): else: raise TypeError("Can only convert series into ring with same variable name.") else: - from sage.rings.lazy_series import LazyPowerSeries if isinstance(f, LazyPowerSeries): if prec is infinity: try: From ac4af7c33cb49bcb178e2a0bc7938fcbce878c4a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:15:26 -0700 Subject: [PATCH 63/96] src/sage/schemes/generic/scheme.py: Use lazy_import --- src/sage/schemes/generic/scheme.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sage/schemes/generic/scheme.py b/src/sage/schemes/generic/scheme.py index 5cae30dae3a..102d6253da6 100755 --- a/src/sage/schemes/generic/scheme.py +++ b/src/sage/schemes/generic/scheme.py @@ -330,8 +330,7 @@ def point(self, v, check=True): (0 : 0 : 1) """ # todo: update elliptic curve stuff to take point_homset as argument - from sage.schemes.elliptic_curves.ell_generic import EllipticCurve_generic - if isinstance(self, EllipticCurve_generic): + if isinstance(self, EllipticCurve): try: return self._point(self.point_homset(), v, check=check) except AttributeError: # legacy code without point_homset From cbd47059bb62b1e9ed230acf7c2110e16f667f8e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:15:42 -0700 Subject: [PATCH 64/96] src/sage/structure/parent.pyx: Add # needs --- src/sage/structure/parent.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/structure/parent.pyx b/src/sage/structure/parent.pyx index 8e8940b5846..5bdade7eae2 100644 --- a/src/sage/structure/parent.pyx +++ b/src/sage/structure/parent.pyx @@ -1151,9 +1151,9 @@ cdef class Parent(sage.structure.category_object.CategoryObject): Check that :issue:`32078` is fixed:: sage: P = Frac(ZZ['x,y']) - sage: P(1) in ZZ + sage: P(1) in ZZ # needs sage.libs.singular True - sage: P(1/2) in ZZ + sage: P(1/2) in ZZ # needs sage.libs.singular False Check that :issue:`24209` is fixed:: @@ -2644,6 +2644,7 @@ cdef class Parent(sage.structure.category_object.CategoryObject): on elliptic curves over Finite Fields, was not used if an ``int`` multiplied a point, resulting in a 10x slowdown for large characteristic:: + sage: # needs sage.schemes sage: E = EllipticCurve(GF(17),[1,1]) sage: coercion_model.discover_action(ZZ, E, operator.mul) Left action by Integer Ring on Elliptic Curve defined by y^2 = x^3 + x + 1 over Finite Field of size 17 From 76a11378bc10f3c71f44c6c7b4bdda6035718375 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:23:31 -0700 Subject: [PATCH 65/96] ./sage --fixdoctests --distribution sagemath-categories --update-known-test-failures --- .../known-test-failures.json | 59 ++++++++----------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index 7141993def5..974fd6f5212 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -29,6 +29,7 @@ "ntests": 9 }, "sage.categories.additive_magmas": { + "failed": true, "ntests": 134 }, "sage.categories.additive_monoids": { @@ -120,11 +121,9 @@ "ntests": 7 }, "sage.categories.commutative_rings": { - "failed": true, "ntests": 80 }, "sage.categories.complete_discrete_valuation": { - "failed": true, "ntests": 30 }, "sage.categories.complex_reflection_groups": { @@ -170,7 +169,6 @@ "ntests": 1 }, "sage.categories.enumerated_sets": { - "failed": true, "ntests": 132 }, "sage.categories.euclidean_domains": { @@ -676,7 +674,6 @@ "ntests": 28 }, "sage.combinat.combinat": { - "failed": true, "ntests": 236 }, "sage.combinat.combinat_cython": { @@ -718,7 +715,7 @@ }, "sage.combinat.permutation": { "failed": true, - "ntests": 1202 + "ntests": 1206 }, "sage.combinat.permutation_cython": { "ntests": 39 @@ -727,7 +724,7 @@ "ntests": 48 }, "sage.combinat.subset": { - "ntests": 280 + "ntests": 281 }, "sage.combinat.subsets_hereditary": { "ntests": 7 @@ -780,13 +777,16 @@ "sage.data_structures.mutable_poset": { "ntests": 441 }, + "sage.doctest.__main__": { + "ntests": 9 + }, "sage.doctest.check_tolerance": { "failed": true, "ntests": 19 }, "sage.doctest.control": { "failed": true, - "ntests": 230 + "ntests": 229 }, "sage.doctest.external": { "ntests": 42 @@ -880,6 +880,9 @@ "sage.features.gfan": { "ntests": 2 }, + "sage.features.giac": { + "ntests": 4 + }, "sage.features.graph_generators": { "ntests": 18 }, @@ -960,7 +963,7 @@ "ntests": 28 }, "sage.features.sagemath": { - "ntests": 157 + "ntests": 161 }, "sage.features.sat": { "ntests": 16 @@ -1010,7 +1013,7 @@ "ntests": 81 }, "sage.functions.hypergeometric": { - "ntests": 78 + "ntests": 79 }, "sage.functions.jacobi": { "ntests": 38 @@ -1246,7 +1249,6 @@ "ntests": 29 }, "sage.misc.parser": { - "failed": true, "ntests": 136 }, "sage.misc.persist": { @@ -1547,7 +1549,7 @@ "ntests": 34 }, "sage.rings.function_field.element": { - "ntests": 128 + "ntests": 148 }, "sage.rings.function_field.element_rational": { "ntests": 71 @@ -1647,11 +1649,11 @@ }, "sage.rings.multi_power_series_ring": { "failed": true, - "ntests": 227 + "ntests": 229 }, "sage.rings.multi_power_series_ring_element": { "failed": true, - "ntests": 425 + "ntests": 426 }, "sage.rings.number_field.number_field_base": { "ntests": 1 @@ -1697,14 +1699,14 @@ }, "sage.rings.polynomial.laurent_polynomial": { "failed": true, - "ntests": 414 + "ntests": 417 }, "sage.rings.polynomial.laurent_polynomial_ideal": { "ntests": 7 }, "sage.rings.polynomial.laurent_polynomial_ring": { "failed": true, - "ntests": 85 + "ntests": 87 }, "sage.rings.polynomial.laurent_polynomial_ring_base": { "ntests": 5 @@ -1715,7 +1717,7 @@ }, "sage.rings.polynomial.multi_polynomial_element": { "failed": true, - "ntests": 269 + "ntests": 274 }, "sage.rings.polynomial.multi_polynomial_ideal": { "ntests": 99 @@ -1726,23 +1728,22 @@ }, "sage.rings.polynomial.multi_polynomial_ring_base": { "failed": true, - "ntests": 227 + "ntests": 230 }, "sage.rings.polynomial.multi_polynomial_sequence": { "failed": true, "ntests": 135 }, "sage.rings.polynomial.polydict": { - "failed": true, "ntests": 396 }, "sage.rings.polynomial.polynomial_element": { "failed": true, - "ntests": 1868 + "ntests": 1869 }, "sage.rings.polynomial.polynomial_element_generic": { "failed": true, - "ntests": 193 + "ntests": 194 }, "sage.rings.polynomial.polynomial_quotient_ring": { "ntests": 36 @@ -1785,16 +1786,15 @@ "ntests": 24 }, "sage.rings.power_series_mpoly": { - "failed": true, "ntests": 4 }, "sage.rings.power_series_poly": { "failed": true, - "ntests": 256 + "ntests": 257 }, "sage.rings.power_series_ring": { "failed": true, - "ntests": 245 + "ntests": 247 }, "sage.rings.power_series_ring_element": { "failed": true, @@ -1914,11 +1914,9 @@ "ntests": 32 }, "sage.schemes.product_projective.homset": { - "failed": true, "ntests": 26 }, "sage.schemes.product_projective.morphism": { - "failed": true, "ntests": 99 }, "sage.schemes.product_projective.point": { @@ -1926,15 +1924,12 @@ "ntests": 111 }, "sage.schemes.product_projective.rational_point": { - "failed": true, "ntests": 25 }, "sage.schemes.product_projective.space": { - "failed": true, "ntests": 153 }, "sage.schemes.product_projective.subscheme": { - "failed": true, "ntests": 62 }, "sage.schemes.projective.proj_bdd_height": { @@ -1970,7 +1965,7 @@ }, "sage.sets.disjoint_set": { "failed": true, - "ntests": 252 + "ntests": 270 }, "sage.sets.disjoint_union_enumerated_sets": { "ntests": 61 @@ -1988,7 +1983,6 @@ "ntests": 86 }, "sage.sets.image_set": { - "failed": true, "ntests": 58 }, "sage.sets.integer_range": { @@ -2038,7 +2032,6 @@ "ntests": 289 }, "sage.structure.coerce_maps": { - "failed": true, "ntests": 90 }, "sage.structure.debug_options": { @@ -2094,12 +2087,10 @@ "ntests": 68 }, "sage.structure.nonexact": { - "failed": true, "ntests": 11 }, "sage.structure.parent": { - "failed": true, - "ntests": 303 + "ntests": 300 }, "sage.structure.parent_gens": { "ntests": 24 From 4a230cdf53da0730b6d99038021c20ff9baa430c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:48:35 -0700 Subject: [PATCH 66/96] src/sage/arith/misc.py: Add # needs --- src/sage/arith/misc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sage/arith/misc.py b/src/sage/arith/misc.py index 745d5fcbbe7..342a926eeaf 100644 --- a/src/sage/arith/misc.py +++ b/src/sage/arith/misc.py @@ -2733,7 +2733,7 @@ def factor(n, proof=None, int_=False, algorithm='pari', verbose=0, **kwds): Test that :issue:`35219` is fixed:: - sage: len(factor(2^2203-1,proof=false)) + sage: len(factor(2^2203 - 1, proof=false)) # needs sage.libs.pari 1 """ try: @@ -6392,6 +6392,7 @@ def smooth_part(x, base): EXAMPLES:: + sage: # needs sage.libs.pari sage: from sage.arith.misc import smooth_part sage: from sage.rings.generic import ProductTree sage: smooth_part(10^77+1, primes(1000)) @@ -6433,6 +6434,7 @@ def coprime_part(x, base): EXAMPLES:: + sage: # needs sage.libs.pari sage: from sage.arith.misc import coprime_part, smooth_part sage: from sage.rings.generic import ProductTree sage: coprime_part(10^77+1, primes(10000)) From 7ff4d2198c24af689875577319f57a56816cbdfd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:49:01 -0700 Subject: [PATCH 67/96] sage.categories: Add # needs --- src/sage/categories/modules_with_basis.py | 8 ++++++-- src/sage/categories/rings.py | 4 ++-- src/sage/categories/schemes.py | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 7b51d82c7ba..ec854b26c93 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -996,6 +996,7 @@ def intersection(self, other): EXAMPLES:: + sage: # needs sage.modules sage: X = CombinatorialFreeModule(QQ, range(4)); x = X.basis() sage: U = X.submodule([x[0]-x[1], x[1]-x[2], x[2]-x[3]]) sage: F = CombinatorialFreeModule(QQ, ['a','b','c','d']) @@ -1049,6 +1050,7 @@ def cardinality(self): sage: s.cardinality() # needs sage.combinat sage.modules +Infinity + sage: # needs sage.modules sage: M = CombinatorialFreeModule(QQ, []) sage: M.dimension() 0 @@ -1479,6 +1481,7 @@ def _test_monomial_coefficients(self, **options): By default, this method tests only the elements returned by ``self.some_elements()``:: + sage: # needs sage.modules sage: A = AlgebrasWithBasis(QQ).example(); A An example of an algebra with basis: the free algebra on the generators ('a', 'b', 'c') over Rational Field @@ -2142,6 +2145,7 @@ def map_coefficients(self, f, new_base_ring=None): We can map into a different base ring:: + sage: # needs sage.modules sage: F = CombinatorialFreeModule(QQ, ['a','b','c']) sage: B = F.basis() sage: a = 1/2*(B['a'] + 3*B['c']); a @@ -2158,9 +2162,9 @@ def map_coefficients(self, f, new_base_ring=None): Coefficients are converted to the new base ring after applying the map:: - sage: B['a'].map_coefficients(lambda c: 2*c, GF(2)) + sage: B['a'].map_coefficients(lambda c: 2*c, GF(2)) # needs sage.modules 0 - sage: B['a'].map_coefficients(lambda c: GF(2)(c), QQ) + sage: B['a'].map_coefficients(lambda c: GF(2)(c), QQ) # needs sage.modules B['a'] """ R = self.parent() diff --git a/src/sage/categories/rings.py b/src/sage/categories/rings.py index 781f1a1462b..82d30fcab04 100644 --- a/src/sage/categories/rings.py +++ b/src/sage/categories/rings.py @@ -1496,8 +1496,8 @@ def _random_nonzero_element(self, *args, **kwds): sage: ZZ._random_nonzero_element() != 0 True - sage: A = GF((5, 3)) - sage: A._random_nonzero_element() != 0 + sage: A = GF((5, 3)) # needs sage.rings.finite_rings + sage: A._random_nonzero_element() != 0 # needs sage.rings.finite_rings True """ while True: diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index 68187fa2257..b9fc30408dd 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -282,6 +282,7 @@ def extra_super_categories(self): EXAMPLES:: + sage: # needs sage.schemes sage: Hom(EllipticCurve(j=1), EllipticCurve(j=2)) in CommutativeAdditiveGroups() True """ @@ -301,6 +302,7 @@ def extra_super_categories(self): EXAMPLES:: + sage: # needs sage.schemes sage: End(EllipticCurve(j=1)) in Rings() True """ From 93edb68660a115c2fc4c36e320cbaf16743416b0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:49:22 -0700 Subject: [PATCH 68/96] sage.combinat: Add # needs --- src/sage/combinat/composition.py | 4 ++-- src/sage/combinat/permutation.py | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/sage/combinat/composition.py b/src/sage/combinat/composition.py index 173590cfd74..e06aa5830f5 100644 --- a/src/sage/combinat/composition.py +++ b/src/sage/combinat/composition.py @@ -1775,9 +1775,9 @@ def _element_constructor_(self, lst) -> Composition: EXAMPLES:: sage: P = Compositions() - sage: P([3,3,1]) # indirect doctest + sage: P([3,3,1]) # indirect doctest [3, 3, 1] - sage: P(Partition([5,2,1])) + sage: P(Partition([5,2,1])) # needs sage.combinat [5, 2, 1] """ # input can be an iterator, and one has to use it twice diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index eb66ed3e383..faea652244d 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -394,6 +394,7 @@ class Permutation(CombinatorialElement): Generate permutations using the Steinhaus-Johnson Trotter algorithm. The output is not in lexicographic order:: + sage: # needs sage.combinat sage: p = Permutation([1, 2, 3, 4], algorithm='sjt'); p [1, 2, 3, 4] sage: p = p.next(); p @@ -405,7 +406,6 @@ class Permutation(CombinatorialElement): ....: p = p.next() sage: p False - sage: Permutation([1, 3, 2, 4], algorithm='sjt') Traceback (most recent call last): ... @@ -575,13 +575,13 @@ def __init__(self, parent, l, algorithm='lex', sjt=None, check=True): 5. Some element may be repeated, or an element is missing, but there is something wrong with its length. - sage: Permutation([1, 3, 2], algorithm='sjt') + sage: Permutation([1, 3, 2], algorithm='sjt') # needs sage.combinat Traceback (most recent call last): ... ValueError: no internal state directions were given for non-identity starting permutation for Steinhaus-Johnson-Trotter algorithm - sage: Permutation([1, 3, 2], algorithm='sjt', check=False) + sage: Permutation([1, 3, 2], algorithm='sjt', check=False) # needs sage.combinat Traceback (most recent call last): ... ValueError: no internal state directions were given for non-identity @@ -800,7 +800,7 @@ def order(self) -> Integer: EXAMPLES:: sage: sigma = Permutation([3,4,1,2,5]) - sage: sigma.order() + sage: sigma.order() # needs sage.combinat 2 sage: sigma * sigma [1, 2, 3, 4, 5] @@ -854,10 +854,10 @@ def __next__(self): sage: p = Permutation([4,3,2,1]) sage: next(p) False - sage: p = Permutation([1, 2, 3], algorithm='sjt') - sage: p = next(p); p + sage: p = Permutation([1, 2, 3], algorithm='sjt') # needs sage.combinat + sage: p = next(p); p # needs sage.combinat [1, 3, 2] - sage: p = next(p); p + sage: p = next(p); p # needs sage.combinat [3, 1, 2] TESTS:: @@ -865,6 +865,8 @@ def __next__(self): sage: p = Permutation([]) sage: next(p) False + + sage: # needs sage.combinat sage: p = Permutation([], algorithm='sjt') sage: next(p) False @@ -944,8 +946,8 @@ def prev(self): sage: p.prev() False - sage: p = Permutation([1,2,3], algorithm='sjt') - sage: p.prev() + sage: p = Permutation([1,2,3], algorithm='sjt') # needs sage.combinat + sage: p.prev() # needs sage.combinat Traceback (most recent call last): ... NotImplementedError: previous permutation for SJT algorithm is not @@ -7197,6 +7199,7 @@ def _element_constructor_(self, x, check=True): Ensure that :issue:`37284` is fixed:: + sage: # needs sage.groups sage: PG = PermutationGroup([[(1,2,3),(5,6)],[(7,8)]]) sage: P8 = Permutations(8) sage: p = PG.an_element() From d1c0adfce3941a4ee6f200fb357206c28dcb6822 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:49:54 -0700 Subject: [PATCH 69/96] src/sage/doctest/util.py: Add # needs --- src/sage/doctest/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/doctest/util.py b/src/sage/doctest/util.py index 6bffb67156b..e51d8fc36ff 100644 --- a/src/sage/doctest/util.py +++ b/src/sage/doctest/util.py @@ -145,6 +145,7 @@ def annotate(self, object): EXAMPLES:: + sage: # needs sage.schemes sage: from sage.doctest.util import Timer sage: Timer().start().annotate(EllipticCurve) sage: EllipticCurve.cputime # random From 6c3067dae58dfd794149183519178a1bbba6cb6b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:50:04 -0700 Subject: [PATCH 70/96] src/sage/groups/generic.py: Add # needs --- src/sage/groups/generic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py index 69acc7c654d..668f754869e 100644 --- a/src/sage/groups/generic.py +++ b/src/sage/groups/generic.py @@ -1450,6 +1450,8 @@ def has_order(P, n, operation='+'): EXAMPLES:: sage: from sage.groups.generic import has_order + + sage: # needs sage.schemes sage: E.

= EllipticCurve(GF(71), [5,5]) sage: P.order() 57 From 84e32529a976d97511ffa27d4f4f723e7bceef12 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:50:25 -0700 Subject: [PATCH 71/96] src/sage/rings/function_field/jacobian_*.py: Add # needs --- src/sage/rings/function_field/jacobian_base.py | 1 + src/sage/rings/function_field/jacobian_hess.py | 1 + src/sage/rings/function_field/jacobian_khuri_makdisi.py | 1 + 3 files changed, 3 insertions(+) diff --git a/src/sage/rings/function_field/jacobian_base.py b/src/sage/rings/function_field/jacobian_base.py index 405d90bfc3f..f225b7bc96f 100644 --- a/src/sage/rings/function_field/jacobian_base.py +++ b/src/sage/rings/function_field/jacobian_base.py @@ -1,3 +1,4 @@ +# sage.doctest: needs sage.schemes r""" Jacobians of function fields diff --git a/src/sage/rings/function_field/jacobian_hess.py b/src/sage/rings/function_field/jacobian_hess.py index a85bc10e256..2e5923e3de6 100644 --- a/src/sage/rings/function_field/jacobian_hess.py +++ b/src/sage/rings/function_field/jacobian_hess.py @@ -1,3 +1,4 @@ +# sage.doctest: needs sage.schemes r""" Jacobians in Hess model diff --git a/src/sage/rings/function_field/jacobian_khuri_makdisi.py b/src/sage/rings/function_field/jacobian_khuri_makdisi.py index 2c9a2e5da97..a9c743e10f8 100644 --- a/src/sage/rings/function_field/jacobian_khuri_makdisi.py +++ b/src/sage/rings/function_field/jacobian_khuri_makdisi.py @@ -1,3 +1,4 @@ +# sage.doctest: needs sage.schemes r""" Jacobians in Khuri-Makdisi model From 697ac5b23f69363d84f5e87c57be3eeacb0c23aa Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:50:45 -0700 Subject: [PATCH 72/96] sage.rings: Modularization fixes (imports) --- src/sage/rings/laurent_series_ring.py | 2 +- src/sage/rings/morphism.pyx | 16 ++++++++++------ src/sage/rings/multi_power_series_ring.py | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/sage/rings/laurent_series_ring.py b/src/sage/rings/laurent_series_ring.py index 2142f717460..c95230c5572 100644 --- a/src/sage/rings/laurent_series_ring.py +++ b/src/sage/rings/laurent_series_ring.py @@ -51,6 +51,7 @@ pari_gen = () lazy_import('sage.rings.polynomial.laurent_polynomial_ring_base', 'LaurentPolynomialRing_generic') +lazy_import('sage.rings.lazy_series', ['LazyPowerSeries', 'LazyLaurentSeries']) lazy_import('sage.rings.lazy_series_ring', ('LazyPowerSeriesRing', 'LazyLaurentSeriesRing')) lazy_import('sage.rings.polynomial.polynomial_ring', 'PolynomialRing_general') lazy_import('sage.rings.power_series_ring', 'PowerSeriesRing_generic') @@ -517,7 +518,6 @@ def _element_constructor_(self, x, n=0, prec=infinity): x^-3 """ from sage.rings.fraction_field_element import FractionFieldElement - from sage.rings.lazy_series import LazyPowerSeries, LazyLaurentSeries from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.rings.polynomial.polynomial_element import Polynomial from sage.structure.element import parent diff --git a/src/sage/rings/morphism.pyx b/src/sage/rings/morphism.pyx index 594e2ff0a3e..8d68fe16a64 100644 --- a/src/sage/rings/morphism.pyx +++ b/src/sage/rings/morphism.pyx @@ -873,12 +873,16 @@ cdef class RingHomomorphism(RingMap): return homset([self(g) for g in right.im_gens()], **kwds) except ValueError: pass - from sage.rings.number_field.morphism import RelativeNumberFieldHomomorphism_from_abs - if isinstance(right, RelativeNumberFieldHomomorphism_from_abs): - try: - return homset(self*right.abs_hom()) - except ValueError: - pass + try: + from sage.rings.number_field.morphism import RelativeNumberFieldHomomorphism_from_abs + except ImportError: + pass + else: + if isinstance(right, RelativeNumberFieldHomomorphism_from_abs): + try: + return homset(self*right.abs_hom()) + except ValueError: + pass return sage.categories.map.Map._composition_(self, right, homset) def pushforward(self, I): diff --git a/src/sage/rings/multi_power_series_ring.py b/src/sage/rings/multi_power_series_ring.py index 35c4d4beb32..e65d9396778 100644 --- a/src/sage/rings/multi_power_series_ring.py +++ b/src/sage/rings/multi_power_series_ring.py @@ -227,6 +227,7 @@ except ImportError: LaurentSeriesRing = () +lazy_import('sage.rings.lazy_series', 'LazyPowerSeries') lazy_import('sage.rings.lazy_series_ring', ('LazyPowerSeriesRing', 'LazyLaurentSeriesRing')) @@ -881,7 +882,6 @@ def _element_constructor_(self, f, prec=None): prec = f.prec() except AttributeError: prec = infinity - from sage.rings.lazy_series import LazyPowerSeries if isinstance(f, LazyPowerSeries): if prec is infinity: try: From 9641879ce04d79b52dc9fa76e1e9689577a34ec9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 14:58:54 -0700 Subject: [PATCH 73/96] ./sage --fixdoctests --distribution sagemath-categories --update-known-test-failures --- .../known-test-failures.json | 36 ++++--------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index 974fd6f5212..b9b1597f324 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -5,7 +5,7 @@ }, "sage.arith.misc": { "failed": true, - "ntests": 932 + "ntests": 919 }, "sage.arith.numerical_approx": { "ntests": 1 @@ -242,7 +242,6 @@ "ntests": 47 }, "sage.categories.examples.sets_with_grading": { - "failed": true, "ntests": 14 }, "sage.categories.facade_sets": { @@ -416,7 +415,6 @@ "ntests": 16 }, "sage.categories.homset": { - "failed": true, "ntests": 197 }, "sage.categories.homsets": { @@ -506,8 +504,7 @@ "ntests": 120 }, "sage.categories.modules_with_basis": { - "failed": true, - "ntests": 242 + "ntests": 223 }, "sage.categories.monoid_algebras": { "ntests": 4 @@ -581,15 +578,13 @@ "ntests": 9 }, "sage.categories.rings": { - "failed": true, "ntests": 173 }, "sage.categories.rngs": { "ntests": 6 }, "sage.categories.schemes": { - "failed": true, - "ntests": 41 + "ntests": 39 }, "sage.categories.semigroups": { "ntests": 112 @@ -686,7 +681,6 @@ "ntests": 75 }, "sage.combinat.composition": { - "failed": true, "ntests": 287 }, "sage.combinat.dlx": { @@ -714,8 +708,7 @@ "ntests": 9 }, "sage.combinat.permutation": { - "failed": true, - "ntests": 1206 + "ntests": 1184 }, "sage.combinat.permutation_cython": { "ntests": 39 @@ -820,8 +813,7 @@ "ntests": 23 }, "sage.doctest.util": { - "failed": true, - "ntests": 141 + "ntests": 137 }, "sage.env": { "failed": true, @@ -1057,7 +1049,7 @@ }, "sage.groups.generic": { "failed": true, - "ntests": 127 + "ntests": 120 }, "sage.groups.group": { "failed": true, @@ -1491,7 +1483,6 @@ "ntests": 91 }, "sage.rings.big_oh": { - "failed": true, "ntests": 22 }, "sage.rings.continued_fraction": { @@ -1572,18 +1563,6 @@ "sage.rings.function_field.ideal_rational": { "ntests": 82 }, - "sage.rings.function_field.jacobian_base": { - "failed": true, - "ntests": 208 - }, - "sage.rings.function_field.jacobian_hess": { - "failed": true, - "ntests": 248 - }, - "sage.rings.function_field.jacobian_khuri_makdisi": { - "failed": true, - "ntests": 272 - }, "sage.rings.function_field.maps": { "ntests": 55 }, @@ -1611,7 +1590,6 @@ "ntests": 37 }, "sage.rings.ideal": { - "failed": true, "ntests": 336 }, "sage.rings.ideal_monoid": { @@ -1801,11 +1779,9 @@ "ntests": 471 }, "sage.rings.puiseux_series_ring": { - "failed": true, "ntests": 72 }, "sage.rings.puiseux_series_ring_element": { - "failed": true, "ntests": 198 }, "sage.rings.quotient_ring": { From f562919623d04bf503f0918ae11a2ed88d1c5b04 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 15:38:16 -0700 Subject: [PATCH 74/96] sage.groups: Add # needs --- src/sage/groups/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py index 668f754869e..4b7e1c5e69e 100644 --- a/src/sage/groups/generic.py +++ b/src/sage/groups/generic.py @@ -1470,7 +1470,7 @@ def has_order(P, n, operation='+'): sage: R = Zmod(14981) sage: g = R(321) - sage: g.multiplicative_order() + sage: g.multiplicative_order() # needs sage.libs.pari 42 sage: has_order(g, 42, operation='*') True From 75f7fc7420351a5604b082343ccbaac21ed9cb98 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 15:38:27 -0700 Subject: [PATCH 75/96] sage.modules: Add # needs --- src/sage/modules/module.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/modules/module.pyx b/src/sage/modules/module.pyx index 1ca79818c26..f4921ccb31c 100644 --- a/src/sage/modules/module.pyx +++ b/src/sage/modules/module.pyx @@ -276,15 +276,15 @@ def is_Module(x): EXAMPLES:: sage: from sage.modules.module import is_Module - sage: M = FreeModule(RationalField(),30) # needs sage.modules - sage: is_Module(M) # needs sage.modules + sage: is_Module(10) doctest:warning... DeprecationWarning: the function is_Module is deprecated; use 'isinstance(..., Module)' instead See https://github.com/sagemath/sage/issues/37924 for details. - True - sage: is_Module(10) False + sage: M = FreeModule(RationalField(),30) # needs sage.modules + sage: is_Module(M) # needs sage.modules + True """ from sage.misc.superseded import deprecation_cython deprecation_cython(37924, "the function is_Module is deprecated; use 'isinstance(..., Module)' instead") From 52203c239e76649770ed8749a3f7c6ea4ad60757 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 15:38:47 -0700 Subject: [PATCH 76/96] sage.rings.function_field: Add # needs --- src/sage/rings/function_field/function_field.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/function_field.py b/src/sage/rings/function_field/function_field.py index 401b2144be9..b13a7414f27 100644 --- a/src/sage/rings/function_field/function_field.py +++ b/src/sage/rings/function_field/function_field.py @@ -1257,6 +1257,7 @@ def hilbert_symbol(self, a, b, P): EXAMPLES:: + sage: # needs sage.libs.pari sage: K. = FunctionField(GF(17)) sage: P = K.places()[0]; P Place (1/x) @@ -1264,7 +1265,6 @@ def hilbert_symbol(self, a, b, P): sage: b = 7/x sage: K.hilbert_symbol(a, b, P) -1 - sage: Q = K.places()[7]; Q Place (x + 6) sage: c = 15*x + 12 @@ -1274,6 +1274,7 @@ def hilbert_symbol(self, a, b, P): Check that the Hilbert symbol is symmetric and bimultiplicative:: + sage: # needs sage.libs.pari sage: K. = FunctionField(GF(5)); R. = PolynomialRing(K) sage: f = ((x^2 + 2*x + 2)*T^5 + (4*x^2 + 2*x + 3)*T^4 + 3*T^3 + 4*T^2 ....: + (2/(x^2 + 4*x + 1))*T + 3*x^2 + 2*x + 4) @@ -1283,7 +1284,6 @@ def hilbert_symbol(self, a, b, P): sage: c = L.random_element() sage: P = L.places_above(K.places()[0])[1] sage: Q = L.places_above(K.places()[1])[0] - sage: hP_a_c = L.hilbert_symbol(a, c, P) sage: hP_a_c == L.hilbert_symbol(c, a, P) True @@ -1291,7 +1291,6 @@ def hilbert_symbol(self, a, b, P): True sage: hP_a_c * L.hilbert_symbol(b, c, P) == L.hilbert_symbol(a*b, c, P) True - sage: hQ_a_c = L.hilbert_symbol(a, c, Q) sage: hQ_a_c == L.hilbert_symbol(c, a, Q) True @@ -1397,6 +1396,7 @@ def jacobian(self, model=None, base_div=None, **kwds): EXAMPLES:: + sage: # needs sage.schemes sage: A. = AffineSpace(GF(5), 2) sage: C = Curve(y^2*(x^3 - 1) - (x^3 - 2)) sage: F = C.function_field() @@ -1405,6 +1405,7 @@ def jacobian(self, model=None, base_div=None, **kwds): TESTS: + sage: # needs sage.schemes sage: A. = AffineSpace(QQ, 2) sage: C = Curve(y^2 - x^3 - 1, A).projective_closure() sage: C.jacobian(model='hess') From d0eed9892e5edecbd4fc090ba417a3c624d0f050 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 15:39:11 -0700 Subject: [PATCH 77/96] src/sage/rings/generic.py: Add # needs --- src/sage/rings/generic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/rings/generic.py b/src/sage/rings/generic.py index bfcb1d2bc50..bc133ae4cb7 100644 --- a/src/sage/rings/generic.py +++ b/src/sage/rings/generic.py @@ -223,6 +223,7 @@ def interpolation(self, xs): EXAMPLES:: + sage: # needs sage.libs.pari sage: from sage.rings.generic import ProductTree sage: vs = prime_range(100) sage: tree = ProductTree(vs) @@ -232,6 +233,7 @@ def interpolation(self, xs): This method is faster than :func:`CRT` for repeated calls with the same moduli:: + sage: # needs sage.libs.pari sage: vs = prime_range(1000,2000) sage: rs = lambda: [randrange(1,100) for _ in vs] sage: tree = ProductTree(vs) From ff5e5b07850657688693a0a4efd7a25c0a996ca6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 15:40:14 -0700 Subject: [PATCH 78/96] sage.rings: Add # needs --- src/sage/rings/laurent_series_ring_element.pyx | 9 +++++++++ src/sage/rings/localization.py | 6 +++--- src/sage/rings/multi_power_series_ring.py | 3 +++ src/sage/rings/polynomial/infinite_polynomial_ring.py | 1 + src/sage/rings/polynomial/polynomial_element_generic.py | 4 ++-- src/sage/rings/polynomial/polynomial_ring.py | 2 +- src/sage/rings/polynomial/toy_variety.py | 2 +- src/sage/rings/power_series_ring.py | 5 ++++- src/sage/rings/quotient_ring.py | 4 ++-- src/sage/rings/semirings/tropical_mpolynomial.py | 1 + src/sage/rings/semirings/tropical_polynomial.py | 1 + src/sage/rings/semirings/tropical_variety.py | 1 + 12 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/sage/rings/laurent_series_ring_element.pyx b/src/sage/rings/laurent_series_ring_element.pyx index 405752c6191..b059d2dd3f0 100644 --- a/src/sage/rings/laurent_series_ring_element.pyx +++ b/src/sage/rings/laurent_series_ring_element.pyx @@ -1413,6 +1413,7 @@ cdef class LaurentSeries(AlgebraElement): EXAMPLES:: + sage: # needs sage.libs.pari sage: R. = Frac(QQ[['x']]) sage: f = 2*x + 3*x^2 - x^4 + O(x^5) sage: g = f.reverse() @@ -1423,6 +1424,7 @@ cdef class LaurentSeries(AlgebraElement): sage: g(f) x + O(x^5) + sage: # needs sage.libs.pari sage: A. = LaurentSeriesRing(ZZ) sage: a = t - t^2 - 2*t^4 + t^5 + O(t^6) sage: b = a.reverse(); b @@ -1432,6 +1434,7 @@ cdef class LaurentSeries(AlgebraElement): sage: b(a) t + O(t^6) + sage: # needs sage.libs.pari sage: B. = ZZ[ ] sage: A. = LaurentSeriesRing(B) sage: f = t + b*t^2 + c*t^3 + O(t^4) @@ -1442,6 +1445,7 @@ cdef class LaurentSeries(AlgebraElement): sage: g(f) t + O(t^4) + sage: # needs sage.libs.pari sage: A. = PowerSeriesRing(ZZ) sage: B. = LaurentSeriesRing(A) sage: f = (1 - 3*t + 4*t^3 + O(t^4))*s + (2 + t + t^2 + O(t^3))*s^2 + O(s^3) @@ -1456,11 +1460,13 @@ cdef class LaurentSeries(AlgebraElement): If the leading coefficient is not a unit, we pass to its fraction field if possible:: + sage: # needs sage.libs.pari sage: A. = LaurentSeriesRing(ZZ) sage: a = 2*t - 4*t^2 + t^4 - t^5 + O(t^6) sage: a.reverse() 1/2*t + 1/2*t^2 + t^3 + 79/32*t^4 + 437/64*t^5 + O(t^6) + sage: # needs sage.libs.pari sage: B. = PolynomialRing(ZZ) sage: A. = LaurentSeriesRing(B) sage: f = 2*b*t + b*t^2 + 3*b^2*t^3 + O(t^4) @@ -1473,6 +1479,7 @@ cdef class LaurentSeries(AlgebraElement): We can handle some base rings of positive characteristic:: + sage: # needs sage.libs.pari sage: A8. = LaurentSeriesRing(Zmod(8)) sage: a = t - 15*t^2 - 2*t^4 + t^5 + O(t^6) sage: b = a.reverse(); b @@ -1484,6 +1491,7 @@ cdef class LaurentSeries(AlgebraElement): The optional argument ``precision`` sets the precision of the output:: + sage: # needs sage.libs.pari sage: R. = LaurentSeriesRing(QQ) sage: f = 2*x + 3*x^2 - 7*x^3 + x^4 + O(x^5) sage: g = f.reverse(precision=3); g @@ -1497,6 +1505,7 @@ cdef class LaurentSeries(AlgebraElement): output is automatically set to the default precision of the parent ring:: + sage: # needs sage.libs.pari sage: R. = LaurentSeriesRing(QQ, default_prec=20) sage: (x - x^2).reverse() # get some Catalan numbers x + x^2 + 2*x^3 + 5*x^4 + 14*x^5 + 42*x^6 + 132*x^7 + 429*x^8 + 1430*x^9 diff --git a/src/sage/rings/localization.py b/src/sage/rings/localization.py index be1fc217a8d..8ec7808d0c2 100644 --- a/src/sage/rings/localization.py +++ b/src/sage/rings/localization.py @@ -302,8 +302,8 @@ def _repr_(self): True sage: R. = ZZ[] - sage: L. = R.localization(X - Y) - sage: x*y/(x-y) + sage: L. = R.localization(X - Y) # needs sage.libs.singular + sage: x*y/(x-y) # needs sage.libs.singular x*y/(x - y) """ s = "%s" % self._value @@ -403,7 +403,7 @@ def factor(self, proof=None): sage: P. = QQ['x, y'] sage: L = P.localization(X - Y) - sage: x, y = L.gens() + sage: x, y = L.gens() # needs sage.libs.singular sage: p = (x^2 - y^2)/(x-y)^2 # needs sage.libs.singular sage: p.factor() # needs sage.libs.singular (1/(x - y)) * (x + y) diff --git a/src/sage/rings/multi_power_series_ring.py b/src/sage/rings/multi_power_series_ring.py index e65d9396778..837e44617bf 100644 --- a/src/sage/rings/multi_power_series_ring.py +++ b/src/sage/rings/multi_power_series_ring.py @@ -257,6 +257,8 @@ def is_MPowerSeriesRing(x): True sage: is_MPowerSeriesRing(T) False + + sage: # needs sage.combinat sage: L = LazyPowerSeriesRing(QQ, 'x') sage: is_MPowerSeriesRing(L) True @@ -836,6 +838,7 @@ def _coerce_map_from_(self, P): sage: H._coerce_map_from_(PolynomialRing(ZZ,'z2,f0')) True + sage: # needs sage.combinat sage: L. = LazyPowerSeriesRing(QQ) sage: R = PowerSeriesRing(QQ, names=('x','y','z')) sage: R.has_coerce_map_from(L) diff --git a/src/sage/rings/polynomial/infinite_polynomial_ring.py b/src/sage/rings/polynomial/infinite_polynomial_ring.py index 05735a21cd2..a1ec4375447 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_ring.py +++ b/src/sage/rings/polynomial/infinite_polynomial_ring.py @@ -1381,6 +1381,7 @@ class InfinitePolynomialGen(SageObject): EXAMPLES:: + sage: # needs sage.rings.real_mpfr sage: X. = InfinitePolynomialRing(RR) sage: x1 x1_* diff --git a/src/sage/rings/polynomial/polynomial_element_generic.py b/src/sage/rings/polynomial/polynomial_element_generic.py index c3df26200e2..b697f4edc54 100644 --- a/src/sage/rings/polynomial/polynomial_element_generic.py +++ b/src/sage/rings/polynomial/polynomial_element_generic.py @@ -954,9 +954,9 @@ def gcd(self, other, algorithm=None): Check that :issue:`19676` is fixed:: sage: S. = R[] - sage: x.gcd(y) + sage: x.gcd(y) # needs sage.libs.singular 1 - sage: (6*x).gcd(9) + sage: (6*x).gcd(9) # needs sage.libs.singular 3 Check that :issue:`36427` is fixed:: diff --git a/src/sage/rings/polynomial/polynomial_ring.py b/src/sage/rings/polynomial/polynomial_ring.py index 2bda9f6f9c3..3d7f3d1b1e3 100644 --- a/src/sage/rings/polynomial/polynomial_ring.py +++ b/src/sage/rings/polynomial/polynomial_ring.py @@ -2558,7 +2558,7 @@ def fraction_field(self): EXAMPLES:: - sage: QQbar['x'].fraction_field() + sage: QQbar['x'].fraction_field() # needs sage.rings.number_field Fraction Field of Univariate Polynomial Ring in x over Algebraic Field diff --git a/src/sage/rings/polynomial/toy_variety.py b/src/sage/rings/polynomial/toy_variety.py index ba67a1ece2e..d07056e6416 100644 --- a/src/sage/rings/polynomial/toy_variety.py +++ b/src/sage/rings/polynomial/toy_variety.py @@ -170,7 +170,7 @@ def is_linearly_dependent(polys) -> bool: ....: 2*x^123 + x^75, ....: x^147 + 2*x^123 + 2*x^75, ....: 2*x^147 + x^99 + x^75] - sage: is_linearly_dependent(B) + sage: is_linearly_dependent(B) # needs sage.modules True """ if not polys: diff --git a/src/sage/rings/power_series_ring.py b/src/sage/rings/power_series_ring.py index 4d53fe62dc5..1e560f0ae82 100644 --- a/src/sage/rings/power_series_ring.py +++ b/src/sage/rings/power_series_ring.py @@ -477,6 +477,8 @@ def is_PowerSeriesRing(R): False sage: is_PowerSeriesRing(QQ[['x']]) True + + sage: # needs sage.combinat sage: is_PowerSeriesRing(LazyPowerSeriesRing(QQ, 'x')) True sage: is_PowerSeriesRing(LazyPowerSeriesRing(QQ, 'x, y')) @@ -713,7 +715,7 @@ def _coerce_map_from_(self, S): False sage: A.has_coerce_map_from(ZZ[['x']]) True - sage: A.has_coerce_map_from(LazyPowerSeriesRing(ZZ, 'x')) + sage: A.has_coerce_map_from(LazyPowerSeriesRing(ZZ, 'x')) # needs sage.combinat True """ if self.base_ring().has_coerce_map_from(S): @@ -817,6 +819,7 @@ def _element_constructor_(self, f, prec=infinity, check=True): From lazy series:: + sage: # needs sage.combinat sage: L. = LazyPowerSeriesRing(QQ) sage: R = PowerSeriesRing(QQ, 'x') sage: R(1 / (1 + x^3)) diff --git a/src/sage/rings/quotient_ring.py b/src/sage/rings/quotient_ring.py index 4cf3979265f..c6bab8a767c 100644 --- a/src/sage/rings/quotient_ring.py +++ b/src/sage/rings/quotient_ring.py @@ -1364,7 +1364,7 @@ def random_element(self): sage: R. = QQ[] sage: S = R.quotient([x^3, y^2]) - sage: S.random_element() # random + sage: S.random_element() # random # needs sage.libs.singular -8/5*xbar^2 + 3/2*xbar*ybar + 2*xbar - 4/23 TESTS: @@ -1373,7 +1373,7 @@ def random_element(self): ring (which would be the case if the default implementation of this method was inherited from generic rings):: - sage: any(S.random_element() not in ZZ for _ in range(999)) + sage: any(S.random_element() not in ZZ for _ in range(999)) # needs sage.libs.singular True """ return self.retract(self.cover_ring().random_element()) diff --git a/src/sage/rings/semirings/tropical_mpolynomial.py b/src/sage/rings/semirings/tropical_mpolynomial.py index d8df667530b..039cc295764 100644 --- a/src/sage/rings/semirings/tropical_mpolynomial.py +++ b/src/sage/rings/semirings/tropical_mpolynomial.py @@ -1,3 +1,4 @@ +# sage.doctest: needs sage.symbolic r""" Multivariate Tropical Polynomials diff --git a/src/sage/rings/semirings/tropical_polynomial.py b/src/sage/rings/semirings/tropical_polynomial.py index 74125633a22..bc9ef009edf 100644 --- a/src/sage/rings/semirings/tropical_polynomial.py +++ b/src/sage/rings/semirings/tropical_polynomial.py @@ -1,3 +1,4 @@ +# sage.doctest: needs sage.symbolic r""" Univariate Tropical Polynomials diff --git a/src/sage/rings/semirings/tropical_variety.py b/src/sage/rings/semirings/tropical_variety.py index 3eb04372d13..3f7ed1c43d8 100644 --- a/src/sage/rings/semirings/tropical_variety.py +++ b/src/sage/rings/semirings/tropical_variety.py @@ -1,3 +1,4 @@ +# sage.doctest: needs sage.symbolic r""" Tropical Varieties From 2140e49d74cca49d7b1fa97b0aa72472f42012f8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 15:41:03 -0700 Subject: [PATCH 79/96] PowerSeries_poly.reverse: Recognize ImportError as pari failure --- src/sage/rings/power_series_poly.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/power_series_poly.pyx b/src/sage/rings/power_series_poly.pyx index 309d72c8f6a..4911ccad8bc 100644 --- a/src/sage/rings/power_series_poly.pyx +++ b/src/sage/rings/power_series_poly.pyx @@ -1080,7 +1080,7 @@ cdef class PowerSeries_poly(PowerSeries): f2 = f.__pari__() g = f2.serreverse() return PowerSeries_poly(f.parent(), g.Vec(-out_prec), out_prec) - except (TypeError,ValueError,AttributeError,PariError): + except (TypeError, ValueError, AttributeError, PariError, ImportError): # if pari fails, continue with Lagrange inversion from sage.misc.verbose import verbose verbose("passing to pari failed; trying Lagrange inversion") From c7fbf2249ec1a74942d430851001b362e9681ebf Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 15:48:47 -0700 Subject: [PATCH 80/96] ./sage --fixdoctests --distribution sagemath-categories --update-known-test-failures --- .../known-test-failures.json | 29 ++++--------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index b9b1597f324..e682671a3e5 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -1332,7 +1332,6 @@ "ntests": 251 }, "sage.modules.module": { - "failed": true, "ntests": 37 }, "sage.numerical.backends.generic_backend": { @@ -1550,7 +1549,7 @@ }, "sage.rings.function_field.function_field": { "failed": true, - "ntests": 190 + "ntests": 158 }, "sage.rings.function_field.function_field_rational": { "failed": true, @@ -1583,8 +1582,7 @@ "ntests": 7 }, "sage.rings.generic": { - "failed": true, - "ntests": 58 + "ntests": 51 }, "sage.rings.homset": { "ntests": 37 @@ -1614,11 +1612,9 @@ "ntests": 156 }, "sage.rings.laurent_series_ring_element": { - "failed": true, - "ntests": 381 + "ntests": 335 }, "sage.rings.localization": { - "failed": true, "ntests": 110 }, "sage.rings.morphism": { @@ -1627,7 +1623,7 @@ }, "sage.rings.multi_power_series_ring": { "failed": true, - "ntests": 229 + "ntests": 222 }, "sage.rings.multi_power_series_ring_element": { "failed": true, @@ -1673,7 +1669,7 @@ }, "sage.rings.polynomial.infinite_polynomial_ring": { "failed": true, - "ntests": 279 + "ntests": 275 }, "sage.rings.polynomial.laurent_polynomial": { "failed": true, @@ -1760,7 +1756,6 @@ "ntests": 51 }, "sage.rings.polynomial.toy_variety": { - "failed": true, "ntests": 24 }, "sage.rings.power_series_mpoly": { @@ -1772,7 +1767,7 @@ }, "sage.rings.power_series_ring": { "failed": true, - "ntests": 247 + "ntests": 241 }, "sage.rings.power_series_ring_element": { "failed": true, @@ -1813,21 +1808,9 @@ "sage.rings.semirings.non_negative_integer_semiring": { "ntests": 16 }, - "sage.rings.semirings.tropical_mpolynomial": { - "failed": true, - "ntests": 118 - }, - "sage.rings.semirings.tropical_polynomial": { - "failed": true, - "ntests": 160 - }, "sage.rings.semirings.tropical_semiring": { "ntests": 120 }, - "sage.rings.semirings.tropical_variety": { - "failed": true, - "ntests": 126 - }, "sage.rings.sum_of_squares": { "ntests": 35 }, From 3c9c49bf61abfe4649d9e3fdf2ec217db75f7dfd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 15:59:53 -0700 Subject: [PATCH 81/96] src/sage/schemes/generic/homset.py: Add # needs --- src/sage/schemes/generic/homset.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/schemes/generic/homset.py b/src/sage/schemes/generic/homset.py index 370049d2238..e021eda3537 100755 --- a/src/sage/schemes/generic/homset.py +++ b/src/sage/schemes/generic/homset.py @@ -673,6 +673,7 @@ def __iter__(self): TESTS:: + sage: # needs sage.schemes sage: E = EllipticCurve(GF(19), [1, 0]) sage: list(E.point_homset()) [(0 : 1 : 0), (0 : 0 : 1), (3 : 7 : 1), (3 : 12 : 1), (4 : 7 : 1), From 41c0d10ccd7bdc1e0291fcb93195784d24d7b5b6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 16:00:06 -0700 Subject: [PATCH 82/96] src/sage/schemes/projective/projective_subscheme.py: Use lazy_import --- src/sage/schemes/projective/projective_subscheme.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sage/schemes/projective/projective_subscheme.py b/src/sage/schemes/projective/projective_subscheme.py index a0c571de25b..5ff38e2a0ea 100755 --- a/src/sage/schemes/projective/projective_subscheme.py +++ b/src/sage/schemes/projective/projective_subscheme.py @@ -115,8 +115,7 @@ def point(self, v, check=True): raise ValueError("%s not well defined in dimension > 1" % v) v = [1, 0] # todo: update elliptic curve stuff to take point_homset as argument - from sage.schemes.elliptic_curves.ell_generic import EllipticCurve_generic - if isinstance(self, EllipticCurve_generic): + if isinstance(self, EllipticCurve): try: return self._point(self.point_homset(), v, check=check) except AttributeError: # legacy code without point_homset From d50077557f77b61e38c2b993d3f91af4f3331c98 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 18:56:35 -0700 Subject: [PATCH 83/96] sage.categories: Add # needs --- src/sage/categories/functor.pyx | 4 ++-- src/sage/categories/quotient_fields.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sage/categories/functor.pyx b/src/sage/categories/functor.pyx index 9b491ee0b94..fecce86a72c 100644 --- a/src/sage/categories/functor.pyx +++ b/src/sage/categories/functor.pyx @@ -131,12 +131,12 @@ cdef class Functor(SageObject): From: Univariate Polynomial Ring in x over Integer Ring To: Multivariate Polynomial Ring in a, b over Rational Field Defn: x |--> a + b - sage: F(f) + sage: F(f) # needs sage.libs.singular Ring morphism: From: Fraction Field of Univariate Polynomial Ring in x over Integer Ring To: Fraction Field of Multivariate Polynomial Ring in a, b over Rational Field Defn: x |--> a + b - sage: F(f)(1/x) + sage: F(f)(1/x) # needs sage.libs.singular 1/(a + b) We can also apply a polynomial ring construction functor to our homomorphism. The diff --git a/src/sage/categories/quotient_fields.py b/src/sage/categories/quotient_fields.py index 76f0570a819..5cb4ae688e0 100644 --- a/src/sage/categories/quotient_fields.py +++ b/src/sage/categories/quotient_fields.py @@ -358,8 +358,8 @@ def factor(self, *args, **kwds): Here is an example to show that :issue:`7868` has been resolved:: sage: R. = GF(2)[] - sage: f = x*y/(x+y) - sage: f.factor() # needs sage.rings.finite_rings + sage: f = x*y/(x+y) # needs sage.libs.singular + sage: f.factor() # needs sage.libs.singular (x + y)^-1 * y * x """ return (self.numerator().factor(*args, **kwds) / @@ -620,7 +620,7 @@ def derivative(self, *args): :: sage: F. = Frac(QQ['x,y']) - sage: (1/(x+y)).derivative(x,y) + sage: (1/(x+y)).derivative(x,y) # needs sage.libs.singular 2/(x^3 + 3*x^2*y + 3*x*y^2 + y^3) """ from sage.misc.derivative import multi_derivative @@ -657,6 +657,7 @@ def _derivative(self, var=None): :: + sage: # needs sage.libs.singular sage: F. = Frac(QQ['x,y']) sage: t = (x*y/(x+y)) sage: t._derivative(x) From 695c1d19a2bbc1225f5d22f03d48cb8825e53716 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 18:56:54 -0700 Subject: [PATCH 84/96] sage.groups: Add # needs --- src/sage/groups/generic.py | 1 + src/sage/groups/group.pyx | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py index 4b7e1c5e69e..01d6df30262 100644 --- a/src/sage/groups/generic.py +++ b/src/sage/groups/generic.py @@ -1481,6 +1481,7 @@ def has_order(P, n, operation='+'): TESTS:: + sage: # needs sage.modules sage: ns = [randrange(1,10**5) for _ in range(randrange(1,5))] sage: A = AdditiveAbelianGroup(ns) sage: from sage.groups.generic import has_order diff --git a/src/sage/groups/group.pyx b/src/sage/groups/group.pyx index b5047594a9c..6ce96db90bc 100644 --- a/src/sage/groups/group.pyx +++ b/src/sage/groups/group.pyx @@ -33,14 +33,14 @@ def is_Group(x): EXAMPLES:: - sage: F. = FreeGroup() # needs sage.groups sage: from sage.groups.group import is_Group - sage: is_Group(F) # needs sage.groups + sage: is_Group("a string") doctest:warning...DeprecationWarning: use instead G in Groups() See https://github.com/sagemath/sage/issues/37449 for details. - True - sage: is_Group("a string") False + sage: F. = FreeGroup() # needs sage.groups + sage: is_Group(F) # needs sage.groups + True """ deprecation(37449, 'use instead G in Groups()') return isinstance(x, Group) @@ -201,9 +201,10 @@ cdef class Group(Parent): EXAMPLES:: - sage: groups.presentation.Cyclic(1).is_trivial() + sage: groups.presentation.Cyclic(1).is_trivial() # needs sage.groups True + sage: # needs sage.groups sage: G. = FreeGroup('a, b') sage: H = G / (a^2, b^3, a*b*~a*~b) sage: H.is_trivial() @@ -211,6 +212,7 @@ cdef class Group(Parent): A non-trivial presentation of the trivial group:: + sage: # needs sage.groups sage: F. = FreeGroup() sage: J = F / ((~a)*b*a*(~b)^2, (~b)*a*b*(~a)^2) sage: J.is_trivial() From 44f78ed29d585735227f61905f2895a6daf678ca Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 18:57:12 -0700 Subject: [PATCH 85/96] sage.rings: Add # needs --- src/sage/rings/fraction_field.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sage/rings/fraction_field.py b/src/sage/rings/fraction_field.py index 4e3e923c263..974e725486a 100644 --- a/src/sage/rings/fraction_field.py +++ b/src/sage/rings/fraction_field.py @@ -58,6 +58,7 @@ Test that :issue:`15971` is fixed:: + sage: # needs sage.libs.singular sage: for B in [QQ['t'], QQ['s, t'], ZZ['t'], ZZ['s, t']]: ....: F = B.fraction_field() ....: R = F['x, y'] @@ -251,6 +252,7 @@ def _coerce_map_from_(self, S): Test coercions:: + sage: # needs sage.libs.singular sage: F.coerce(1) 1 sage: F.coerce(int(1)) @@ -260,6 +262,7 @@ def _coerce_map_from_(self, S): :: + sage: # needs sage.libs.singular sage: K = ZZ['x,y'].fraction_field() sage: x,y = K.gens() sage: F.coerce(F.gen()) @@ -563,6 +566,7 @@ def _element_constructor_(self, x, y=None, coerce=True): EXAMPLES:: + sage: # needs sage.libs.singular sage: F = QQ['x,y'].fraction_field() sage: F._element_constructor_(1) 1 @@ -870,6 +874,7 @@ def _is_valid_homomorphism_(self, codomain, im_gens, base_map=None): Test homomorphisms:: + sage: # needs sage.libs.singular sage: phi = F.hom([2*y, x]) sage: phi(x+y) x + 2*y @@ -947,6 +952,7 @@ def _gcd_univariate_polynomial(self, f, g): TESTS:: + sage: # needs sage.libs.singular sage: A. = ZZ[] sage: C. = Frac(A)[] sage: c = (2*y^2 - 11*x - 2*y + 1)/(-x^2 + x*y - 2*y^2) From 4056a248c00464c0686005e66b8fd2d1b9152f29 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 18:57:24 -0700 Subject: [PATCH 86/96] sage.sets: Add # needs --- src/sage/sets/disjoint_set.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/sets/disjoint_set.pyx b/src/sage/sets/disjoint_set.pyx index ddd9a95a310..768bb9ec5e8 100644 --- a/src/sage/sets/disjoint_set.pyx +++ b/src/sage/sets/disjoint_set.pyx @@ -109,6 +109,7 @@ cpdef DisjointSet(arg): From a set partition (see :issue:`38693`):: + sage: # needs sage.combinat sage: SP = SetPartition(DisjointSet(5)) sage: DisjointSet(SP) {{0}, {1}, {2}, {3}, {4}} @@ -961,8 +962,7 @@ cdef class DisjointSet_of_hashables(DisjointSet_class): sage: d.union(3, 4) sage: d {{0}, {1, 2, 3, 4}} - sage: g = d.to_digraph() - sage: g # needs sage.graphs + sage: g = d.to_digraph(); g # needs sage.graphs Looped digraph on 5 vertices sage: g.edges(sort=True) # needs sage.graphs [(0, 0, None), (1, 2, None), (2, 2, None), (3, 2, None), (4, 2, None)] From 25cd8f44cd078d10b2ca32a5e8c5ea61fe05ad6c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 18:57:40 -0700 Subject: [PATCH 87/96] sage.structure: Add # needs --- src/sage/structure/coerce_actions.pyx | 2 ++ src/sage/structure/element.pxd | 1 + src/sage/structure/element.pyx | 8 ++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/sage/structure/coerce_actions.pyx b/src/sage/structure/coerce_actions.pyx index b25abdf328a..6b4dc18c704 100644 --- a/src/sage/structure/coerce_actions.pyx +++ b/src/sage/structure/coerce_actions.pyx @@ -316,6 +316,7 @@ cdef class ModuleAction(Action): If there is a coercion from ``G`` to ``S``, we do not create the module action of ``G`` on the pushout of ``G`` and ``S``:: + sage: # needs sage.modules sage: G = PolynomialRing(QQ, "x") sage: S = PolynomialRing(MatrixSpace(QQ, 2), "x") sage: G.gen() * S.gen() @@ -325,6 +326,7 @@ cdef class ModuleAction(Action): Contrast the previous example with the following, where we have no coercion from ``G`` to ``S``:: + sage: # needs sage.modules sage: S = PolynomialRing(MatrixSpace(QQ, 2), "y") sage: G.gen() * S.gen() [x 0] diff --git a/src/sage/structure/element.pxd b/src/sage/structure/element.pxd index cc1bf225710..cd7db400b3b 100644 --- a/src/sage/structure/element.pxd +++ b/src/sage/structure/element.pxd @@ -132,6 +132,7 @@ cpdef inline bint have_same_parent(left, right) noexcept: These have different types but the same parent:: + sage: # needs sage.rings.real_mpfr sage: a = RLF(2) sage: b = exp(a) sage: type(a) diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index 5f1db5de82b..598b9c7b56e 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -4494,15 +4494,15 @@ def is_AlgebraElement(x): TESTS:: sage: from sage.structure.element import is_AlgebraElement - sage: R. = FreeAlgebra(QQ, 2) # needs sage.combinat sage.modules - sage: is_AlgebraElement(x * y) # needs sage.combinat sage.modules + sage: is_AlgebraElement(1) doctest:warning... DeprecationWarning: The function is_AlgebraElement is deprecated; use 'isinstance(..., AlgebraElement)' instead. See https://github.com/sagemath/sage/issues/38077 for details. + False + sage: R. = FreeAlgebra(QQ, 2) # needs sage.combinat sage.modules + sage: is_AlgebraElement(x * y) # needs sage.combinat sage.modules True - sage: is_AlgebraElement(1) - False """ from sage.misc.superseded import deprecation_cython deprecation_cython(38077, "The function is_AlgebraElement is deprecated; use 'isinstance(..., AlgebraElement)' instead.") From 21535747a9670ac7c9ecd8879a465654b4ae4663 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 18:58:42 -0700 Subject: [PATCH 88/96] ./sage --fixdoctests --distribution sagemath-categories --update-known-test-failures --- .../known-test-failures.json | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index e682671a3e5..80200d6ba65 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -348,7 +348,6 @@ "ntests": 11 }, "sage.categories.functor": { - "failed": true, "ntests": 128 }, "sage.categories.g_sets": { @@ -556,8 +555,7 @@ "ntests": 13 }, "sage.categories.quotient_fields": { - "failed": true, - "ntests": 81 + "ntests": 77 }, "sage.categories.quotients": { "ntests": 2 @@ -1048,12 +1046,10 @@ "ntests": 15 }, "sage.groups.generic": { - "failed": true, - "ntests": 120 + "ntests": 110 }, "sage.groups.group": { - "failed": true, - "ntests": 51 + "ntests": 45 }, "sage.groups.old": { "ntests": 31 @@ -1529,7 +1525,7 @@ }, "sage.rings.fraction_field": { "failed": true, - "ntests": 227 + "ntests": 197 }, "sage.rings.fraction_field_element": { "failed": true, @@ -1856,7 +1852,7 @@ }, "sage.schemes.generic.homset": { "failed": true, - "ntests": 128 + "ntests": 124 }, "sage.schemes.generic.morphism": { "failed": true, @@ -1866,7 +1862,6 @@ "ntests": 35 }, "sage.schemes.generic.scheme": { - "failed": true, "ntests": 178 }, "sage.schemes.generic.spec": { @@ -1879,7 +1874,6 @@ "ntests": 99 }, "sage.schemes.product_projective.point": { - "failed": true, "ntests": 111 }, "sage.schemes.product_projective.rational_point": { @@ -1923,8 +1917,7 @@ "ntests": 53 }, "sage.sets.disjoint_set": { - "failed": true, - "ntests": 270 + "ntests": 266 }, "sage.sets.disjoint_union_enumerated_sets": { "ntests": 61 @@ -1983,8 +1976,7 @@ "ntests": 311 }, "sage.structure.coerce_actions": { - "failed": true, - "ntests": 133 + "ntests": 128 }, "sage.structure.coerce_dict": { "failed": true, @@ -2004,8 +1996,7 @@ "ntests": 562 }, "sage.structure.element.pxd": { - "failed": true, - "ntests": 23 + "ntests": 18 }, "sage.structure.element_wrapper": { "ntests": 160 From 0a508b49a9ae6ce49c1eb5fce43f788045f03019 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 19:24:53 -0700 Subject: [PATCH 89/96] sage.rings: Add # needs --- src/sage/rings/finite_rings/integer_mod.pyx | 4 +- src/sage/rings/fraction_field_element.pyx | 53 +++++++++++++------ src/sage/rings/laurent_series_ring.py | 13 ++--- src/sage/rings/multi_power_series_ring.py | 1 + .../polynomial/multi_polynomial_element.py | 18 ++++--- .../polynomial_singular_interface.py | 2 +- 6 files changed, 59 insertions(+), 32 deletions(-) diff --git a/src/sage/rings/finite_rings/integer_mod.pyx b/src/sage/rings/finite_rings/integer_mod.pyx index 0b220e81a1e..59248ef391c 100644 --- a/src/sage/rings/finite_rings/integer_mod.pyx +++ b/src/sage/rings/finite_rings/integer_mod.pyx @@ -767,8 +767,8 @@ cdef class IntegerMod_abstract(FiniteRingElement): An example for ``check=True``:: sage: F = GF(127, impl='modn') - sage: t = F.primitive_element() - sage: t.log(t, 57, check=True) + sage: t = F.primitive_element() # needs sage.libs.pari + sage: t.log(t, 57, check=True) # needs sage.libs.pari Traceback (most recent call last): ... ValueError: base does not have the provided order diff --git a/src/sage/rings/fraction_field_element.pyx b/src/sage/rings/fraction_field_element.pyx index 3d14ab66134..a2d7eabd615 100644 --- a/src/sage/rings/fraction_field_element.pyx +++ b/src/sage/rings/fraction_field_element.pyx @@ -140,8 +140,9 @@ cdef class FractionFieldElement(FieldElement): :: + sage: # needs sage.libs.singular sage: phi = F.hom([a + b, a*b], K) - sage: phi(x+y) # indirect doctest + sage: phi(x + y) # indirect doctest a*b + a + b :: @@ -226,6 +227,7 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: R. = ZZ[] sage: f = x/y + 1; f (x + y)/y @@ -241,6 +243,7 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: R. = ZZ[] sage: f = x/y + 1; f (x + y)/y @@ -255,6 +258,7 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: R. = ZZ[] sage: f = x/y + 1; f (x + y)/y @@ -368,21 +372,23 @@ cdef class FractionFieldElement(FieldElement): sage: d={x:1} sage: d[FractionField(R).0] 1 - sage: R.=ZZ[] # this probably has a separate implementation from ZZ[] - sage: hash(R.0)==hash(FractionField(R).0) + + sage: # needs sage.libs.singular + sage: R. = ZZ[] # this probably has a separate implementation from ZZ[] + sage: hash(R.0) == hash(FractionField(R).0) True - sage: d={x:1} + sage: d = {x: 1} sage: d[FractionField(R).0] 1 - sage: R.=QQ[] # this probably has a separate implementation from ZZ[] - sage: hash(R.0)==hash(FractionField(R).0) + sage: R. = QQ[] # this probably has a separate implementation from ZZ[] + sage: hash(R.0) == hash(FractionField(R).0) True - sage: ((x+1)/(x^2+1)).subs({x:1}) + sage: ((x+1)/(x^2+1)).subs({x: 1}) 1 - sage: d={x:1} + sage: d = {x: 1} sage: d[FractionField(R).0] 1 - sage: hash(R(1)/R(2))==hash(1/2) + sage: hash(R(1)/R(2)) == hash(1/2) True Check that :issue:`16268` is fixed:: @@ -437,7 +443,8 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: - sage: x = PolynomialRing(RationalField(),'x',3).gens() + sage: # needs sage.libs.singular + sage: x = PolynomialRing(RationalField(), 'x', 3).gens() sage: f = x[0] + x[1] - 2*x[1]*x[2] sage: f -2*x1*x2 + x0 + x1 @@ -466,7 +473,7 @@ cdef class FractionFieldElement(FieldElement): sage: x, y = PolynomialRing(ZZ, 2, 'xy').gens() sage: f = x^2 + y + x^2*y^2 + 5 - sage: (1/f).subs(x=5) + sage: (1/f).subs(x=5) # needs sage.libs.singular 1/(25*y^2 + y + 30) TESTS: @@ -477,7 +484,7 @@ cdef class FractionFieldElement(FieldElement): sage: PF = P.fraction_field() sage: p = sum(i*P.gen(i) for i in range(5)) / sum(i*P.gen(i) for i in range(8)) sage: v = P.gen(4) - sage: p.subs({v: 100}) + sage: p.subs({v: 100}) # needs sage.libs.singular (x1 + 2*x2 + 3*x3 + 400)/(x1 + 2*x2 + 3*x3 + 5*x5 + 6*x6 + 7*x7 + 400) """ if isinstance(in_dict, dict): @@ -602,13 +609,15 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: K. = Frac(ZZ['x,y']) - sage: x+y # indirect doctest + sage: x + y # indirect doctest x + y sage: 1/x + 1/y (x + y)/(x*y) sage: 1/x + 1/(x*y) (y + 1)/(x*y) + sage: Frac(CDF['x']).gen() + 3 # needs sage.rings.complex_double x + 3.0 @@ -749,6 +758,7 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: K. = Frac(ZZ['x,y,z']) sage: a = (x+1)*(x+y)/(z-3) # indirect doctest sage: b = (x+y)/(z-1) @@ -792,6 +802,7 @@ cdef class FractionFieldElement(FieldElement): """ EXAMPLES:: + sage: # needs sage.libs.singular sage: K. = Frac(ZZ['x,y']) sage: float(x/x + y/y) 2.0 @@ -908,11 +919,11 @@ cdef class FractionFieldElement(FieldElement): sage: x^0 1 - sage: ((x+y)/(x-y))^2 + sage: ((x+y)/(x-y))^2 # needs sage.libs.singular (x^2 + 2*x*y + y^2)/(x^2 - 2*x*y + y^2) - sage: ((x+y)/(x-y))^-2 + sage: ((x+y)/(x-y))^-2 # needs sage.libs.singular (x^2 - 2*x*y + y^2)/(x^2 + 2*x*y + y^2) - sage: ((x+y)/(x-y))^0 + sage: ((x+y)/(x-y))^0 # needs sage.libs.singular 1 """ snum = ( self)._numerator @@ -985,6 +996,7 @@ cdef class FractionFieldElement(FieldElement): :: + sage: # needs sage.libs.singular sage: K. = Frac(ZZ['x,y']) sage: x > y True @@ -1020,6 +1032,7 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: F = ZZ['x,y'].fraction_field() sage: x,y = F.gens() sage: t = F(0)/x @@ -1028,7 +1041,7 @@ cdef class FractionFieldElement(FieldElement): :: - sage: bool(1/x) + sage: bool(1/x) # needs sage.libs.singular True """ return not self._numerator.is_zero() @@ -1039,6 +1052,7 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: F = ZZ['x,y'].fraction_field() sage: x,y = F.gens() sage: t = F(0)/x @@ -1058,6 +1072,7 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: F = ZZ['x,y'].fraction_field() sage: x,y = F.gens() sage: (x/x).is_one() @@ -1075,6 +1090,7 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: F = ZZ['x,y'].fraction_field() sage: x,y = F.gens() sage: elt = (2*x + 2*y) / (3*x - 3*y); elt @@ -1092,6 +1108,7 @@ cdef class FractionFieldElement(FieldElement): EXAMPLES:: + sage: # needs sage.libs.singular sage: F = ZZ['x,y'].fraction_field() sage: f = F.random_element() sage: loads(f.dumps()) == f @@ -1125,6 +1142,7 @@ cdef class FractionFieldElement(FieldElement): TESTS:: + sage: # needs sage.libs.singular sage: R. = ZZ[] sage: (~(y+z))._evaluate_polynomial(pol) (y^3 + 3*y^2*z + 3*y*z^2 + z^3 + 1)/(y^3 + 3*y^2*z + 3*y*z^2 + z^3) @@ -1285,6 +1303,7 @@ def make_element(parent, numerator, denominator): EXAMPLES:: + sage: # needs sage.libs.singular sage: from sage.rings.fraction_field_element import make_element sage: R = ZZ['x,y'] sage: x,y = R.gens() diff --git a/src/sage/rings/laurent_series_ring.py b/src/sage/rings/laurent_series_ring.py index c95230c5572..8a2381e525e 100644 --- a/src/sage/rings/laurent_series_ring.py +++ b/src/sage/rings/laurent_series_ring.py @@ -74,8 +74,8 @@ def is_LaurentSeriesRing(x): use 'isinstance(..., (LaurentSeriesRing, LazyLaurentSeriesRing))' instead. See https://github.com/sagemath/sage/issues/38290 for details. True - sage: L. = LazyLaurentSeriesRing(QQ) - sage: is_LaurentSeriesRing(L) + sage: L. = LazyLaurentSeriesRing(QQ) # needs sage.combinat + sage: is_LaurentSeriesRing(L) # needs sage.combinat True """ from sage.misc.superseded import deprecation @@ -460,6 +460,7 @@ def _element_constructor_(self, x, n=0, prec=infinity): Lazy series:: + sage: # needs sage.combinat sage: L. = LazyLaurentSeriesRing(ZZ) sage: R = LaurentSeriesRing(QQ, names='z') sage: R(z^-5 + 1/(1-z)) @@ -655,9 +656,9 @@ def _coerce_map_from_(self, P): True sage: S.has_coerce_map_from(S) True - sage: S.has_coerce_map_from(LazyLaurentSeriesRing(ZZ, 't')) + sage: S.has_coerce_map_from(LazyLaurentSeriesRing(ZZ, 't')) # needs sage.combinat True - sage: S.has_coerce_map_from(LazyPowerSeriesRing(ZZ, 't')) + sage: S.has_coerce_map_from(LazyPowerSeriesRing(ZZ, 't')) # needs sage.combinat True sage: S.has_coerce_map_from(QQ) @@ -682,9 +683,9 @@ def _coerce_map_from_(self, P): False sage: R.has_coerce_map_from(ZZ['x']) True - sage: R.has_coerce_map_from(LazyLaurentSeriesRing(ZZ, 't')) + sage: R.has_coerce_map_from(LazyLaurentSeriesRing(ZZ, 't')) # needs sage.combinat True - sage: R.has_coerce_map_from(LazyLaurentSeriesRing(ZZ['x'], 't')) + sage: R.has_coerce_map_from(LazyLaurentSeriesRing(ZZ['x'], 't')) # needs sage.combinat True """ A = self.base_ring() diff --git a/src/sage/rings/multi_power_series_ring.py b/src/sage/rings/multi_power_series_ring.py index 837e44617bf..e03850f1484 100644 --- a/src/sage/rings/multi_power_series_ring.py +++ b/src/sage/rings/multi_power_series_ring.py @@ -873,6 +873,7 @@ def _element_constructor_(self, f, prec=None): Multivariate Power Series Ring in t0, t1, t2, t3, t4 over Integer Ring + sage: # needs sage.combinat sage: L. = LazyPowerSeriesRing(QQ) sage: R = PowerSeriesRing(QQ, names=('x','y','z')) sage: R(1/(1-x-y), prec=3) diff --git a/src/sage/rings/polynomial/multi_polynomial_element.py b/src/sage/rings/polynomial/multi_polynomial_element.py index 2f3310b3af9..dd10c6153d2 100644 --- a/src/sage/rings/polynomial/multi_polynomial_element.py +++ b/src/sage/rings/polynomial/multi_polynomial_element.py @@ -228,6 +228,7 @@ def _im_gens_(self, codomain, im_gens, base_map=None): You can specify a map on the base ring:: + sage: # needs sage.libs.singular sage: F. = ZZ[] sage: F = F.fraction_field(); x,y = F(x),F(y) sage: cc = F.hom([y,x]) @@ -673,6 +674,7 @@ def degree(self, x=None, std_grading=False): Ensure that :issue:`37603` is fixed:: + sage: # needs sage.rings.number_field sage: R. = PolynomialRing(QQbar) sage: f = 3*x^2 - 2*y + 7*x^2*y^2 + 5 sage: type(f.degree()) @@ -729,12 +731,14 @@ def total_degree(self): TESTS: Ensure that :issue:`37603` is fixed:: - sage: R. = QQbar[] - sage: f = 2*x*y^3*z^2 - sage: f.total_degree() - 6 - sage: type(f.total_degree()) - + + sage: # needs sage.rings.number_field + sage: R. = QQbar[] + sage: f = 2*x*y^3*z^2 + sage: f.total_degree() + 6 + sage: type(f.total_degree()) + """ return self.degree() @@ -1307,6 +1311,7 @@ def is_homogeneous(self): The weight of the parent ring is respected:: + sage: # needs sage.rings.finite_rings sage: term_order = TermOrder("wdegrevlex", [1, 3]) sage: R. = PolynomialRing(Qp(5), order=term_order) sage: (x + y).is_homogeneous() @@ -2088,6 +2093,7 @@ def factor(self, proof=None): Check that the global proof flag for polynomials is honored:: + sage: # needs sage.libs.singular sage: R. = PolynomialRing(QQ['z']) sage: f = x^2 + y^2 sage: with proof.WithProof('polynomial', True): diff --git a/src/sage/rings/polynomial/polynomial_singular_interface.py b/src/sage/rings/polynomial/polynomial_singular_interface.py index 1bdca3af614..bbe11bb41a8 100644 --- a/src/sage/rings/polynomial/polynomial_singular_interface.py +++ b/src/sage/rings/polynomial/polynomial_singular_interface.py @@ -257,7 +257,7 @@ def _singular_(self, singular=None): // : names x // block 2 : ordering C - sage: R = Frac(ZZ['a,b'])['x,y'] + sage: R = Frac(ZZ['a,b'])['x,y'] # needs sage.libs.singular sage: singular(R) # needs sage.libs.singular polynomial ring, over a field, global ordering // coefficients: QQ(a, b) From dbadb36f1c2bf9e5a1349dc0ca0e5c4b5a839559 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 19:25:09 -0700 Subject: [PATCH 90/96] sage.schemes: Add # needs --- src/sage/schemes/affine/affine_subscheme.py | 1 + src/sage/schemes/generic/homset.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/sage/schemes/affine/affine_subscheme.py b/src/sage/schemes/affine/affine_subscheme.py index a6b550c6ec8..4da93325d64 100755 --- a/src/sage/schemes/affine/affine_subscheme.py +++ b/src/sage/schemes/affine/affine_subscheme.py @@ -510,6 +510,7 @@ def _morphism(self, *args, **kwds): TESTS:: + sage: # needs sage.libs.singular sage: A2. = AffineSpace(QQ, 2) sage: X = A2.subscheme(x - y) sage: H = X.Hom(A2) diff --git a/src/sage/schemes/generic/homset.py b/src/sage/schemes/generic/homset.py index e021eda3537..54ca19c0e0d 100755 --- a/src/sage/schemes/generic/homset.py +++ b/src/sage/schemes/generic/homset.py @@ -701,6 +701,7 @@ def __iter__(self): :: + sage: # needs sage.geometry.polyhedron sage: P1 = toric_varieties.P1(base_ring=GF(3)) sage: list(P1.point_homset()) [[0 : 1], [1 : 0], [1 : 1], [1 : 2]] From 099f97b4b101d742a0ae1ed837d7eaeee72b3487 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 20:02:28 -0700 Subject: [PATCH 91/96] sage.rings: Add # needs --- src/sage/rings/polynomial/polynomial_element.pyx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 2449b3208ae..62b5e587a6f 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2348,6 +2348,7 @@ cdef class Polynomial(CommutativePolynomial): Also works for extension fields and even characteristic:: + sage: # needs sage.rings.finite_rings sage: F. = GF(2^4) sage: R. = F[] sage: f = (x + z4^3 + z4^2)^4 * (x^2 + z4*x + z4) * (x^2 + (z4^3 + z4^2 + z4)*x + z4^2 + z4 + 1) @@ -9655,6 +9656,8 @@ cdef class Polynomial(CommutativePolynomial): ... NotImplementedError: Univariate Polynomial Ring in x over Rational Field does not provide an xgcd implementation for univariate polynomials + + sage: # needs sage.libs.singular sage: T. = QQ[] sage: def poor_xgcd(f, g): ....: ret = S(T(f).gcd(g)) @@ -10233,6 +10236,7 @@ cdef class Polynomial(CommutativePolynomial): sage: R(0).is_squarefree() False + sage: # needs sage.libs.singular sage: S. = QQ[] sage: R. = S[] sage: (2*x*y).is_squarefree() @@ -11142,6 +11146,7 @@ cdef class Polynomial(CommutativePolynomial): ... ValueError: not a 17th power + sage: # needs sage.libs.singular sage: R1. = QQ[] sage: R2. = R1[] sage: R3. = R2[] @@ -12774,9 +12779,10 @@ cdef class Polynomial_generic_dense_inexact(Polynomial_generic_dense): Ensure that :issue:`37621` is fixed:: + sage: # needs sage.rings.padics sage: k. = QQ[] - sage: K = Qp(11,5) - sage: L. = K.extension(x^20-11) + sage: K = Qp(11, 5) + sage: L. = K.extension(x^20 - 11) sage: R. = L[] sage: f = R.random_element() sage: type(f.degree()) From 98f27026418954b6c05b5e15b905b43997f946a0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 20:02:39 -0700 Subject: [PATCH 92/96] sage.schemes: Add # needs --- src/sage/schemes/generic/divisor_group.py | 1 + src/sage/schemes/generic/glue.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/sage/schemes/generic/divisor_group.py b/src/sage/schemes/generic/divisor_group.py index 0b11b1d0982..d8a99a93985 100755 --- a/src/sage/schemes/generic/divisor_group.py +++ b/src/sage/schemes/generic/divisor_group.py @@ -202,6 +202,7 @@ def _coerce_map_from_(self, other): TESTS:: + sage: # needs sage.schemes sage: C = EllipticCurve([2, 1]) sage: E = EllipticCurve([1, 2]) sage: C.divisor_group()._coerce_map_from_(E.divisor_group()) diff --git a/src/sage/schemes/generic/glue.py b/src/sage/schemes/generic/glue.py index 7733030a2ab..1f486f5362e 100755 --- a/src/sage/schemes/generic/glue.py +++ b/src/sage/schemes/generic/glue.py @@ -31,6 +31,7 @@ class GluedScheme(Scheme): EXAMPLES:: + sage: # needs sage.libs.singular sage: R. = QQ[] sage: S. = R.quotient(x * y - 1) sage: Rx = QQ["x"] @@ -62,6 +63,7 @@ def gluing_maps(self): EXAMPLES:: + sage: # needs sage.libs.singular sage: R. = QQ[] sage: S. = R.quotient(x * y - 1) sage: Rx = QQ["x"] From 8aa4580c7a392af18e593a5998984b5175d435cb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 20:02:48 -0700 Subject: [PATCH 93/96] sage.structure: Add # needs --- src/sage/structure/element.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index 598b9c7b56e..34ec49efb25 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -805,7 +805,7 @@ cdef class Element(SageObject): 25*y^2 + y + 30 sage: f.subs(x=5) 25*y^2 + y + 30 - sage: (1/f).subs(x=5) + sage: (1/f).subs(x=5) # needs sage.libs.singular 1/(25*y^2 + y + 30) sage: Integer(5).subs(x=4) 5 @@ -844,7 +844,7 @@ cdef class Element(SageObject): 25*y^2 + y + 30 sage: f.substitute(x=5) 25*y^2 + y + 30 - sage: (1/f).substitute(x=5) + sage: (1/f).substitute(x=5) # needs sage.libs.singular 1/(25*y^2 + y + 30) sage: Integer(5).substitute(x=4) 5 From 9cba2e8e50b640d9e25fe1050d04b8ce2f9633d5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Oct 2024 20:03:04 -0700 Subject: [PATCH 94/96] ./sage --fixdoctests --distribution sagemath-categories --update-known-test-failures --- .../known-test-failures.json | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index 80200d6ba65..ff8036b7c50 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -1529,7 +1529,7 @@ }, "sage.rings.fraction_field_element": { "failed": true, - "ntests": 271 + "ntests": 198 }, "sage.rings.function_field.constructor": { "ntests": 34 @@ -1605,7 +1605,7 @@ }, "sage.rings.laurent_series_ring": { "failed": true, - "ntests": 156 + "ntests": 151 }, "sage.rings.laurent_series_ring_element": { "ntests": 335 @@ -1619,7 +1619,7 @@ }, "sage.rings.multi_power_series_ring": { "failed": true, - "ntests": 222 + "ntests": 218 }, "sage.rings.multi_power_series_ring_element": { "failed": true, @@ -1687,7 +1687,7 @@ }, "sage.rings.polynomial.multi_polynomial_element": { "failed": true, - "ntests": 274 + "ntests": 251 }, "sage.rings.polynomial.multi_polynomial_ideal": { "ntests": 99 @@ -1709,7 +1709,7 @@ }, "sage.rings.polynomial.polynomial_element": { "failed": true, - "ntests": 1869 + "ntests": 1844 }, "sage.rings.polynomial.polynomial_element_generic": { "failed": true, @@ -1733,7 +1733,6 @@ "ntests": 24 }, "sage.rings.polynomial.polynomial_singular_interface": { - "failed": true, "ntests": 42 }, "sage.rings.polynomial.symmetric_ideal": { @@ -1832,8 +1831,7 @@ "ntests": 167 }, "sage.schemes.affine.affine_subscheme": { - "failed": true, - "ntests": 88 + "ntests": 81 }, "sage.schemes.generic.algebraic_scheme": { "failed": true, @@ -1843,16 +1841,10 @@ "ntests": 60 }, "sage.schemes.generic.divisor_group": { - "failed": true, - "ntests": 49 - }, - "sage.schemes.generic.glue": { - "failed": true, - "ntests": 19 + "ntests": 40 }, "sage.schemes.generic.homset": { - "failed": true, - "ntests": 124 + "ntests": 121 }, "sage.schemes.generic.morphism": { "failed": true, From f5ee6a4bff014776447c0834c85858ad843a0163 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 26 Oct 2024 15:36:40 -0700 Subject: [PATCH 95/96] src/sage_setup/__init__.py: Fix for breaking change in sage_setup.autogen --- src/sage_setup/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_setup/__init__.py b/src/sage_setup/__init__.py index e7b88606df7..4ee00ace2e4 100644 --- a/src/sage_setup/__init__.py +++ b/src/sage_setup/__init__.py @@ -92,7 +92,7 @@ def sage_setup(distributions, *, log.info("Generating auto-generated sources") # from sage_setup.autogen import autogen_all # autogen_all() - from sage_setup.autogen.interpreters import rebuild + from sage_setup.autogen.interpreters.internal import rebuild rebuild(os.path.join("sage", "ext", "interpreters"), interpreters=interpreters, distribution=distributions[0], force=True) From aed5ba0f431e13a4279e2b724f6f86a2f0773923 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 17 Oct 2024 19:38:48 -0700 Subject: [PATCH 96/96] Make brial standard again for now --- build/pkgs/brial/type | 2 +- build/pkgs/sagemath_brial/type | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/brial/type b/build/pkgs/brial/type index 134d9bc32d5..a6a7b9cd726 100644 --- a/build/pkgs/brial/type +++ b/build/pkgs/brial/type @@ -1 +1 @@ -optional +standard diff --git a/build/pkgs/sagemath_brial/type b/build/pkgs/sagemath_brial/type index 134d9bc32d5..a6a7b9cd726 100644 --- a/build/pkgs/sagemath_brial/type +++ b/build/pkgs/sagemath_brial/type @@ -1 +1 @@ -optional +standard