Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into sage_categories_…
Browse files Browse the repository at this point in the history
…reformat_doctests
  • Loading branch information
Matthias Koeppe committed May 15, 2023
2 parents dda9fb7 + f2f5863 commit 4a7c0c2
Show file tree
Hide file tree
Showing 59 changed files with 239 additions and 116 deletions.
8 changes: 4 additions & 4 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: 10.0.rc0",
"version": "10.0.rc0",
"title": "sagemath/sage: 10.0.rc3",
"version": "10.0.rc3",
"upload_type": "software",
"publication_date": "2023-04-23",
"publication_date": "2023-05-12",
"creators": [
{
"affiliation": "SageMath.org",
Expand All @@ -15,7 +15,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/10.0.rc0",
"identifier": "https://github.com/sagemath/sage/tree/10.0.rc3",
"relation": "isSupplementTo"
},
{
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.0.rc0, Release Date: 2023-04-23
SageMath version 10.0.rc3, Release Date: 2023-05-12
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=527827bf6b3d445dc433219b4423f824dc95ec94
md5=edf7a6212cc3e0f37acad73af1f059c8
cksum=998886037
sha1=959551bd3287d8fef9ca0452060876d14476112f
md5=3151567a6d8a667f3ce7ecfbadb30a32
cksum=3323217204
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eca2a773d086dbbd6c88bb36e2fac4748aa602bf
937f7d915f988499400b698254c3a960eacf1f6d
8 changes: 4 additions & 4 deletions build/pkgs/eclib/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=eclib-VERSION.tar.bz2
sha1=7c8b64bd9a1b8f4f489690a53c1f329afc953f2c
md5=03a87ae2b490f11b81ec6b305cbc8087
cksum=111064162
upstream_url=https://github.com/JohnCremona/eclib/releases/download/VERSION/eclib-VERSION.tar.bz2
sha1=bd49acf96c4e7246c8ca3e5d188ae1b03a3aeff3
md5=42721f2f1343c49dc774763a57a85ca6
cksum=3624641360
upstream_url=https://github.com/JohnCremona/eclib/releases/download/vVERSION/eclib-VERSION.tar.bz2
2 changes: 1 addition & 1 deletion build/pkgs/eclib/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20221012
20230424
2 changes: 1 addition & 1 deletion build/pkgs/eclib/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SAGE_SPKG_CONFIGURE([eclib], [
SAGE_SPKG_DEPCHECK([ntl pari flint], [
dnl Trac #31443, #34029: use existing eclib only if the version reported by pkg-config is correct
m4_pushdef([SAGE_ECLIB_VER],["20221012"])
m4_pushdef([SAGE_ECLIB_VER],["20230424"])
PKG_CHECK_MODULES([ECLIB], [eclib = SAGE_ECLIB_VER], [
AC_CACHE_CHECK([for mwrank version == SAGE_ECLIB_VER], [ac_cv_path_MWRANK], [
AC_PATH_PROGS_FEATURE_CHECK([MWRANK], [mwrank], [
Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/gcc/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ SAGE_SPKG_CONFIGURE_BASE([gcc], [
# Install our own GCC if the system-provided one is older than gcc 8
SAGE_SHOULD_INSTALL_GCC([you have $CXX version $GXX_VERSION, which is quite old])
],
[1[[3-9]].*], [
# Install our own GCC if the system-provided one is newer than 12.x.
[1[[4-9]].*], [
# Install our own GCC if the system-provided one is newer than 13.x.
# See https://github.com/sagemath/sage/issues/29456
SAGE_SHOULD_INSTALL_GCC([$CXX is g++ version $GXX_VERSION, which is too recent for this version of Sage])
])
Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/gfortran/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ SAGE_SPKG_CONFIGURE([gfortran], [
# Install our own gfortran if the system-provided one is older than gcc-4.8.
SAGE_SHOULD_INSTALL_GFORTRAN([$FC is version $GFORTRAN_VERSION, which is quite old])
],
[1[[3-9]].*], [
# Install our own gfortran if the system-provided one is newer than 12.x.
[1[[4-9]].*], [
# Install our own gfortran if the system-provided one is newer than 13.x.
# See https://github.com/sagemath/sage/issues/29456, https://github.com/sagemath/sage/issues/31838
SAGE_MUST_INSTALL_GFORTRAN([$FC is version $GFORTRAN_VERSION, which is too recent for this version of Sage])
])
Expand Down
23 changes: 23 additions & 0 deletions build/pkgs/givaro/patches/218.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From c7744bb133496cd7ac04688f345646d505e1bf52 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 19 Jan 2023 09:12:22 -0500
Subject: [PATCH] Add missing #include <cstdint> for (u)int64_t

Fixes failure to compile on GCC 13.
---
src/library/poly1/givdegree.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/library/poly1/givdegree.h b/src/library/poly1/givdegree.h
index 3753a425..eb85a0dd 100644
--- a/src/library/poly1/givdegree.h
+++ b/src/library/poly1/givdegree.h
@@ -19,6 +19,8 @@
#ifndef __GIVARO_poly1degree_H
#define __GIVARO_poly1degree_H

+#include <cstdint>
+
#include <iostream>

namespace Givaro {
21 changes: 19 additions & 2 deletions build/pkgs/openblas/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SAGE_SPKG_CONFIGURE([openblas], [
dnl Reject openblas 0.3.22 - https://github.com/sagemath/sage/pull/35371
m4_pushdef([SAGE_OPENBLAS_LT_VERSION_MAJOR], [0])
m4_pushdef([SAGE_OPENBLAS_LT_VERSION_MINOR], [3])
m4_pushdef([SAGE_OPENBLAS_LT_VERSION_MICRO], [22])
m4_pushdef([SAGE_OPENBLAS_LT_VERSION_MICRO], [99])
m4_pushdef([SAGE_OPENBLAS_LT_VERSION], [SAGE_OPENBLAS_LT_VERSION_MAJOR.SAGE_OPENBLAS_LT_VERSION_MINOR.SAGE_OPENBLAS_LT_VERSION_MICRO])
PKG_CHECK_MODULES([OPENBLAS], [openblas >= ]SAGE_OPENBLAS_MIN_VERSION [openblas < ]SAGE_OPENBLAS_LT_VERSION, [
LIBS="$OPENBLAS_LIBS $LIBS"
Expand Down Expand Up @@ -40,6 +40,21 @@ SAGE_SPKG_CONFIGURE([openblas], [
AC_MSG_WARN([Unable to locate the directory of openblas.pc. This should not happen!])
sage_spkg_install_openblas=yes
])
AS_IF([test x$sage_spkg_install_openblas != xyes], [
AC_MSG_CHECKING([the OpenBLAS version using openblas_get_config])
AC_LANG_PUSH([C])
AC_RUN_IFELSE([
dnl Reject 0.3.22 - see https://github.com/sagemath/sage/pull/35377
AC_LANG_PROGRAM([[#include <string.h>
char *openblas_get_config(void); ]],
[[if (!strncmp(openblas_get_config(), "OpenBLAS 0.3.22", 15)) return 1;]])
], [
AC_MSG_RESULT([good])
], [
AC_MSG_RESULT([known bad version])
sage_spkg_install_openblas=yes])
AC_LANG_POP([C])
])
AS_IF([test x$sage_spkg_install_openblas != xyes], [
AC_SUBST([SAGE_SYSTEM_FACADE_PC_FILES])
AC_SUBST([SAGE_OPENBLAS_PC_COMMAND], ["\$(LN) -sf \"$OPENBLASPCDIR/openblas.pc\" \"\$(@)\""])
Expand All @@ -66,6 +81,7 @@ SAGE_SPKG_CONFIGURE([openblas], [
AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[#include <stdio.h>
#include <string.h>
char *openblas_get_config(void);
int version[3]; ]],
[[version[0] = version[1] = version[2] = 0;
Expand All @@ -86,7 +102,8 @@ SAGE_SPKG_CONFIGURE([openblas], [
>=10000 * ]]SAGE_OPENBLAS_LT_VERSION_MAJOR[[
+ 100 * ]]SAGE_OPENBLAS_LT_VERSION_MINOR[[
+ ]]SAGE_OPENBLAS_LT_VERSION_MICRO[[)
return 1;]])
return 1;
if (!strncmp(openblas_get_config(), "OpenBLAS 0.3.22", 15)) return 1;]])
], [AS_VAR_SET([HAVE_OPENBLAS], [yes])], [AS_VAR_SET([HAVE_OPENBLAS], [no])],
[AS_VAR_SET([HAVE_OPENBLAS], [yes])])
AC_LANG_POP([C])
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/openssl/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=openssl-VERSION.tar.gz
sha1=a5305213c681a5a4322dad7347a6e66b7b6ef3c7
md5=163bb3e58c143793d1dc6a6ec7d185d5
cksum=439183449
sha1=580d8a7232327fe1fa6e7db54ac060d4321f40ab
md5=61e017cf4fea1b599048f621f1490fbd
cksum=1708357994
upstream_url=https://www.openssl.org/source/openssl-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/openssl/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.5
3.0.8
2 changes: 1 addition & 1 deletion build/pkgs/sage_conf/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-conf ~= 10.0rc0
sage-conf ~= 10.0rc3
2 changes: 1 addition & 1 deletion build/pkgs/sage_docbuild/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-docbuild ~= 10.0rc0
sage-docbuild ~= 10.0rc3
2 changes: 1 addition & 1 deletion build/pkgs/sage_setup/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-setup ~= 10.0rc0
sage-setup ~= 10.0rc3
2 changes: 1 addition & 1 deletion build/pkgs/sage_sws2rst/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-sws2rst ~= 10.0rc0
sage-sws2rst ~= 10.0rc3
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagelib ~= 10.0rc0
sagelib ~= 10.0rc3
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_categories/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-categories ~= 10.0rc0
sagemath-categories ~= 10.0rc3
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_environment/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-environment ~= 10.0rc0
sagemath-environment ~= 10.0rc3
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_objects/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-objects ~= 10.0rc0
sagemath-objects ~= 10.0rc3
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_repl/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-repl ~= 10.0rc0
sagemath-repl ~= 10.0rc3
1 change: 1 addition & 0 deletions build/pkgs/zeromq/distros/arch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zeromq
1 change: 1 addition & 0 deletions build/pkgs/zeromq/distros/gentoo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
net-libs/zeromq
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From 438d5d88392baffa6c2c5e0737d9de19d6686f0d Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Tue, 20 Dec 2022 21:45:16 +0000
Subject: [PATCH] src/secure_allocator.hpp: define missing 'rebind' type

`gcc-13` added an assert to standard headers to make sure custom
allocators have intended implementation of rebind type instead
of inherited rebind. gcc change:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=64c986b49558a7

Without the fix build fails on this week's `gcc-13` as:

[ 92%] Building CXX object tests/CMakeFiles/test_security_curve.dir/test_security_curve.cpp.o
In file included from /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/ext/alloc_traits.h:34,
from /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/stl_uninitialized.h:64,
from /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/memory:69,
from tests/../src/secure_allocator.hpp:42,
from tests/../src/curve_client_tools.hpp:49,
from tests/test_security_curve.cpp:53:
/<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind<zmq::secure_allocator_t<unsigned char>, unsigned char, void>':
/<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:94:11: required by substitution of 'template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = zmq::secure_allocator_t<unsigned char>; _Up = unsigned char]'
/<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:228:8: required by substitution of 'template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = unsigned char; _Alloc = zmq::secure_allocator_t<unsigned char>]'
/<<NIX>>/gcc-13.0.0/include/c++/13.0.0/ext/alloc_traits.h:126:65: required from 'struct __gnu_cxx::__alloc_traits<zmq::secure_allocator_t<unsigned char>, unsigned char>::rebind<unsigned char>'
/<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/stl_vector.h:88:21: required from 'struct std::_Vector_base<unsigned char, zmq::secure_allocator_t<unsigned char> >'
/<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/stl_vector.h:423:11: required from 'class std::vector<unsigned char, zmq::secure_allocator_t<unsigned char> >'
tests/../src/curve_client_tools.hpp:64:76: required from here
/<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
70 | _Tp>::value,
| ^~~~~

The change adds trivial `rebind` definition with expected return type
and satisfies conversion requirements.
---
src/secure_allocator.hpp | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/src/secure_allocator.hpp b/src/secure_allocator.hpp
index e0871dcc99..5e97368911 100644
--- a/src/secure_allocator.hpp
+++ b/src/secure_allocator.hpp
@@ -99,6 +99,17 @@ bool operator!= (const secure_allocator_t<T> &, const secure_allocator_t<U> &)
#else
template <typename T> struct secure_allocator_t : std::allocator<T>
{
+ secure_allocator_t () ZMQ_DEFAULT;
+
+ template <class U>
+ secure_allocator_t (const secure_allocator_t<U> &) ZMQ_NOEXCEPT
+ {
+ }
+
+ template <class U> struct rebind
+ {
+ typedef secure_allocator_t<U> other;
+ };
};
#endif
}
2 changes: 1 addition & 1 deletion pkgs/sage-conf/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
2 changes: 1 addition & 1 deletion pkgs/sage-conf_pypi/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
2 changes: 1 addition & 1 deletion pkgs/sage-docbuild/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
2 changes: 1 addition & 1 deletion pkgs/sage-setup/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
2 changes: 1 addition & 1 deletion pkgs/sage-sws2rst/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
2 changes: 1 addition & 1 deletion pkgs/sagemath-categories/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
2 changes: 1 addition & 1 deletion pkgs/sagemath-environment/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
2 changes: 1 addition & 1 deletion pkgs/sagemath-objects/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
2 changes: 1 addition & 1 deletion pkgs/sagemath-repl/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
2 changes: 1 addition & 1 deletion src/.relint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
namespace package. Type import_statements("SOME_IDENTIFIER") to find a more specific import,
or use 'sage --fiximports' to fix automatically in the source file.
# Keep in sync with SAGE_ROOT/src/sage/misc/replace_dot_all.py
pattern: 'from\s+sage(|[.](arith|categories|combinat|crypto|databases|data_structures|dynamics|ext|game_theory|games|graphs|groups|interfaces|manifolds|matrix|matroids|misc|modules|monoids|numerical|probability|quadratic_forms|quivers|rings|sat|schemes|sets|stats|tensor)[a-z0-9_.]*|[.]libs)[.]all\s+import'
pattern: 'from\s+sage(|[.](arith|categories|combinat|crypto|databases|data_structures|dynamics|ext|game_theory|games|graphs|groups|interfaces|manifolds|matrix|matroids|misc|modules|monoids|numerical|probability|quadratic_forms|quivers|rings|sat|schemes|sets|stats|symbolic|tensor)[a-z0-9_.]*|[.]libs)[.]all\s+import'
# imports from .all are allowed in all.py; also allow in some modules that need sage.all
filePattern: '(.*/|)(?!(all|benchmark|dev_tools|parsing|sage_eval))[^/.]*[.](py|pyx|pxi)$'

Expand Down
2 changes: 1 addition & 1 deletion src/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.rc0
10.0.rc3
6 changes: 3 additions & 3 deletions src/bin/sage-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# which stops "setup.py develop" from rewriting it as a Python file.
:
# This file is auto-generated by the sage-update-version script, do not edit!
SAGE_VERSION='10.0.rc0'
SAGE_RELEASE_DATE='2023-04-23'
SAGE_VERSION_BANNER='SageMath version 10.0.rc0, Release Date: 2023-04-23'
SAGE_VERSION='10.0.rc3'
SAGE_RELEASE_DATE='2023-05-12'
SAGE_VERSION_BANNER='SageMath version 10.0.rc3, Release Date: 2023-05-12'
2 changes: 1 addition & 1 deletion src/sage/categories/classical_crystals.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def demazure_character(self, w, f=None):
u = self.algebra(ZZ).sum_of_monomials(self.module_generators)
u = self.demazure_operator(u, word)
if f is None:
from sage.symbolic.all import SR as P
from sage.symbolic.ring import SR as P
x = [P.var('x%s' % (i+1)) for i in range(n)]
# TODO: use P.linear_combination when PolynomialRing will be a ModulesWithBasis
return sum((coeff*prod((x[i]**(c.weight()[i]) for i in range(n)), P.one()) for c, coeff in u), P.zero())
Expand Down
4 changes: 2 additions & 2 deletions src/sage/functions/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
from sage.symbolic.expression import Expression
from sage.functions.all import exp
from sage.misc.functional import sqrt
from sage.symbolic.constants import pi
from sage.symbolic.constants import I, pi
from sage.rings.rational import Rational
from sage.rings.infinity import unsigned_infinity
from sage.symbolic.expression import I


class Function_erf(BuiltinFunction):
r"""
Expand Down
3 changes: 1 addition & 2 deletions src/sage/misc/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -1881,8 +1881,7 @@ def _do_sqrt(x, prec=None, extend=True, all=False):
from sage.rings.complex_mpfr import ComplexField
return ComplexField(prec)(x).sqrt(all=all)
if x == -1:
from sage.symbolic.expression import I
z = I
from sage.symbolic.constants import I as z
else:
from sage.symbolic.ring import SR
z = SR(x).sqrt()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/modular/modform_hecketriangle/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def lseries(self, num_prec=None, max_imaginary_part=0, max_asymp_coeffs=40):
-23.9781792831...
"""
from sage.rings.integer_ring import ZZ
from sage.symbolic.all import pi
from sage.symbolic.constants import pi
from sage.misc.functional import sqrt
from sage.lfunctions.dokchitser import Dokchitser

Expand Down
2 changes: 1 addition & 1 deletion src/sage/modules/vector_symbolic_dense.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#*****************************************************************************

from . import free_module_element
from sage.symbolic.all import Expression
from sage.symbolic.expression import Expression


def apply_map(phi):
Expand Down
3 changes: 2 additions & 1 deletion src/sage/quadratic_forms/genera/genus.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ def genera(sig_pair, determinant, max_scale=None, even=False):
return genera


genera = staticmethod(genera)
# #35557: In Python < 3.10, a staticmethod cannot be called directly
_genera_staticmethod = staticmethod(genera)


def _local_genera(p, rank, det_val, max_scale, even):
Expand Down
5 changes: 2 additions & 3 deletions src/sage/quadratic_forms/quadratic_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,8 @@ class QuadraticForm(SageObject):
])

# Genus
lazy_import("sage.quadratic_forms.genera.genus", [
"genera"
])
lazy_import("sage.quadratic_forms.genera.genus",
"_genera_staticmethod", as_="genera")

def __init__(self, R, n=None, entries=None, unsafe_initialization=False, number_of_automorphisms=None, determinant=None):
"""
Expand Down
Loading

0 comments on commit 4a7c0c2

Please sign in to comment.