From 732d3b370ba11d101a811f1c89d4dbc3e46ff1fc Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 18:46:57 +0000 Subject: [PATCH 01/56] Try and speed up any_root --- .../rings/polynomial/polynomial_element.pyx | 70 +++++++++++++++---- 1 file changed, 55 insertions(+), 15 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 94d5854976a..cbb49703a3f 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2560,22 +2560,65 @@ cdef class Polynomial(CommutativePolynomial): return rs[0] raise ValueError(f"polynomial {self} has no roots") - # When the degree is none, we only look for a linear factor - if degree is None: - # if a ring is given try and coerce the polynomial into this ring - if ring is not None: + # Ensure that a provided ring is appropriate for the function + if ring is not None: + # If the new ring is not a finite field, attempt to coerce the polynomial + # and call the function to use naive factoring + if not ring in FiniteFields(): try: - self = self.change_ring(ring) + f = self.change_ring(ring) except ValueError: raise(f"cannot coerce polynomial {self} to the new ring: {ring}") + return f.any_root() - # try and find a linear irreducible polynomial from f to compute a root - try: - f = self.any_irreducible_factor(degree=1, assume_squarefree=assume_squarefree) - except ValueError: - raise ValueError(f"no root of polynomial {self} can be computed") + # If the ring is a finite field, ensure it's an extension of the base ring + if self.base_ring().characteristic() != ring.characteristic(): + raise ValueError("ring must have the same characteristic as the base ring") + if not self.base_ring().degree().divides(ring.degree()): + raise ValueError("ring must be an extension of the base ring") - return - f[0] / f[1] + # When the degree is none, we only look for a linear factor + if degree is None: + # When ring is None, we attempt to find a linear factor of self + if ring is None: + try: + f = self.any_irreducible_factor(degree=1, assume_squarefree=assume_squarefree) + except ValueError: + raise ValueError(f"no root of polynomial {self} can be computed") + return - f[0] / f[1] + # When we have a ring, then we can find an irreducible factor of degree `d` providing + # that d divides the degree of the extension from the base ring to the given ring + else: + allowed_extension_degree = ring.degree() // self.base_ring().degree() + for d in allowed_extension_degree.divisors(): + try: + f = self.any_irreducible_factor(degree=d, assume_squarefree=assume_squarefree) + except ValueError: + continue + # When d != 1 we then find the smallest extension + # TODO: This is really annoying. What we should do here is compute some minimal + # extension F_ext = self.base_ring().extension(d, names="a") and find a + # root here and then coerce this root into the parent ring. This means we + # would work with the smallest possible extension. + # However, if we have some element of GF(p^k) and we try and coerce this to + # some element GF(p^(k*n)) this can fail, even though mathematically it + # should be fine. As a result, we simply coerce straight to the user supplied + # ring and find a root here. + # TODO: Additionally, if the above was solved, it would be faster to extend the base + # ring with the irreducible factor however, if the base ring is an extension + # then the type of self.base_ring().extension(f) is a Univariate Quotient Polynomial Ring + # and not a finite field. So we do the slower option here to ensure the type is + # maintained. + if not d.is_one(): + f = f.change_ring(ring) + + # Now we find the root of this irreducible polynomial over this extension + root = f.any_root() + return ring(root) + + + # If the loop ends and we returned nothing, then no root exists + raise ValueError(f"no root of polynomial {self} can be computed over the ring {ring}") # The old version of `any_root()` allowed degree < 0 to indicate that the input polynomial # had a distinct degree factorisation, we pass this to any_irreducible_factor as a bool and @@ -2617,11 +2660,8 @@ cdef class Polynomial(CommutativePolynomial): # FiniteField type if the base field is a non-prime field, # so this slower option is chosen to ensure the root is # over explicitly a FiniteField type. - ring = self.base_ring().extension(f.degree(), names="a") + ring = self.base_ring().extension(degree, names="a") - # Now we look for a linear root of this irreducible polynomial of degree `degree` - # over the user supplied ring or the extension we just computed. If the user sent - # a bad ring here of course there may be no root found. f = f.change_ring(ring) return f.any_root() From 38e93a51a57cc6bbc914e9ed8e30a8dcf0946adf Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 18:52:17 +0000 Subject: [PATCH 02/56] Replace comment --- src/sage/rings/polynomial/polynomial_element.pyx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index cbb49703a3f..b0eb7b7225a 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2662,6 +2662,9 @@ cdef class Polynomial(CommutativePolynomial): # over explicitly a FiniteField type. ring = self.base_ring().extension(degree, names="a") + # Now we look for a linear root of this irreducible polynomial of degree `degree` + # over the user supplied ring or the extension we just computed. If the user sent + # a bad ring here of course there may be no root found. f = f.change_ring(ring) return f.any_root() From e3b12dd5a0bc2de3e170e241c414013d07ec2a57 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 19:12:21 +0000 Subject: [PATCH 03/56] linter --- src/sage/rings/polynomial/polynomial_element.pyx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index b0eb7b7225a..d5f68598edf 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2564,7 +2564,7 @@ cdef class Polynomial(CommutativePolynomial): if ring is not None: # If the new ring is not a finite field, attempt to coerce the polynomial # and call the function to use naive factoring - if not ring in FiniteFields(): + if ring not in FiniteFields(): try: f = self.change_ring(ring) except ValueError: @@ -2605,18 +2605,17 @@ cdef class Polynomial(CommutativePolynomial): # should be fine. As a result, we simply coerce straight to the user supplied # ring and find a root here. # TODO: Additionally, if the above was solved, it would be faster to extend the base - # ring with the irreducible factor however, if the base ring is an extension + # ring with the irreducible factor however, if the base ring is an extension # then the type of self.base_ring().extension(f) is a Univariate Quotient Polynomial Ring # and not a finite field. So we do the slower option here to ensure the type is # maintained. if not d.is_one(): f = f.change_ring(ring) - + # Now we find the root of this irreducible polynomial over this extension root = f.any_root() return ring(root) - # If the loop ends and we returned nothing, then no root exists raise ValueError(f"no root of polynomial {self} can be computed over the ring {ring}") From 2569e61c6a71c168e9287c963e983855092d888e Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 22:07:10 +0000 Subject: [PATCH 04/56] Slightly more intelligent way to find correct degree irr --- .../rings/polynomial/polynomial_element.pyx | 79 ++++++++++--------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index d5f68598edf..8e9ba31b517 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2200,7 +2200,7 @@ cdef class Polynomial(CommutativePolynomial): # If you are reaching this error, chances are there's a bug in the code. raise AssertionError(f"no splitting of degree {degree} found for {self}") - def _any_irreducible_factor_squarefree(self, degree=None): + def _any_irreducible_factor_squarefree(self, degree=None, ext_degree=None): """ Helper function for any_irreducible_factor which computes an irreducible factor from self, assuming the input is @@ -2210,10 +2210,13 @@ cdef class Polynomial(CommutativePolynomial): of self and then finds a factor with Cantor-Zassenhaus splitting. - If degree is not None, then only irreducible factors of degree - `degree` are searched for, otherwise the smallest degree factor + If degree is not ``None``, then only irreducible factors of degree + ``degree`` are searched for, otherwise the smallest degree factor is found. + If ext_degree is not ``None``, then only irreducible factors whose + degree divides ``ext_degree`` are returned. + EXAMPLES:: sage: # needs sage.rings.finite_rings @@ -2262,10 +2265,13 @@ cdef class Polynomial(CommutativePolynomial): # Otherwise we use the smallest possible d value for (poly, d) in self._distinct_degree_factorisation_squarefree(): - return poly._cantor_zassenhaus_split_to_irreducible(d) + if ext_degree is None: + return poly._cantor_zassenhaus_split_to_irreducible(d) + elif ZZ(d).divides(ext_degree): + return poly._cantor_zassenhaus_split_to_irreducible(d) raise ValueError(f"no irreducible factor could be computed from {self}") - def any_irreducible_factor(self, degree=None, assume_squarefree=False, assume_distinct_deg=False): + def any_irreducible_factor(self, degree=None, assume_squarefree=False, assume_distinct_deg=False, ext_degree=None): """ Return an irreducible factor of this polynomial. @@ -2286,6 +2292,11 @@ cdef class Polynomial(CommutativePolynomial): this polynomial is assumed to be the product of irreducible polynomials of degree equal to ``degree``. + - ``ext_degree`` (None or positive integer) -- (default: ``None``). + Used for polynomials over finite fields. If not ``None`` only returns + irreducible factors of ``self`` whose degree divides ``ext_degree``. + Assumes that ``degree`` is ``None``. + EXAMPLES:: sage: # needs sage.rings.finite_rings @@ -2399,7 +2410,7 @@ cdef class Polynomial(CommutativePolynomial): if assume_squarefree: if assume_distinct_deg: return self._cantor_zassenhaus_split_to_irreducible(degree) - return self._any_irreducible_factor_squarefree(degree) + return self._any_irreducible_factor_squarefree(degree, ext_degree) # Otherwise we compute the squarefree decomposition and check each # polynomial for a root. If no poly has a root, we raise an error. @@ -2407,7 +2418,7 @@ cdef class Polynomial(CommutativePolynomial): SFD.sort() for poly, _ in SFD: try: - return poly._any_irreducible_factor_squarefree(degree) + return poly._any_irreducible_factor_squarefree(degree, ext_degree) except ValueError: pass @@ -2586,38 +2597,34 @@ cdef class Polynomial(CommutativePolynomial): except ValueError: raise ValueError(f"no root of polynomial {self} can be computed") return - f[0] / f[1] + # When we have a ring, then we can find an irreducible factor of degree `d` providing # that d divides the degree of the extension from the base ring to the given ring - else: - allowed_extension_degree = ring.degree() // self.base_ring().degree() - for d in allowed_extension_degree.divisors(): - try: - f = self.any_irreducible_factor(degree=d, assume_squarefree=assume_squarefree) - except ValueError: - continue - # When d != 1 we then find the smallest extension - # TODO: This is really annoying. What we should do here is compute some minimal - # extension F_ext = self.base_ring().extension(d, names="a") and find a - # root here and then coerce this root into the parent ring. This means we - # would work with the smallest possible extension. - # However, if we have some element of GF(p^k) and we try and coerce this to - # some element GF(p^(k*n)) this can fail, even though mathematically it - # should be fine. As a result, we simply coerce straight to the user supplied - # ring and find a root here. - # TODO: Additionally, if the above was solved, it would be faster to extend the base - # ring with the irreducible factor however, if the base ring is an extension - # then the type of self.base_ring().extension(f) is a Univariate Quotient Polynomial Ring - # and not a finite field. So we do the slower option here to ensure the type is - # maintained. - if not d.is_one(): - f = f.change_ring(ring) - - # Now we find the root of this irreducible polynomial over this extension - root = f.any_root() - return ring(root) - - # If the loop ends and we returned nothing, then no root exists + allowed_extension_degree = ring.degree() // self.base_ring().degree() + try: + f = self.any_irreducible_factor(assume_squarefree=assume_squarefree, ext_degree=allowed_extension_degree) + except ValueError: raise ValueError(f"no root of polynomial {self} can be computed over the ring {ring}") + # When d != 1 we then find the smallest extension + # TODO: This is really annoying. What we should do here is compute some minimal + # extension F_ext = self.base_ring().extension(d, names="a") and find a + # root here and then coerce this root into the parent ring. This means we + # would work with the smallest possible extension. + # However, if we have some element of GF(p^k) and we try and coerce this to + # some element GF(p^(k*n)) this can fail, even though mathematically it + # should be fine. As a result, we simply coerce straight to the user supplied + # ring and find a root here. + # TODO: Additionally, if the above was solved, it would be faster to extend the base + # ring with the irreducible factor however, if the base ring is an extension + # then the type of self.base_ring().extension(f) is a Univariate Quotient Polynomial Ring + # and not a finite field. So we do the slower option here to ensure the type is + # maintained. + if not f.degree().is_one(): + f = f.change_ring(ring) + + # Now we find the root of this irreducible polynomial over this extension + root = f.any_root() + return ring(root) # The old version of `any_root()` allowed degree < 0 to indicate that the input polynomial # had a distinct degree factorisation, we pass this to any_irreducible_factor as a bool and From 09bcfdd23505651eadcbec7ca129d89d516afc6d Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 22:41:42 +0000 Subject: [PATCH 05/56] Use f.roots() instead of f.any_root() when working with extensions --- .../rings/polynomial/polynomial_element.pyx | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 8e9ba31b517..b91075a93e2 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2612,19 +2612,28 @@ cdef class Polynomial(CommutativePolynomial): # would work with the smallest possible extension. # However, if we have some element of GF(p^k) and we try and coerce this to # some element GF(p^(k*n)) this can fail, even though mathematically it - # should be fine. As a result, we simply coerce straight to the user supplied - # ring and find a root here. + # should be fine. # TODO: Additionally, if the above was solved, it would be faster to extend the base # ring with the irreducible factor however, if the base ring is an extension # then the type of self.base_ring().extension(f) is a Univariate Quotient Polynomial Ring - # and not a finite field. So we do the slower option here to ensure the type is - # maintained. - if not f.degree().is_one(): - f = f.change_ring(ring) - - # Now we find the root of this irreducible polynomial over this extension - root = f.any_root() - return ring(root) + # and not a finite field. + + # When f has degree one we simply return the roots + # TODO: should we write something fast for degree two using + # the quadratic formula? + if f.degree().is_one(): + root = - f[0] / f[1] + return ring(root) + + # TODO: The proper thing to do here would be to call + # return f.change_ring(ring).any_root() + # but as we cannot work in the minimal extension (see above) working + # in the extension for f.change_ring(ring).any_root() is almost always + # much much much slower than using the call for roots() which uses + # C library bindings for all finite fields. + # Until the coercion system for finite fields works better, + # this will be the most performant + return f.roots(ring, multiplicities=False)[0] # The old version of `any_root()` allowed degree < 0 to indicate that the input polynomial # had a distinct degree factorisation, we pass this to any_irreducible_factor as a bool and @@ -2668,11 +2677,15 @@ cdef class Polynomial(CommutativePolynomial): # over explicitly a FiniteField type. ring = self.base_ring().extension(degree, names="a") - # Now we look for a linear root of this irreducible polynomial of degree `degree` - # over the user supplied ring or the extension we just computed. If the user sent - # a bad ring here of course there may be no root found. - f = f.change_ring(ring) - return f.any_root() + # TODO: The proper thing to do here would be to call + # return f.change_ring(ring).any_root() + # but as we cannot work in the minimal extension (see above) working + # in the extension for f.change_ring(ring).any_root() is almost always + # much much much slower than using the call for roots() which uses + # C library bindings for all finite fields. + # Until the coercion system for finite fields works better, + # this will be the most performant + return f.roots(ring, multiplicities=False)[0] def __truediv__(left, right): r""" From 2ce4dddbd612b3c1322a29505305a49e48b1aa2f Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sat, 24 Feb 2024 00:28:06 +0000 Subject: [PATCH 06/56] fix issue 37445 --- src/sage/rings/polynomial/polynomial_element.pyx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index b91075a93e2..d218e76410a 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2151,6 +2151,18 @@ cdef class Polynomial(CommutativePolynomial): True sage: f % factor == 0 True + + TESTS: + + Ensure that :issue:`37445` is fixed:: + + sage: R. = GF(13)[] + sage: def irr(d, R): return f.monic() if (f := R.random_element(d)).is_irreducible() else irr(d, R) + sage: f = prod(irr(6, R) for _ in range(10)) + sage: irr = f._cantor_zassenhaus_split_to_irreducible(6) + sage: assert irr.degree() == 6 + sage: assert f % irr == 0 + sage: assert irr.is_irreducible() """ R = self.parent() q = self.base_ring().order() @@ -2174,7 +2186,7 @@ cdef class Polynomial(CommutativePolynomial): # Need to handle odd and even characteristic separately if q % 2: - h = self.gcd(pow(T, (q-1)//2, self) - 1) + h = self.gcd(pow(T, (q**degree-1)//2, self) - 1) else: # Compute the trace of T with field of order 2^k # sum T^(2^i) for i in range (degree * k) From 7a61d6abc8f9f3aa40a237b14e31e71a3089a1c8 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sat, 24 Feb 2024 00:59:57 +0000 Subject: [PATCH 07/56] review comments --- .../rings/polynomial/polynomial_element.pyx | 52 ++++++++----------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index d218e76410a..95e8b5a0e10 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -133,7 +133,7 @@ from sage.categories.morphism cimport Morphism from sage.misc.superseded import deprecation_cython as deprecation, deprecated_function_alias from sage.misc.cachefunc import cached_method - +from sage.misc.prandom import choice cpdef is_Polynomial(f) noexcept: """ @@ -2214,7 +2214,7 @@ cdef class Polynomial(CommutativePolynomial): def _any_irreducible_factor_squarefree(self, degree=None, ext_degree=None): """ - Helper function for any_irreducible_factor which computes + Helper function for ``any_irreducible_factor()`` which computes an irreducible factor from self, assuming the input is squarefree. @@ -2222,11 +2222,11 @@ cdef class Polynomial(CommutativePolynomial): of self and then finds a factor with Cantor-Zassenhaus splitting. - If degree is not ``None``, then only irreducible factors of degree + If ``degree`` is not ``None``, then only irreducible factors of degree ``degree`` are searched for, otherwise the smallest degree factor is found. - If ext_degree is not ``None``, then only irreducible factors whose + If ``ext_degree`` is not ``None``, then only irreducible factors whose degree divides ``ext_degree`` are returned. EXAMPLES:: @@ -2304,10 +2304,9 @@ cdef class Polynomial(CommutativePolynomial): this polynomial is assumed to be the product of irreducible polynomials of degree equal to ``degree``. - - ``ext_degree`` (None or positive integer) -- (default: ``None``). - Used for polynomials over finite fields. If not ``None`` only returns + - ``ext_degree`` -- positive integer or ``None`` (default); + used for polynomials over finite fields. If not ``None`` only returns irreducible factors of ``self`` whose degree divides ``ext_degree``. - Assumes that ``degree`` is ``None``. EXAMPLES:: @@ -2577,28 +2576,19 @@ cdef class Polynomial(CommutativePolynomial): # When not working over a finite field, do the simple thing of factoring for # roots and picking the first root. If none are available, raise an error. from sage.categories.finite_fields import FiniteFields - if not self.base_ring() in FiniteFields(): - rs = self.roots(ring=ring, multiplicities=False) - if rs: - return rs[0] - raise ValueError(f"polynomial {self} has no roots") - - # Ensure that a provided ring is appropriate for the function - if ring is not None: - # If the new ring is not a finite field, attempt to coerce the polynomial - # and call the function to use naive factoring + if self.base_ring() not in FiniteFields(): if ring not in FiniteFields(): - try: - f = self.change_ring(ring) - except ValueError: - raise(f"cannot coerce polynomial {self} to the new ring: {ring}") - return f.any_root() - - # If the ring is a finite field, ensure it's an extension of the base ring - if self.base_ring().characteristic() != ring.characteristic(): - raise ValueError("ring must have the same characteristic as the base ring") - if not self.base_ring().degree().divides(ring.degree()): - raise ValueError("ring must be an extension of the base ring") + rs = self.roots(ring=ring, multiplicities=False) + if rs: + return choice(rs) + raise ValueError(f"polynomial {self} has no roots") + + # Ensure that a provided ring is appropriate for the function. From the + # above we know it is either None or a finite field. When it's a finite + # field we ensure there's a coercion from the base ring to ring. + if ring is not None: + if ring.coerce_map_from(self.base_ring()) is None: + raise ValueError(f"no coercion map can be computed from {self.base_ring()} to {ring}") # When the degree is none, we only look for a linear factor if degree is None: @@ -2645,7 +2635,8 @@ cdef class Polynomial(CommutativePolynomial): # C library bindings for all finite fields. # Until the coercion system for finite fields works better, # this will be the most performant - return f.roots(ring, multiplicities=False)[0] + roots = f.roots(ring, multiplicities=False) + return choice(roots) # The old version of `any_root()` allowed degree < 0 to indicate that the input polynomial # had a distinct degree factorisation, we pass this to any_irreducible_factor as a bool and @@ -2697,7 +2688,8 @@ cdef class Polynomial(CommutativePolynomial): # C library bindings for all finite fields. # Until the coercion system for finite fields works better, # this will be the most performant - return f.roots(ring, multiplicities=False)[0] + roots = f.roots(ring, multiplicities=False) + return choice(roots) def __truediv__(left, right): r""" From a7bdc3e85895038a5ca32b38e86c75d0a20e5d6b Mon Sep 17 00:00:00 2001 From: Giacomo Pope <44242839+GiacomoPope@users.noreply.github.com> Date: Sat, 24 Feb 2024 01:03:39 +0000 Subject: [PATCH 08/56] Apply suggestions from code review Co-authored-by: grhkm21 <83517584+grhkm21@users.noreply.github.com> --- src/sage/rings/polynomial/polynomial_element.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 95e8b5a0e10..b93ef317bff 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2214,7 +2214,7 @@ cdef class Polynomial(CommutativePolynomial): def _any_irreducible_factor_squarefree(self, degree=None, ext_degree=None): """ - Helper function for ``any_irreducible_factor()`` which computes + Helper function for :meth:`any_irreducible_factor` which computes an irreducible factor from self, assuming the input is squarefree. From 030ce6df2dd8140947b8181c1f7a664a91a5bf4d Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sat, 24 Feb 2024 14:08:23 +0000 Subject: [PATCH 09/56] Better error handling --- src/sage/rings/polynomial/polynomial_element.pyx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 95e8b5a0e10..9e033c01bf1 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2172,8 +2172,8 @@ cdef class Polynomial(CommutativePolynomial): return self # We expect to succeed with greater than 1/2 probability, - # so if we try 1000 times and fail, there's a bug somewhere. - for _ in range(1000): + # so if we try 100 times and fail, there's a bug somewhere. + for _ in range(100): # Sample a polynomial "uniformly" from R # TODO: once #37118 has been merged, this can be made cleaner, # as we will actually have access to uniform sampling. @@ -2281,7 +2281,9 @@ cdef class Polynomial(CommutativePolynomial): return poly._cantor_zassenhaus_split_to_irreducible(d) elif ZZ(d).divides(ext_degree): return poly._cantor_zassenhaus_split_to_irreducible(d) - raise ValueError(f"no irreducible factor could be computed from {self}") + if d > ext_degree: + raise ValueError(f"no irreducible factor of degree {degree} dividing {ext_degree} could be computed from {self}") + raise AssertionError(f"no irreducible factor could be computed from {self}") def any_irreducible_factor(self, degree=None, assume_squarefree=False, assume_distinct_deg=False, ext_degree=None): """ @@ -2436,6 +2438,9 @@ cdef class Polynomial(CommutativePolynomial): # If degree has been set, there could just be no factor of the desired degree if degree: raise ValueError(f"polynomial {self} has no irreducible factor of degree {degree}") + # If ext_degree has been set, then there may be no irreducible factor of degree dividing ext_degree + if ext_degree: + raise ValueError(f"polynomial {self} has no irreducible factor of degree dividing {ext_degree}") # But if any degree is allowed then there should certainly be a factor if self has degree > 0 raise AssertionError(f"no irreducible factor was computed for {self}. Bug.") From db3ecc42dd07df0b54761885ae10760df4974852 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sat, 24 Feb 2024 14:25:50 +0000 Subject: [PATCH 10/56] Make any_root deterministic for char 0 fields --- src/sage/rings/polynomial/polynomial_element.pyx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index b2f856a228e..cd4891ac548 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2585,7 +2585,11 @@ cdef class Polynomial(CommutativePolynomial): if ring not in FiniteFields(): rs = self.roots(ring=ring, multiplicities=False) if rs: - return choice(rs) + # TODO: this has been deterministic and changing this to be random + # breaks many doctests. For now we leave it deterministic but you + # could change it to choice(rs). This mainly breaks examples over + # of elliptic curve stuff over number fields + return rs[0] raise ValueError(f"polynomial {self} has no roots") # Ensure that a provided ring is appropriate for the function. From the From c451ea4ac68231e0776756a4e80520abe0533dab Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 8 Feb 2024 12:36:10 -0800 Subject: [PATCH 11/56] pkgs/sage-conf: Make 'python3 -m sage_conf' work like 'sage-config' --- pkgs/sage-conf/_sage_conf/__main__.py | 19 ++++++++----------- pkgs/sage-conf/sage_conf.py | 4 ++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/pkgs/sage-conf/_sage_conf/__main__.py b/pkgs/sage-conf/_sage_conf/__main__.py index fa0a8888907..043fcb24328 100644 --- a/pkgs/sage-conf/_sage_conf/__main__.py +++ b/pkgs/sage-conf/_sage_conf/__main__.py @@ -1,22 +1,19 @@ # Entry point 'sage-config'. It does not depend on any packages. -from sage_conf import * - def _main(): from argparse import ArgumentParser from sys import exit, stdout - parser = ArgumentParser() + + import sage_conf + + parser = ArgumentParser(prog='sage-config') parser.add_argument('--version', help="show version", action="version", - version='%(prog)s ' + VERSION) + version='%(prog)s ' + sage_conf.VERSION) parser.add_argument("VARIABLE", nargs='?', help="output the value of VARIABLE") args = parser.parse_args() - d = globals() if args.VARIABLE: - stdout.write('{}\n'.format(d[args.VARIABLE])) + stdout.write('{}\n'.format(getattr(sage_conf, args.VARIABLE))) else: - for k, v in d.items(): + for k in dir(sage_conf): if not k.startswith('_'): - stdout.write('{}={}\n'.format(k, v)) - -if __name__ == "__main__": - _main() + stdout.write('{}={}\n'.format(k, getattr(sage_conf, k))) diff --git a/pkgs/sage-conf/sage_conf.py b/pkgs/sage-conf/sage_conf.py index dd36f946828..a5c554043ba 100644 --- a/pkgs/sage-conf/sage_conf.py +++ b/pkgs/sage-conf/sage_conf.py @@ -1,2 +1,6 @@ from _sage_conf._conf import * from _sage_conf.__main__ import _main + + +if __name__ == "__main__": + _main() From 41ad0b5537b229365eec3feb47434c13b724e2c9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 8 Feb 2024 14:30:17 -0800 Subject: [PATCH 12/56] README.md: Expand section 'Alternative Installation using PyPI' --- README.md | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 422582292af..8add84575d8 100644 --- a/README.md +++ b/README.md @@ -420,16 +420,47 @@ in the Installation Guide. Alternative Installation using PyPI --------------- -For installation of `sage` in python using `pip` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps: +For installing Sage in a Python environment from PyPI, Sage provides the +`pip`-installable package [sagemath-standard](https://pypi.org/project/sagemath-standard/). - $ python3 -m pip install sage_conf - $ ls $(sage-config SAGE_SPKG_WHEELS) - $ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl sage_setup - $ python3 -m pip install --no-build-isolation sagemath-standard +Unless you need to install Sage into a specific existing environment, we recommend +to create and activate a fresh virtual environment, for example `~/sage-venv/`: -You need to install `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`. + $ python3 -m venv ~/sage-venv + $ source ~/sage-venv/bin/activate -**NOTE:** You can find `sage` and `sagemath` pip packages but with these packages, you will encounter `ModuleNotFoundError`. +As the first installation step, install [sage_conf](https://pypi.org/project/sage-conf/), +which builds various prerequisite packages in a subdirectory of `~/.sage/`: + + (sage-venv) $ python3 -m pip install -v sage_conf + +After a successful installation, a wheelhouse provides various Python packages. +You can list the wheels using the command: + + (sage-venv) $ ls $(sage-config SAGE_SPKG_WHEELS) + +If this gives an error saying that `sage-config` is not found, check any messages +that the `pip install` command may have printed. You may need to adjust your `PATH`, +for example by: + + $ export PATH="$(python3 -c 'import sysconfig; print(sysconfig.get_path("scripts", "posix_user"))'):$PATH" + +Now install the packages from the wheelhouse and the [sage_setup](https://pypi.org/project/sage-conf/) +package, and finally install the Sage library: + + (sage-venv) $ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl sage_setup + (sage-venv) $ python3 -m pip install --no-build-isolation -v sagemath-standard + +The above instructions install the latest stable release of Sage. +To install the latest development version instead, add the switch `--pre` to all invocations of +`python3 -m pip install`. + +**NOTE:** PyPI has various other `pip`-installable packages with the word "sage" in their names. +Some of them are maintained by the SageMath project, some are provided by SageMath users for +various purposes, and others are entirely unrelated to SageMath. Do not use the packages +`sage` and `sagemath`. For a curated list of packages, see the chapter +[Packages and Features](https://doc.sagemath.org/html/en/reference/spkg/index.html) of the +Sage Reference Manual. SageMath Docker images ---------------------- From f4e2aff3b15b097659dd31d476e33680f673a50f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 15:55:36 -0800 Subject: [PATCH 13/56] .github/workflows/macos.yml: Install tox from PyPI, not homebrew --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index bfa4bc58f96..0e8a76ad13d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -77,7 +77,7 @@ jobs: - name: Install test prerequisites run: | - brew install tox + pip install tox - name: Download upstream artifact uses: actions/download-artifact@v3 with: From 15193b35c9a5bfb48b9cea9daf434bcaefb2f4fb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 16:37:45 -0800 Subject: [PATCH 14/56] .github/workflows/macos.yml: Add tests on M1 runners --- .github/workflows/macos.yml | 17 +++++++++++------ tox.ini | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0e8a76ad13d..2cbeb765b20 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -19,17 +19,22 @@ on: type: string # System configuration osversion_xcodeversion_toxenv_tuples: + # As of 2024-02, "runs-on: macos-latest" is macos-12. + # and "runs-on: macos-14" selects the new M1 runners. + # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories description: 'Stringified JSON object' default: >- - [["latest", "", "homebrew-macos-usrlocal-minimal"], - ["latest", "", "homebrew-macos-usrlocal-standard"], - ["11", "xcode_13.2.1", "homebrew-macos-usrlocal-minimal"], + [["11", "xcode_13.2.1", "homebrew-macos-usrlocal-minimal"], + ["12", "", "homebrew-macos-usrlocal-minimal"], ["12", "", "homebrew-macos-usrlocal-standard"], + ["12", "", "homebrew-macos-usrlocal-python3_xcode-standard"], + ["12", "", "homebrew-macos-usrlocal-maximal"], ["13", "xcode_15.0", "homebrew-macos-usrlocal-standard"], - ["latest", "", "homebrew-macos-usrlocal-maximal"], - ["latest", "", "homebrew-macos-usrlocal-python3_xcode-standard"], + ["14", "", "homebrew-macos-opthomebrew-standard"], ["latest", "", "conda-forge-macos-minimal"], - ["latest", "", "conda-forge-macos-standard"]] + ["latest", "", "conda-forge-macos-standard"], + ["14", "", "conda-forge-macos-minimal"], + ["14", "", "conda-forge-macos-standard"]] type: string extra_sage_packages: description: 'Extra Sage packages to install as system packages' diff --git a/tox.ini b/tox.ini index 3673833724c..8f5a381201d 100644 --- a/tox.ini +++ b/tox.ini @@ -512,6 +512,9 @@ setenv = # brew caches downloaded files in ${HOME}/Library/Caches. We share it between different toxenvs. homebrew: SYSTEM=homebrew local-homebrew: HOMEBREW={envdir}/homebrew + # /opt/homebrew is the default install location on arm64 macOS + local-homebrew-opthomebrew: HOMEBREW=/opt/homebrew + # /usr/local is the default install location on x86_64 macOS local-{homebrew-usrlocal,nohomebrew}: HOMEBREW=/usr/local # local-macos-nohomebrew: "best effort" isolation to avoid using a homebrew installation in /usr/local # We use liblzma from the macOS system - which is available but its headers are not (neither is the xz executable). From 6b7c9a6e631209ca1e12f231405e416bcc659ec1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 16:39:12 -0800 Subject: [PATCH 15/56] .github/workflows/macos.yml: Increase SAGE_NUM_THREADS to 6 --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2cbeb765b20..4a5dd8d5888 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -134,7 +134,7 @@ jobs: *) export TARGETS_PRE="${{ inputs.targets_pre }}" TARGETS="${{ inputs.targets }} TARGETS_OPTIONAL="${{ inputs.targets_optional }} ;; esac - MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS + MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" From 7b1d6c927b3f9f4648861f117c6f3b4d6f116661 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 16:46:47 -0800 Subject: [PATCH 16/56] .github/workflows/ci-macos.yml (local-nohomebrew): Increase SAGE_NUM_THREADS to 6 --- .github/workflows/ci-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 9d2c70cbb78..19ea15aaed6 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -140,7 +140,7 @@ jobs: # We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts. # For doctesting, we use a lower parallelization to avoid timeouts. run: | - MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS + MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" From 9d924c85ac866e9c55393387825d89b620d69c7c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 16:48:33 -0800 Subject: [PATCH 17/56] .github/workflows/ci-macos.yml (local-nohomebrew): Also test on M1 --- .github/workflows/ci-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 19ea15aaed6..13c0a83e1a9 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -108,7 +108,7 @@ jobs: fail-fast: false max-parallel: 4 matrix: - os: [ macos-11, macos-12 ] + os: [ macos-11, macos-12, macos-14 ] tox_system_factor: [macos-nobootstrap] tox_packages_factor: [minimal] xcode_version_factor: [default] @@ -129,7 +129,7 @@ jobs: if: contains(matrix.tox_system_factor, 'nobootstrap') - name: Move homebrew away run: | - (cd /usr/local && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done) + (cd $(brew --prefix) && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done) - name: Select Xcode version run: | if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi From c885e540527e51de7fc9b5e9c45bf02bfc644ffb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 17:02:18 -0800 Subject: [PATCH 18/56] .github/workflows/ci-macos.yml (local-nohomebrew): Add self-destruct sequence --- .github/workflows/ci-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 13c0a83e1a9..bac51f2d592 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -140,6 +140,7 @@ jobs: # We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts. # For doctesting, we use a lower parallelization to avoid timeouts. run: | + (sleep 20000; pkill make) & MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | From 50d1eafe5e7f54485db7eda6ee7d4ac6fe0b7fe2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 17:24:06 -0800 Subject: [PATCH 19/56] .github/workflows/macos.yml: Add input 'timeout' --- .github/workflows/macos.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4a5dd8d5888..20f6b29cf41 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -46,6 +46,10 @@ on: free_disk_space: default: false type: boolean + timeout: + description: 'Elapsed time (seconds) at which to kill the build' + default: 20000 + type: number # # For use in upstream CIs. # @@ -134,6 +138,7 @@ jobs: *) export TARGETS_PRE="${{ inputs.targets_pre }}" TARGETS="${{ inputs.targets }} TARGETS_OPTIONAL="${{ inputs.targets_optional }} ;; esac + (sleep ${{ inputs.timeout }}; pkill make) & MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | From 52654ea586f0d30d7906cca63acf0d4e20f27ef0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 21:28:58 -0800 Subject: [PATCH 20/56] .github/workflows/macos.yml: Use pipx to install tox --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 20f6b29cf41..12d50394a39 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -86,7 +86,7 @@ jobs: - name: Install test prerequisites run: | - pip install tox + pipx install tox - name: Download upstream artifact uses: actions/download-artifact@v3 with: From 700a93973230b7a6a66a97258acb5b53ec22e91b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 22:05:20 -0800 Subject: [PATCH 21/56] .github/workflows/macos.yml: Use tox via 'pipx run' --- .github/workflows/macos.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 12d50394a39..93a8f856994 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -83,10 +83,16 @@ jobs: repository: ${{ inputs.sage_repo }} ref: ${{ inputs.sage_ref }} fetch-depth: 10000 - + - uses: actions/setup-python@v5 + # As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx. + # Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743 + id: python + with: + python-version: "3.8 - 3.12" + update-environment: false - name: Install test prerequisites run: | - pipx install tox + "${{ steps.python.outputs.python-path }}" -m pip install pipx - name: Download upstream artifact uses: actions/download-artifact@v3 with: @@ -139,7 +145,7 @@ jobs: ;; esac (sleep ${{ inputs.timeout }}; pkill make) & - MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS + MAKE="make -j12" "${{ steps.python.outputs.python-path }}" -m pipx run tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" From c8ee8e7bacda9d42cf9e07752a2e82591fe013c2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 22:14:15 -0800 Subject: [PATCH 22/56] .github/workflows/ci-macos.yml: Set timeout for stage 1 to 4 hours --- .github/workflows/ci-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index bac51f2d592..1b448c62722 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -34,6 +34,7 @@ jobs: uses: ./.github/workflows/macos.yml with: stage: "1" + timeout: 14400 stage-2: uses: ./.github/workflows/macos.yml From 49fdc95bd06330f64d8ec68743428b21bedce011 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 4 Feb 2024 17:23:21 -0800 Subject: [PATCH 23/56] tox.ini (local-conda): Use 'uname -m' to determine arch for installer --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 8f5a381201d..a9ff0423488 100644 --- a/tox.ini +++ b/tox.ini @@ -541,10 +541,11 @@ setenv = local-conda: PATH={env:CONDA_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin local-conda: CONDA_PKGS_DIRS={env:SHARED_CACHE_DIR}/conda_pkgs local-conda: CONDA_OS=$(uname | sed 's/^Darwin/MacOSX/;') + local-conda: CONDA_ARCH=$(uname -m) local-conda-forge: CONDA_INSTALLER_URL_BASE=https://github.com/conda-forge/miniforge/releases/latest/download/ - local-conda-forge: CONDA_INSTALLER_FILE=Miniforge3-{env:CONDA_OS}-x86_64.sh + local-conda-forge: CONDA_INSTALLER_FILE=Miniforge3-{env:CONDA_OS}-{env:CONDA_ARCH}.sh local-conda-miniconda: CONDA_INSTALLER_URL_BASE=https://repo.anaconda.com/miniconda/ - local-conda-miniconda: CONDA_INSTALLER_FILE=Miniconda3-latest-{env:CONDA_OS}-x86_64.sh + local-conda-miniconda: CONDA_INSTALLER_FILE=Miniconda3-latest-{env:CONDA_OS}-{env:CONDA_ARCH}.sh local-conda: SETENV=. {env:CONDA_PREFIX}/bin/activate base local-conda-environment: CONDA_SAGE_ENVIRONMENT=sage-build local-conda-environment: CONDA_SAGE_ENVIRONMENT_DIR= From 5f4e0fed9740e250011e98934a52825918a3a546 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Feb 2024 12:37:30 -0800 Subject: [PATCH 24/56] .github/workflows/macos.yml: Remove failing test of macos-14-minimal --- .github/workflows/macos.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 93a8f856994..7344d839620 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -33,7 +33,6 @@ on: ["14", "", "homebrew-macos-opthomebrew-standard"], ["latest", "", "conda-forge-macos-minimal"], ["latest", "", "conda-forge-macos-standard"], - ["14", "", "conda-forge-macos-minimal"], ["14", "", "conda-forge-macos-standard"]] type: string extra_sage_packages: From 1f2d9f9fbf26a1b4a11dd74de297c4c797b09359 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Feb 2024 17:28:16 -0800 Subject: [PATCH 25/56] build/pkgs/dsdp/spkg-install.in: Increase verbosity --- build/pkgs/dsdp/spkg-install.in | 1 + 1 file changed, 1 insertion(+) diff --git a/build/pkgs/dsdp/spkg-install.in b/build/pkgs/dsdp/spkg-install.in index 8c29005b9b1..5d0ecadf030 100644 --- a/build/pkgs/dsdp/spkg-install.in +++ b/build/pkgs/dsdp/spkg-install.in @@ -1,6 +1,7 @@ cd src cp ../patches/CMakeLists.txt . sdh_cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ -DBUILD_SHARED_LIBS=ON \ -DBLA_VENDOR=OpenBLAS \ -DBLAS_LIBRARIES="$(pkg-config --libs blas)" \ From 628c21958cff440cbf5cdb5753c2d8d94d0439b6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Feb 2024 21:07:50 -0800 Subject: [PATCH 26/56] src/bin/sage-env [macOS]: Detect ld-classic when full XCode is in use --- src/bin/sage-env | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/sage-env b/src/bin/sage-env index 8fcfda48fb6..074392150b9 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -373,7 +373,12 @@ if [ -n "$SAGE_LOCAL" ]; then # On OS X, test whether "ld-classic" is present in the installed # version of the command-line tools. If so, we add "-ld_classic" # to LD_FLAGS. See #36599. - if [ "$UNAME" = "Darwin" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" ] ; then + # When the full XCode is installed and in use, for example after + # "sudo xcode-select -s /Applications/Xcode.app", then "xcode-select -p" + # gives "/Applications/Xcode.app/Contents/Developer", but "ld-classic" + # is not in the subdirectory "usr/bin/" but rather in the subdirectory + # "Toolchains/XcodeDefault.xctoolchain/usr/bin/". See #37237. + if [ "$UNAME" = "Darwin" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" -o -x "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic" ] ; then LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-ld_classic,-rpath,$SAGE_LOCAL/lib $LDFLAGS" else LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS" From d26937b53e15b786cacb770b9b5f59a8cd164ef2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 6 Feb 2024 19:12:32 -0800 Subject: [PATCH 27/56] .github/workflows/ci-macos.yml (dist): Do not use tag to bump the version --- .github/workflows/ci-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 1b448c62722..d1a5d62f425 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -91,7 +91,7 @@ jobs: run: | git config --global user.email "nobody@example.com" git config --global user.name "Sage GitHub CI" - SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(git describe --tags) || echo "(ignoring error)" + SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(cat src/VERSION.txt).dev0 || echo "(ignoring error)" - name: make dist run: | ./configure --enable-download-from-upstream-url && make dist From d47f1001c97bb7135733b0a4ada32772f0b1dc5c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 6 Feb 2024 20:55:23 -0800 Subject: [PATCH 28/56] src/bin/sage-env: Do not set the ld-classic flag when LD is set --- src/bin/sage-env | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/sage-env b/src/bin/sage-env index 074392150b9..61901897bcd 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -127,7 +127,7 @@ fi # The compilers are set in order of priority by # 1) environment variables # 2) compiler installed by sage -# 3) compiler set at configuration time +# 3) compiler set at configuration time if [ -z "$CC" ]; then if [ -n "$SAGE_LOCAL" -a -x "$SAGE_LOCAL/bin/gcc" ]; then CC=gcc @@ -378,7 +378,9 @@ if [ -n "$SAGE_LOCAL" ]; then # gives "/Applications/Xcode.app/Contents/Developer", but "ld-classic" # is not in the subdirectory "usr/bin/" but rather in the subdirectory # "Toolchains/XcodeDefault.xctoolchain/usr/bin/". See #37237. - if [ "$UNAME" = "Darwin" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" -o -x "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic" ] ; then + # However, if LD is set explicitly, as it is within conda on macOS, + # do not not do this. + if [ "$UNAME" = "Darwin" ] && [ -z "$LD" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" -o -x "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic" ] ; then LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-ld_classic,-rpath,$SAGE_LOCAL/lib $LDFLAGS" else LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS" From 2165bef51e682d8eeb80e85a6db1ea340b9d202f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 19 Feb 2024 22:09:03 -0800 Subject: [PATCH 29/56] .github/workflows/macos.yml: Pass inputs.extra_sage_packages to tox --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7344d839620..ccba31a3dcc 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -144,7 +144,7 @@ jobs: ;; esac (sleep ${{ inputs.timeout }}; pkill make) & - MAKE="make -j12" "${{ steps.python.outputs.python-path }}" -m pipx run tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS + MAKE="make -j12" EXTRA_SAGE_PACKAGES="${{ inputs.extra_sage_packages }}" "${{ steps.python.outputs.python-path }}" -m pipx run tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" From c8db0248824cd3d50cd66dbe53fc4d7b14dbe5a8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 13 Feb 2024 09:10:59 -0800 Subject: [PATCH 30/56] build/pkgs/meson: Update to 1.3.1 --- build/pkgs/meson/checksums.ini | 6 +++--- build/pkgs/meson/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/meson/checksums.ini b/build/pkgs/meson/checksums.ini index bbb4661c960..861c511500d 100644 --- a/build/pkgs/meson/checksums.ini +++ b/build/pkgs/meson/checksums.ini @@ -1,5 +1,5 @@ tarball=meson-VERSION.tar.gz -sha1=97e766951553ec35315712f0a27d5554a010d4c3 -md5=69da4c63ef06c9d3bcc00ce89abb306f -cksum=2424401184 +sha1=c002c2eef733507e5930326222af9c31563ec170 +md5=dd404b8c0f8b79f80181b4a58bb81768 +cksum=1123082754 upstream_url=https://pypi.io/packages/source/m/meson/meson-VERSION.tar.gz diff --git a/build/pkgs/meson/package-version.txt b/build/pkgs/meson/package-version.txt index 0495c4a88ca..3a3cd8cc8b0 100644 --- a/build/pkgs/meson/package-version.txt +++ b/build/pkgs/meson/package-version.txt @@ -1 +1 @@ -1.2.3 +1.3.1 From 4d56b32bebe1a633b16015cfa6e7c4d6ed08504e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 13 Feb 2024 09:12:25 -0800 Subject: [PATCH 31/56] build/pkgs/meson_python/spkg-configure.m4: Require meson >= 1.2.3 --- build/pkgs/meson/spkg-configure.m4 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/pkgs/meson/spkg-configure.m4 b/build/pkgs/meson/spkg-configure.m4 index d85bd144a07..ce493531c1b 100644 --- a/build/pkgs/meson/spkg-configure.m4 +++ b/build/pkgs/meson/spkg-configure.m4 @@ -2,11 +2,12 @@ SAGE_SPKG_CONFIGURE( [meson], [ dnl scipy 1.11.2 needs meson >= 1.1.0 dnl contourpy needs meson >= 1.2.0 - AC_CACHE_CHECK([for meson >= 1.2.0], [ac_cv_path_MESON], [ + dnl meson_python needs meson >= 1.2.3 for Python >= 3.12 + AC_CACHE_CHECK([for meson >= 1.2.3], [ac_cv_path_MESON], [ AC_PATH_PROGS_FEATURE_CHECK([MESON], [meson], [ meson_version=`$ac_path_MESON --version 2>&1` AS_IF([test -n "$meson_version"], [ - AX_COMPARE_VERSION([$meson_version], [ge], [1.2.0], [ + AX_COMPARE_VERSION([$meson_version], [ge], [1.2.3], [ ac_cv_path_MESON="$ac_path_MESON" ac_path_MESON_found=: ]) From 8a3c1ef0df9c5ab85cb58ff47db7434d4b446159 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 13 Feb 2024 10:06:52 -0800 Subject: [PATCH 32/56] build/pkgs/meson: Change to wheel package --- build/pkgs/meson/checksums.ini | 10 +++++----- build/pkgs/meson/spkg-install.in | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 build/pkgs/meson/spkg-install.in diff --git a/build/pkgs/meson/checksums.ini b/build/pkgs/meson/checksums.ini index 861c511500d..0d4a8f89a48 100644 --- a/build/pkgs/meson/checksums.ini +++ b/build/pkgs/meson/checksums.ini @@ -1,5 +1,5 @@ -tarball=meson-VERSION.tar.gz -sha1=c002c2eef733507e5930326222af9c31563ec170 -md5=dd404b8c0f8b79f80181b4a58bb81768 -cksum=1123082754 -upstream_url=https://pypi.io/packages/source/m/meson/meson-VERSION.tar.gz +tarball=meson-VERSION-py3-none-any.whl +sha1=baf5b9bc9ca97f18c7dc87cfaf0e1dc4d617a4cf +md5=d418e644c04e55872ce3d7b6de007dbe +cksum=559088366 +upstream_url=https://pypi.io/packages/py3/m/meson/meson-VERSION-py3-none-any.whl diff --git a/build/pkgs/meson/spkg-install.in b/build/pkgs/meson/spkg-install.in deleted file mode 100644 index 37ac1a53437..00000000000 --- a/build/pkgs/meson/spkg-install.in +++ /dev/null @@ -1,2 +0,0 @@ -cd src -sdh_pip_install . From 4dd1f1af39d23a898de7b1bbdc5d80457c61fde6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 13 Feb 2024 10:58:37 -0800 Subject: [PATCH 33/56] m4/sage_python_package_check.m4: Factor out WITH_SAGE_PYTHONUSERBASE --- m4/sage_python_package_check.m4 | 55 ++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4 index e3854a44fe6..76107be720a 100644 --- a/m4/sage_python_package_check.m4 +++ b/m4/sage_python_package_check.m4 @@ -71,32 +71,19 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [ ) AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")]) - dnl To prevent user-site (pip install --user) packages from being - dnl detected as "system" packages, we poison PYTHONUSERBASE. The - dnl sage-env script also does this at runtime; we mimic that - dnl implementation to ensure that the behaviors at ./configure and - dnl runtime are identical. Beware that (as in sage-env) the poisoning - dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the - dnl user points PYTHONUSERBASE to any path (even the default), then - dnl his local pip packages will be detected. - PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}" - AS_IF([test -z "${PYTHONUSERBASE}"], [ - PYTHONUSERBASE="${HOME}/.sage/local" + WITH_SAGE_PYTHONUSERBASE([dnl + dnl double-quote SAGE_PKG_VERSPEC because platform-specific + dnl dependencies like python_version<'3.11' will have single + dnl quotes in them. (We normalized the quotes earlier with sed.) + AS_IF( + [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl + "import pkg_resources; dnl + pkg_resources.require(\"${SAGE_PKG_VERSPEC}\".splitlines())" dnl + 2>&AS_MESSAGE_LOG_FD], + [AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no); sage_spkg_install_$1=yes] + ) ]) - - dnl double-quote SAGE_PKG_VERSPEC because platform-specific - dnl dependencies like python_version<'3.11' will have single - dnl quotes in them. (We normalized the quotes earlier with sed.) - AS_IF( - [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl - "import pkg_resources; dnl - pkg_resources.require(\"${SAGE_PKG_VERSPEC}\".splitlines())" dnl - 2>&AS_MESSAGE_LOG_FD], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no); sage_spkg_install_$1=yes] - ) - - PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}" ], [ dnl failed to create a venv for some reason AC_MSG_RESULT(no) @@ -128,3 +115,21 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [ AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no]) ]) ]) + + +AC_DEFUN([WITH_SAGE_PYTHONUSERBASE], [dnl + dnl To prevent user-site (pip install --user) packages from being + dnl detected as "system" packages, we poison PYTHONUSERBASE. The + dnl sage-env script also does this at runtime; we mimic that + dnl implementation to ensure that the behaviors at ./configure and + dnl runtime are identical. Beware that (as in sage-env) the poisoning + dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the + dnl user points PYTHONUSERBASE to any path (even the default), then + dnl his local pip packages will be detected. + PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}" + AS_IF([test -z "${PYTHONUSERBASE}"], [ + PYTHONUSERBASE="${HOME}/.sage/local" + ]) + $1 + PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}" +]) From 99bb7b3b54abf630948acb7d867969fe3ea28742 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 13 Feb 2024 10:59:41 -0800 Subject: [PATCH 34/56] m4/sage_python_package_check.m4: Use 'export PYTHONUSERBASE' --- m4/sage_python_package_check.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4 index 76107be720a..7c625aab40e 100644 --- a/m4/sage_python_package_check.m4 +++ b/m4/sage_python_package_check.m4 @@ -76,7 +76,7 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [ dnl dependencies like python_version<'3.11' will have single dnl quotes in them. (We normalized the quotes earlier with sed.) AS_IF( - [PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl + [config.venv/bin/python3 -c dnl "import pkg_resources; dnl pkg_resources.require(\"${SAGE_PKG_VERSPEC}\".splitlines())" dnl 2>&AS_MESSAGE_LOG_FD], @@ -129,6 +129,7 @@ AC_DEFUN([WITH_SAGE_PYTHONUSERBASE], [dnl PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}" AS_IF([test -z "${PYTHONUSERBASE}"], [ PYTHONUSERBASE="${HOME}/.sage/local" + export PYTHONUSERBASE ]) $1 PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}" From 4d69c5c7466dc0eb1096bdf8bd0b847dcf089415 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 13 Feb 2024 11:37:53 -0800 Subject: [PATCH 35/56] m4/sage_python_package_check.m4: Add another dnl --- m4/sage_python_package_check.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/sage_python_package_check.m4 b/m4/sage_python_package_check.m4 index 7c625aab40e..508495329e9 100644 --- a/m4/sage_python_package_check.m4 +++ b/m4/sage_python_package_check.m4 @@ -127,7 +127,7 @@ AC_DEFUN([WITH_SAGE_PYTHONUSERBASE], [dnl dnl user points PYTHONUSERBASE to any path (even the default), then dnl his local pip packages will be detected. PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}" - AS_IF([test -z "${PYTHONUSERBASE}"], [ + AS_IF([test -z "${PYTHONUSERBASE}"], [dnl PYTHONUSERBASE="${HOME}/.sage/local" export PYTHONUSERBASE ]) From 3212ffe93f0e36732c9e29cc0584eed56da4dc2d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 13 Feb 2024 11:38:18 -0800 Subject: [PATCH 36/56] build/pkgs/meson/spkg-configure.m4: Reject meson from inaccessible user scheme --- build/pkgs/meson/spkg-configure.m4 | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/build/pkgs/meson/spkg-configure.m4 b/build/pkgs/meson/spkg-configure.m4 index ce493531c1b..7ebfa601644 100644 --- a/build/pkgs/meson/spkg-configure.m4 +++ b/build/pkgs/meson/spkg-configure.m4 @@ -1,15 +1,20 @@ -SAGE_SPKG_CONFIGURE( - [meson], [ - dnl scipy 1.11.2 needs meson >= 1.1.0 - dnl contourpy needs meson >= 1.2.0 - dnl meson_python needs meson >= 1.2.3 for Python >= 3.12 - AC_CACHE_CHECK([for meson >= 1.2.3], [ac_cv_path_MESON], [ - AC_PATH_PROGS_FEATURE_CHECK([MESON], [meson], [ - meson_version=`$ac_path_MESON --version 2>&1` - AS_IF([test -n "$meson_version"], [ - AX_COMPARE_VERSION([$meson_version], [ge], [1.2.3], [ - ac_cv_path_MESON="$ac_path_MESON" - ac_path_MESON_found=: +SAGE_SPKG_CONFIGURE([meson], [dnl + dnl scipy 1.11.2 needs meson >= 1.1.0 + dnl contourpy needs meson >= 1.2.0 + dnl meson_python needs meson >= 1.2.3 for Python >= 3.12 + AC_CACHE_CHECK([for meson >= 1.2.3], [ac_cv_path_MESON], [dnl + dnl Do not accept meson installed in the default user scheme; + dnl it will not work in our venv because we set PYTHONUSERBASE + dnl in sage-env. + WITH_SAGE_PYTHONUSERBASE([dnl + AC_PATH_PROGS_FEATURE_CHECK([MESON], [meson], [dnl + AS_IF([meson_version=$($ac_path_MESON --version 2>&1)], [dnl + AS_IF([test -n "$meson_version"], [dnl + AX_COMPARE_VERSION([$meson_version], [ge], [1.2.3], [dnl + ac_cv_path_MESON="$ac_path_MESON" + ac_path_MESON_found=: + ]) + ]) ]) ]) ]) From e9e66a7fd07342e5d0e53e2e6d28d8f75465bdbc Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 14 Feb 2024 23:58:32 -0800 Subject: [PATCH 37/56] src/sage/features/threejs.py: Do not fail when the version file does not exist --- src/sage/features/threejs.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/sage/features/threejs.py b/src/sage/features/threejs.py index 4517523918d..701b5749976 100644 --- a/src/sage/features/threejs.py +++ b/src/sage/features/threejs.py @@ -25,8 +25,6 @@ def __init__(self): """ from sage.env import SAGE_SHARE, THREEJS_DIR - version = self.required_version() - threejs_search_path = THREEJS_DIR or ( os.path.join(SAGE_SHARE, "jupyter", "nbextensions", "threejs-sage"), os.path.join(SAGE_SHARE, "sagemath", "threejs-sage"), @@ -34,9 +32,15 @@ def __init__(self): os.path.join(SAGE_SHARE, "threejs-sage") ) + try: + version = self.required_version() + filename = os.path.join(version, "three.min.js") + except FileNotFoundError: + filename = 'unknown' + StaticFile.__init__( self, name="threejs", - filename=os.path.join(version, "three.min.js"), + filename=filename, spkg="threejs", type="standard", search_path=threejs_search_path, From a2ce28c1c6d1730afb19aff8de5f173370242bbd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 14 Feb 2024 23:59:10 -0800 Subject: [PATCH 38/56] src/sage/features/threejs.py: Add documentation --- src/sage/features/threejs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sage/features/threejs.py b/src/sage/features/threejs.py index 701b5749976..4f65c5bd48e 100644 --- a/src/sage/features/threejs.py +++ b/src/sage/features/threejs.py @@ -50,6 +50,11 @@ def required_version(self): """ Return the version of threejs that Sage requires. + Defining what version is required is delegated to the distribution package + that provides the file ``threejs-version.txt`` in :mod:`sage.ext_data.threejs`. + + If the file is not provided, :class:`FileNotFoundError` is raised. + EXAMPLES:: sage: from sage.features.threejs import Threejs From 262f2bd04c25885168fea23a347fa3998bbf61f2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 27 Jan 2024 21:57:25 -0800 Subject: [PATCH 39/56] src/sage/doctest/parsing.py: Fix handling of '--probe all' --- src/sage/doctest/parsing.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index 3e5b0a98975..d14cdb5bd47 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -877,7 +877,7 @@ class SageDocTestParser(doctest.DocTestParser): optional_tags: Union[bool, set[str]] optional_only: bool optionals: dict[str, int] - probed_tags: set[str] + probed_tags: Union[bool, set[str]] def __init__(self, optional_tags=(), long=False, *, probed_tags=(), file_optional_tags=()): r""" @@ -916,7 +916,10 @@ def __init__(self, optional_tags=(), long=False, *, probed_tags=(), file_optiona self.optional_tags.remove('sage') else: self.optional_only = True - self.probed_tags = set(probed_tags) + if probed_tags is True: + self.probed_tags = True + else: + self.probed_tags = set(probed_tags) self.file_optional_tags = set(file_optional_tags) def __eq__(self, other): From 633b36852dae7b736df779997df7ec9f228f7655 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Sun, 25 Feb 2024 21:52:12 +0100 Subject: [PATCH 40/56] Fix build with flint 3.1 --- src/sage/doctest/control.py | 8 -------- src/sage/libs/arb/arb_version.pyx | 23 ----------------------- src/sage/libs/flint/flint_wrap.h | 2 -- src/sage/libs/flint/fmpq.pxd | 2 -- src/sage/symbolic/ginac/useries-flint.h | 3 --- src/sage/symbolic/ginac/useries.cpp | 6 ++++-- 6 files changed, 4 insertions(+), 40 deletions(-) delete mode 100644 src/sage/libs/arb/arb_version.pyx diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py index 2973e9f6c64..58d4d53dbb9 100644 --- a/src/sage/doctest/control.py +++ b/src/sage/doctest/control.py @@ -58,14 +58,6 @@ auto_optional_tags = set() -try: - from sage.libs.arb.arb_version import version as arb_vers - arb_tag = 'arb2' + arb_vers().split('.')[1] - auto_optional_tags.add(arb_tag) -except ImportError: - pass - - class DocTestDefaults(SageObject): """ This class is used for doctesting the Sage doctest module. diff --git a/src/sage/libs/arb/arb_version.pyx b/src/sage/libs/arb/arb_version.pyx deleted file mode 100644 index b8ab4d725e5..00000000000 --- a/src/sage/libs/arb/arb_version.pyx +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -from sage.cpython.string cimport char_to_str - - -cdef extern from "arb_wrap.h": - char * arb_version - - -def version(): - """ - Get arb version - - TESTS:: - - sage: from sage.libs.arb.arb_version import version - sage: version().split('.')[0] - '2' - """ - try: - py_string = char_to_str(arb_version) - finally: - pass - return py_string diff --git a/src/sage/libs/flint/flint_wrap.h b/src/sage/libs/flint/flint_wrap.h index fcfe660a1f6..1302973779e 100644 --- a/src/sage/libs/flint/flint_wrap.h +++ b/src/sage/libs/flint/flint_wrap.h @@ -136,8 +136,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/sage/libs/flint/fmpq.pxd b/src/sage/libs/flint/fmpq.pxd index 41f075326fe..61ebabac2b0 100644 --- a/src/sage/libs/flint/fmpq.pxd +++ b/src/sage/libs/flint/fmpq.pxd @@ -41,14 +41,12 @@ cdef extern from "flint_wrap.h": void fmpq_height(fmpz_t height, const fmpq_t x) noexcept flint_bitcnt_t fmpq_height_bits(const fmpq_t x) noexcept void fmpq_set_fmpz_frac(fmpq_t res, const fmpz_t p, const fmpz_t q) noexcept - void fmpq_get_mpz_frac(mpz_t a, mpz_t b, fmpq_t c) noexcept void fmpq_set_si(fmpq_t res, slong p, ulong q) noexcept void _fmpq_set_si(fmpz_t rnum, fmpz_t rden, slong p, ulong q) noexcept void fmpq_set_ui(fmpq_t res, ulong p, ulong q) noexcept void _fmpq_set_ui(fmpz_t rnum, fmpz_t rden, ulong p, ulong q) noexcept void fmpq_set_mpq(fmpq_t dest, const mpq_t src) noexcept int fmpq_set_str(fmpq_t dest, const char * s, int base) noexcept - void fmpq_init_set_mpz_frac_readonly(fmpq_t z, const mpz_t p, const mpz_t q) noexcept double fmpq_get_d(const fmpq_t f) noexcept void fmpq_get_mpq(mpq_t dest, const fmpq_t src) noexcept int fmpq_get_mpfr(mpfr_t dest, const fmpq_t src, mpfr_rnd_t rnd) noexcept diff --git a/src/sage/symbolic/ginac/useries-flint.h b/src/sage/symbolic/ginac/useries-flint.h index 7ecd4d50107..08847273e2e 100644 --- a/src/sage/symbolic/ginac/useries-flint.h +++ b/src/sage/symbolic/ginac/useries-flint.h @@ -27,9 +27,6 @@ #include "flint/fmpq_poly.h" #include "flint/fmpq.h" -extern "C" void fmpq_get_mpz_frac(mpz_t a, mpz_t b, fmpq_t c); -extern "C" void fmpq_init_set_mpz_frac_readonly(fmpq_t z, const mpz_t p, const mpz_t q); - #include diff --git a/src/sage/symbolic/ginac/useries.cpp b/src/sage/symbolic/ginac/useries.cpp index b9a8b867648..7649e36b49a 100644 --- a/src/sage/symbolic/ginac/useries.cpp +++ b/src/sage/symbolic/ginac/useries.cpp @@ -550,14 +550,16 @@ void power::useries(flint_series_t& fp, int order) const mpz_t cnum, cden; mpz_init(cnum); mpz_init(cden); - fmpq_get_mpz_frac(cnum, cden, c); + fmpz_get_mpz(cnum, fmpq_numref(c)); + fmpz_get_mpz(cden, fmpq_denref(c)); if (not mpz_perfect_square_p(cnum) or not mpz_perfect_square_p(cden)) throw flint_error(); mpz_sqrt(cnum, cnum); mpz_sqrt(cden, cden); fmpq_t cc; - fmpq_init_set_mpz_frac_readonly(cc, cnum, cden); + fmpz_init_set_readonly(fmpq_numref(cc), cnum); + fmpz_init_set_readonly(fmpq_denref(cc), cden); mpz_clear(cnum); mpz_clear(cden); From ac11fb8a831a0d2f16a50c42c0a058b517d423b5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 25 Feb 2024 13:05:08 -0800 Subject: [PATCH 41/56] src/sage_docbuild/ext/sage_autodoc.py: Fix docstring for 'tox -e rst' --- src/sage_docbuild/ext/sage_autodoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_docbuild/ext/sage_autodoc.py b/src/sage_docbuild/ext/sage_autodoc.py index 346566a266a..4e9bcef39be 100644 --- a/src/sage_docbuild/ext/sage_autodoc.py +++ b/src/sage_docbuild/ext/sage_autodoc.py @@ -113,7 +113,7 @@ def identity(x: Any) -> Any: class _All: - """A special value for :*-members: that matches to any member.""" + """A special value for ``:*-members:`` that matches to any member.""" def __contains__(self, item: Any) -> bool: return True From 7052c2550a33db156635e11330c448cd236dbed0 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sun, 25 Feb 2024 21:21:12 +0000 Subject: [PATCH 42/56] Fix #37471 --- src/sage/schemes/elliptic_curves/cm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sage/schemes/elliptic_curves/cm.py b/src/sage/schemes/elliptic_curves/cm.py index 1f0fd8bd34e..a0349fa223d 100644 --- a/src/sage/schemes/elliptic_curves/cm.py +++ b/src/sage/schemes/elliptic_curves/cm.py @@ -264,14 +264,15 @@ def is_HCP(f, check_monic_irreducible=True): # Compute X^p-X mod fp z = fp.parent().gen() r = pow(z, p, fp) - z - d = r.gcd(fp).degree() # number of roots mod p + r = r.gcd(fp) + d = r.degree() # number of roots mod p if d == 0: continue - if not fp.is_squarefree(): + if not r.is_squarefree(): continue if d < h and d not in h2list: return zero - jp = fp.any_root(degree=1, assume_squarefree=True, assume_distinct_deg=True) + jp = r.any_root(degree=1, assume_squarefree=True, assume_distinct_deg=True) E = EllipticCurve(j=jp) if E.is_supersingular(): continue From a6e928ebd24c5eb13f54de31f005566210d570f3 Mon Sep 17 00:00:00 2001 From: Giacomo Pope <44242839+GiacomoPope@users.noreply.github.com> Date: Sun, 25 Feb 2024 21:22:13 +0000 Subject: [PATCH 43/56] Apply suggestions from code review Co-authored-by: Travis Scrimshaw --- src/sage/rings/polynomial/polynomial_element.pyx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index cd4891ac548..2034d79346c 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -133,7 +133,6 @@ from sage.categories.morphism cimport Morphism from sage.misc.superseded import deprecation_cython as deprecation, deprecated_function_alias from sage.misc.cachefunc import cached_method -from sage.misc.prandom import choice cpdef is_Polynomial(f) noexcept: """ @@ -2585,10 +2584,6 @@ cdef class Polynomial(CommutativePolynomial): if ring not in FiniteFields(): rs = self.roots(ring=ring, multiplicities=False) if rs: - # TODO: this has been deterministic and changing this to be random - # breaks many doctests. For now we leave it deterministic but you - # could change it to choice(rs). This mainly breaks examples over - # of elliptic curve stuff over number fields return rs[0] raise ValueError(f"polynomial {self} has no roots") @@ -2617,7 +2612,7 @@ cdef class Polynomial(CommutativePolynomial): except ValueError: raise ValueError(f"no root of polynomial {self} can be computed over the ring {ring}") # When d != 1 we then find the smallest extension - # TODO: This is really annoying. What we should do here is compute some minimal + # TODO: What we should do here is compute some minimal # extension F_ext = self.base_ring().extension(d, names="a") and find a # root here and then coerce this root into the parent ring. This means we # would work with the smallest possible extension. @@ -2644,8 +2639,7 @@ cdef class Polynomial(CommutativePolynomial): # C library bindings for all finite fields. # Until the coercion system for finite fields works better, # this will be the most performant - roots = f.roots(ring, multiplicities=False) - return choice(roots) + return f.roots(ring, multiplicities=False)[0] # The old version of `any_root()` allowed degree < 0 to indicate that the input polynomial # had a distinct degree factorisation, we pass this to any_irreducible_factor as a bool and @@ -2697,8 +2691,7 @@ cdef class Polynomial(CommutativePolynomial): # C library bindings for all finite fields. # Until the coercion system for finite fields works better, # this will be the most performant - roots = f.roots(ring, multiplicities=False) - return choice(roots) + return f.roots(ring, multiplicities=False)[0] def __truediv__(left, right): r""" From 0aea29cce9bd079e7cde4da8972d7bc3b7d7f053 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sun, 25 Feb 2024 21:24:46 +0000 Subject: [PATCH 44/56] Add doctest for issue #37417 --- src/sage/schemes/elliptic_curves/cm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sage/schemes/elliptic_curves/cm.py b/src/sage/schemes/elliptic_curves/cm.py index a0349fa223d..c8d95f5bde1 100644 --- a/src/sage/schemes/elliptic_curves/cm.py +++ b/src/sage/schemes/elliptic_curves/cm.py @@ -233,6 +233,13 @@ def is_HCP(f, check_monic_irreducible=True): sage: all(not is_HCP(hilbert_class_polynomial(D) + 1) ....: for D in srange(-4,-100,-1) if D.is_discriminant()) True + + Ensure that :issue:`37471` is fixed:: + + from sage.schemes.elliptic_curves.cm import is_HCP + set_random_seed(297388353221545796156853787333338705098) + is_HCP(hilbert_class_polynomial(-55)) + -55 """ zero = ZZ(0) # optional check that input is monic and irreducible From f8bc02f1bf21c7aef32cc25fb77491592e4272c0 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sun, 25 Feb 2024 21:27:13 +0000 Subject: [PATCH 45/56] Add docstring about determinism of roots --- src/sage/rings/polynomial/polynomial_element.pyx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 2034d79346c..35342c70367 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2309,6 +2309,14 @@ cdef class Polynomial(CommutativePolynomial): used for polynomials over finite fields. If not ``None`` only returns irreducible factors of ``self`` whose degree divides ``ext_degree``. + .. NOTE:: + + Any root is non-deterministic when finding linear roots of a polynomial + over the base ring. However, if ``degree`` is greater than one, or `ring` + is an extension of the base ring, then eventually the root is found by + returning a single root after factorisation. Roots found in this way are + deterministic. This may change in the future. + EXAMPLES:: sage: # needs sage.rings.finite_rings From 5c82b47dfb36e2e1c4cfe3af4c06811f671faa7a Mon Sep 17 00:00:00 2001 From: Giacomo Pope <44242839+GiacomoPope@users.noreply.github.com> Date: Sun, 25 Feb 2024 21:27:37 +0000 Subject: [PATCH 46/56] Update src/sage/schemes/elliptic_curves/cm.py Co-authored-by: grhkm21 <83517584+grhkm21@users.noreply.github.com> --- src/sage/schemes/elliptic_curves/cm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/schemes/elliptic_curves/cm.py b/src/sage/schemes/elliptic_curves/cm.py index c8d95f5bde1..e5c278c49bc 100644 --- a/src/sage/schemes/elliptic_curves/cm.py +++ b/src/sage/schemes/elliptic_curves/cm.py @@ -236,9 +236,9 @@ def is_HCP(f, check_monic_irreducible=True): Ensure that :issue:`37471` is fixed:: - from sage.schemes.elliptic_curves.cm import is_HCP - set_random_seed(297388353221545796156853787333338705098) - is_HCP(hilbert_class_polynomial(-55)) + sage: from sage.schemes.elliptic_curves.cm import is_HCP + sage: set_random_seed(297388353221545796156853787333338705098) + sage: is_HCP(hilbert_class_polynomial(-55)) -55 """ zero = ZZ(0) From 6d767c37c8fcb75777601f2e97e652dd7155ec39 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sun, 25 Feb 2024 21:42:29 +0000 Subject: [PATCH 47/56] Wrap to 80 and add code syntax highlighting --- src/sage/rings/polynomial/polynomial_element.pyx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 35342c70367..e13451b2a22 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2311,11 +2311,12 @@ cdef class Polynomial(CommutativePolynomial): .. NOTE:: - Any root is non-deterministic when finding linear roots of a polynomial - over the base ring. However, if ``degree`` is greater than one, or `ring` - is an extension of the base ring, then eventually the root is found by - returning a single root after factorisation. Roots found in this way are - deterministic. This may change in the future. + Any root is non-deterministic when finding linear roots of a + polynomial over the base ring. However, if ``degree`` is greater + than one, or ``ring`` is an extension of the base ring, then + eventually the root is found by returning a single root after + factorisation. Roots found in this way are deterministic. + This may change in the future. EXAMPLES:: From ee36eb67f0927ca4f5ba506489a3fe1a0894d97e Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sun, 25 Feb 2024 22:06:18 +0000 Subject: [PATCH 48/56] rename assume_distinct_deg to assume_equal_deg --- .../rings/finite_rings/conway_polynomials.py | 2 +- .../rings/polynomial/polynomial_element.pyx | 24 +++++++++---------- .../polynomial/polynomial_quotient_ring.py | 2 +- src/sage/schemes/elliptic_curves/cm.py | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/sage/rings/finite_rings/conway_polynomials.py b/src/sage/rings/finite_rings/conway_polynomials.py index fcb3e2ab8d6..7d6e558f030 100644 --- a/src/sage/rings/finite_rings/conway_polynomials.py +++ b/src/sage/rings/finite_rings/conway_polynomials.py @@ -239,7 +239,7 @@ def polynomial(self, n): # TODO: something like the following # gcds = [n.gcd(d) for d in self.nodes.keys()] # xi = { m: (...) for m in gcds } - xi = {q: self.polynomial(n//q).any_root(K, n//q, assume_squarefree=True, assume_distinct_deg=True) + xi = {q: self.polynomial(n//q).any_root(K, n//q, assume_squarefree=True, assume_equal_deg=True) for q in n.prime_divisors()} # The following is needed to ensure that in the concrete instantiation diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index e13451b2a22..90fe26ed6a8 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2284,7 +2284,7 @@ cdef class Polynomial(CommutativePolynomial): raise ValueError(f"no irreducible factor of degree {degree} dividing {ext_degree} could be computed from {self}") raise AssertionError(f"no irreducible factor could be computed from {self}") - def any_irreducible_factor(self, degree=None, assume_squarefree=False, assume_distinct_deg=False, ext_degree=None): + def any_irreducible_factor(self, degree=None, assume_squarefree=False, assume_equal_deg=False, ext_degree=None): """ Return an irreducible factor of this polynomial. @@ -2300,7 +2300,7 @@ cdef class Polynomial(CommutativePolynomial): Used for polynomials over finite fields. If ``True``, this polynomial is assumed to be squarefree. - - ``assume_distinct_deg`` (boolean) -- (default: ``False``). + - ``assume_equal_deg`` (boolean) -- (default: ``False``). Used for polynomials over finite fields. If ``True``, this polynomial is assumed to be the product of irreducible polynomials of degree equal to ``degree``. @@ -2360,9 +2360,9 @@ cdef class Polynomial(CommutativePolynomial): sage: F = GF(163) sage: R. = F[] sage: h = (x + 57) * (x + 98) * (x + 117) * (x + 145) - sage: h.any_irreducible_factor(degree=1, assume_distinct_deg=True) # random + sage: h.any_irreducible_factor(degree=1, assume_equal_deg=True) # random x + 98 - sage: h.any_irreducible_factor(assume_distinct_deg=True) + sage: h.any_irreducible_factor(assume_equal_deg=True) Traceback (most recent call last): ... ValueError: degree must be known if distinct degree factorisation is assumed @@ -2391,7 +2391,7 @@ cdef class Polynomial(CommutativePolynomial): if degree < 1: raise ValueError(f"{degree = } must be positive") - if assume_distinct_deg and degree is None: + if assume_equal_deg and degree is None: raise ValueError("degree must be known if distinct degree factorisation is assumed") # When not working over a finite field, do the simple thing of factoring. @@ -2429,7 +2429,7 @@ cdef class Polynomial(CommutativePolynomial): # If we know the polynomial is square-free, we can start here if assume_squarefree: - if assume_distinct_deg: + if assume_equal_deg: return self._cantor_zassenhaus_split_to_irreducible(degree) return self._any_irreducible_factor_squarefree(degree, ext_degree) @@ -2452,7 +2452,7 @@ cdef class Polynomial(CommutativePolynomial): # But if any degree is allowed then there should certainly be a factor if self has degree > 0 raise AssertionError(f"no irreducible factor was computed for {self}. Bug.") - def any_root(self, ring=None, degree=None, assume_squarefree=False, assume_distinct_deg=False): + def any_root(self, ring=None, degree=None, assume_squarefree=False, assume_equal_deg=False): """ Return a root of this polynomial in the given ring. @@ -2472,14 +2472,14 @@ cdef class Polynomial(CommutativePolynomial): finite fields. If ``True``, this polynomial is assumed to be squarefree. - - ``assume_distinct_deg`` (bool) -- Used for polynomials over + - ``assume_equal_deg`` (bool) -- Used for polynomials over finite fields. If ``True``, all factors of this polynomial are assumed to have degree ``degree``. .. WARNING:: Negative degree input will be deprecated. Instead use - ``assume_distinct_deg``. + ``assume_equal_deg``. EXAMPLES:: @@ -2656,9 +2656,9 @@ cdef class Polynomial(CommutativePolynomial): degree = ZZ(degree) if degree < 0: from sage.misc.superseded import deprecation - deprecation(37170, "negative ``degree`` will be disallowed. Instead use the bool `assume_distinct_deg`.") + deprecation(37170, "negative ``degree`` will be disallowed. Instead use the bool `assume_equal_deg`.") degree = -degree - assume_distinct_deg = True + assume_equal_deg = True # If a certain degree is requested, then we find an irreducible factor of degree `degree` # use this to compute a field extension and return the generator as root of this polynomial @@ -2667,7 +2667,7 @@ cdef class Polynomial(CommutativePolynomial): try: f = self.any_irreducible_factor(degree=degree, assume_squarefree=assume_squarefree, - assume_distinct_deg=assume_distinct_deg) + assume_equal_deg=assume_equal_deg) except ValueError: raise ValueError(f"no irreducible factor of degree {degree} can be computed from {self}") diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring.py b/src/sage/rings/polynomial/polynomial_quotient_ring.py index 8c5d1b1a710..4604503ae09 100644 --- a/src/sage/rings/polynomial/polynomial_quotient_ring.py +++ b/src/sage/rings/polynomial/polynomial_quotient_ring.py @@ -2098,7 +2098,7 @@ def _isomorphic_ring(self): base_image = self.base_ring().modulus().change_ring(isomorphic_ring).any_root() base_to_isomorphic_ring = self.base_ring().hom([isomorphic_ring(base_image)]) modulus = self.modulus().map_coefficients(base_to_isomorphic_ring) - gen = modulus.any_root(assume_squarefree=True, degree=1, assume_distinct_deg=True) + gen = modulus.any_root(assume_squarefree=True, degree=1, assume_equal_deg=True) homspace = Hom(self, isomorphic_ring) to_isomorphic_ring = homspace.__make_element_class__(SetMorphism)(homspace, diff --git a/src/sage/schemes/elliptic_curves/cm.py b/src/sage/schemes/elliptic_curves/cm.py index e5c278c49bc..80cfd5f9b2a 100644 --- a/src/sage/schemes/elliptic_curves/cm.py +++ b/src/sage/schemes/elliptic_curves/cm.py @@ -279,7 +279,7 @@ def is_HCP(f, check_monic_irreducible=True): continue if d < h and d not in h2list: return zero - jp = r.any_root(degree=1, assume_squarefree=True, assume_distinct_deg=True) + jp = r.any_root(degree=1, assume_squarefree=True, assume_equal_deg=True) E = EllipticCurve(j=jp) if E.is_supersingular(): continue From 6e904cf73b7aae33440aea0d24b3c549d35e4418 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Mon, 26 Feb 2024 20:36:22 +0100 Subject: [PATCH 49/56] Drop obsolete arb doctest tags --- src/.relint.yml | 2 +- src/sage/doctest/parsing.py | 4 +--- src/sage/rings/complex_arb.pyx | 8 ++------ src/sage/rings/real_arb.pyx | 12 ++---------- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/.relint.yml b/src/.relint.yml index 97bf2ac1dbc..61dcf109c88 100644 --- a/src/.relint.yml +++ b/src/.relint.yml @@ -71,4 +71,4 @@ magic doctest comments should appear on the "sage:" line, not "....:" lines # see optional_regex in src/sage/doctest/parsing.py # "indirect doctest" is from src/bin/sage-coverage - pattern: '^[ ]*[.][.][.][.]:.*#.*(arb216|arb218|py2|py3|long time|not implemented|not tested|known bug|optional|indirect doctest)' + pattern: '^[ ]*[.][.][.][.]:.*#.*(py2|py3|long time|not implemented|not tested|known bug|optional|indirect doctest)' diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index 3e5b0a98975..31c27ddd4f2 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -95,7 +95,7 @@ def fake_RIFtol(*args): ansi_escape_sequence = re.compile(r"(\x1b[@-Z\\-~]|\x1b\[.*?[@-~]|\x9b.*?[@-~])") special_optional_regex = ( - "arb216|arb218|py2|long time|not implemented|not tested|optional|needs|known bug" + "py2|long time|not implemented|not tested|optional|needs|known bug" ) tag_with_explanation_regex = r"((?:\w|[.])*)\s*(?:\((?P.*?)\))?" optional_regex = re.compile( @@ -136,8 +136,6 @@ def parse_optional_tags( - ``'not tested'`` - ``'known bug'`` (possible values are ``None``, ``linux`` and ``macos``) - ``'py2'`` - - ``'arb216'`` - - ``'arb218'`` - ``'optional - FEATURE...'`` or ``'needs FEATURE...'`` -- the dictionary will just have the key ``'FEATURE'`` diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx index b7384f628dc..31d1baf0f38 100644 --- a/src/sage/rings/complex_arb.pyx +++ b/src/sage/rings/complex_arb.pyx @@ -4792,18 +4792,14 @@ cdef class ComplexBall(RingElement): sage: n = CBF(1,1) sage: m = CBF(-2/3, 3/5) - sage: n.elliptic_pi_inc(CBF.pi()/2, m) # arb216 - [0.8934793755173 +/- ...e-14] + [0.95707868710750 +/- ...e-15]*I - sage: n.elliptic_pi_inc(CBF.pi()/2, m) # arb218 - this is a regression, see :trac:28623 + sage: n.elliptic_pi_inc(CBF.pi()/2, m) # this is a regression, see :trac:28623 nan + nan*I sage: n.elliptic_pi(m) [0.8934793755173...] + [0.957078687107...]*I sage: n = CBF(2, 3/7) sage: m = CBF(-1/3, 2/9) - sage: n.elliptic_pi_inc(CBF.pi()/2, m) # arb216 - [0.2969588746419 +/- ...e-14] + [1.3188795332738 +/- ...e-14]*I - sage: n.elliptic_pi_inc(CBF.pi()/2, m) # arb218 - this is a regression, see :trac:28623 + sage: n.elliptic_pi_inc(CBF.pi()/2, m) # this is a regression, see :trac:28623 nan + nan*I sage: n.elliptic_pi(m) [0.296958874641...] + [1.318879533273...]*I diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx index 8509b19cc66..5769123c6d2 100644 --- a/src/sage/rings/real_arb.pyx +++ b/src/sage/rings/real_arb.pyx @@ -294,11 +294,7 @@ cdef int arb_to_mpfi(mpfi_t target, arb_t source, const long precision) except - EXAMPLES:: - sage: RIF(RBF(2)**(2**100)) # arb216 # indirect doctest - Traceback (most recent call last): - ... - ArithmeticError: Error converting arb to mpfi. Overflow? - sage: RIF(RBF(2)**(2**100)) # arb218 # indirect doctest + sage: RIF(RBF(2)**(2**100)) [5.8756537891115869e1388255822130839282 .. +infinity] # 64-bit [2.098... .. +infinity] # 32-bit @@ -1729,11 +1725,7 @@ cdef class RealBall(RingElement): :: sage: b = RBF(2)^(2^1000) - sage: b.mid() # arb216 - Traceback (most recent call last): - ... - RuntimeError: unable to convert to MPFR (exponent out of range?) - sage: b.mid() # arb218 + sage: b.mid() +infinity .. SEEALSO:: :meth:`rad`, :meth:`squash` From dd56924be7929cf485146a75b56600218da10a3b Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Tue, 27 Feb 2024 10:34:40 +0000 Subject: [PATCH 50/56] More detailed comment --- src/sage/rings/polynomial/polynomial_element.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 90fe26ed6a8..8677eceaec2 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2474,7 +2474,8 @@ cdef class Polynomial(CommutativePolynomial): - ``assume_equal_deg`` (bool) -- Used for polynomials over finite fields. If ``True``, all factors of this polynomial - are assumed to have degree ``degree``. + are assumed to have degree ``degree``. Note that ``degree`` + must be set. .. WARNING:: From b161117059526fc8cb8504a1a05c3a81e2c6e08d Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Wed, 28 Feb 2024 10:38:44 +0000 Subject: [PATCH 51/56] More detailed NOTE for any_root() --- .../rings/polynomial/polynomial_element.pyx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 8677eceaec2..9e1df7e1b0c 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2309,15 +2309,6 @@ cdef class Polynomial(CommutativePolynomial): used for polynomials over finite fields. If not ``None`` only returns irreducible factors of ``self`` whose degree divides ``ext_degree``. - .. NOTE:: - - Any root is non-deterministic when finding linear roots of a - polynomial over the base ring. However, if ``degree`` is greater - than one, or ``ring`` is an extension of the base ring, then - eventually the root is found by returning a single root after - factorisation. Roots found in this way are deterministic. - This may change in the future. - EXAMPLES:: sage: # needs sage.rings.finite_rings @@ -2482,6 +2473,17 @@ cdef class Polynomial(CommutativePolynomial): Negative degree input will be deprecated. Instead use ``assume_equal_deg``. + .. NOTE:: + + For finite fields, ``any_root()`` is non-deterministic when + finding linear roots of a polynomial over the base ring. + However, if ``degree`` is greater than one, or ``ring`` is an + extension of the base ring, then eventually the root is found + by returning a single root after factorisation. Roots found + in this way are deterministic. This may change in the future. + For all other rings or fields, roots are found by first + fully-factoring the polynomial and the output is deterministic. + EXAMPLES:: sage: # needs sage.rings.finite_rings From b8da00265893a3dfe934893be1cf09cc29f4e570 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Wed, 28 Feb 2024 10:40:28 +0000 Subject: [PATCH 52/56] More detailed NOTE for any_root() --- src/sage/rings/polynomial/polynomial_element.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 9e1df7e1b0c..99f00618bc1 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2478,11 +2478,11 @@ cdef class Polynomial(CommutativePolynomial): For finite fields, ``any_root()`` is non-deterministic when finding linear roots of a polynomial over the base ring. However, if ``degree`` is greater than one, or ``ring`` is an - extension of the base ring, then eventually the root is found - by returning a single root after factorisation. Roots found + extension of the base ring, then the root computed is found + by attempting to return a root after factorisation. Roots found in this way are deterministic. This may change in the future. For all other rings or fields, roots are found by first - fully-factoring the polynomial and the output is deterministic. + fully-factoring ``self`` and the output is deterministic. EXAMPLES:: From 4ac7152b1702b8858904e0f038c31df096b7623e Mon Sep 17 00:00:00 2001 From: Release Manager Date: Thu, 29 Feb 2024 21:10:05 +0100 Subject: [PATCH 53/56] Updated SageMath version to 10.3.rc1 --- CITATION.cff | 4 ++-- VERSION.txt | 2 +- build/pkgs/configure/checksums.ini | 6 +++--- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/sage_conf/install-requires.txt | 2 +- build/pkgs/sage_docbuild/install-requires.txt | 2 +- build/pkgs/sage_setup/install-requires.txt | 2 +- build/pkgs/sage_sws2rst/install-requires.txt | 2 +- build/pkgs/sagelib/install-requires.txt | 2 +- build/pkgs/sagemath_bliss/install-requires.txt | 2 +- build/pkgs/sagemath_categories/install-requires.txt | 2 +- build/pkgs/sagemath_coxeter3/install-requires.txt | 2 +- build/pkgs/sagemath_environment/install-requires.txt | 2 +- build/pkgs/sagemath_mcqd/install-requires.txt | 2 +- build/pkgs/sagemath_meataxe/install-requires.txt | 2 +- build/pkgs/sagemath_objects/install-requires.txt | 2 +- build/pkgs/sagemath_repl/install-requires.txt | 2 +- build/pkgs/sagemath_sirocco/install-requires.txt | 2 +- build/pkgs/sagemath_tdlib/install-requires.txt | 2 +- pkgs/sage-conf/VERSION.txt | 2 +- pkgs/sage-conf_conda/VERSION.txt | 2 +- pkgs/sage-conf_pypi/VERSION.txt | 2 +- pkgs/sage-docbuild/VERSION.txt | 2 +- pkgs/sage-setup/VERSION.txt | 2 +- pkgs/sage-sws2rst/VERSION.txt | 2 +- pkgs/sagemath-bliss/VERSION.txt | 2 +- pkgs/sagemath-categories/VERSION.txt | 2 +- pkgs/sagemath-coxeter3/VERSION.txt | 2 +- pkgs/sagemath-environment/VERSION.txt | 2 +- pkgs/sagemath-mcqd/VERSION.txt | 2 +- pkgs/sagemath-meataxe/VERSION.txt | 2 +- pkgs/sagemath-objects/VERSION.txt | 2 +- pkgs/sagemath-repl/VERSION.txt | 2 +- pkgs/sagemath-sirocco/VERSION.txt | 2 +- pkgs/sagemath-tdlib/VERSION.txt | 2 +- src/VERSION.txt | 2 +- src/bin/sage-version.sh | 6 +++--- src/sage/version.py | 6 +++--- 38 files changed, 45 insertions(+), 45 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 79607a93e60..3cbe2ff138b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -4,8 +4,8 @@ title: SageMath abstract: SageMath is a free open-source mathematics software system. authors: - name: "The SageMath Developers" -version: 10.3.rc0 +version: 10.3.rc1 doi: 10.5281/zenodo.593563 -date-released: 2024-02-25 +date-released: 2024-02-29 repository-code: "https://github.com/sagemath/sage" url: "https://www.sagemath.org/" diff --git a/VERSION.txt b/VERSION.txt index 8685f53e56f..4d68939e7fc 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.3.rc0, Release Date: 2024-02-25 +SageMath version 10.3.rc1, Release Date: 2024-02-29 diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index f4356ffc7f6..4448844093d 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=ebe07f8b9c90595aae4f92d51ad510bc533f3a37 -md5=032461abc5cf4561d30156cafb8afae0 -cksum=3521715274 +sha1=b0dfc1d5886366b5c58354527810c1dbeffd78a3 +md5=c2f9837bcf2823d5b2f36063ebeedb38 +cksum=3535625335 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index 8ca9d3db3db..cd15c46bb91 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -c25d6e998d4a3b23a1b13ae9e47d6fec59cea382 +686e933eb32ade977ed51836a33424e2095e5408 diff --git a/build/pkgs/sage_conf/install-requires.txt b/build/pkgs/sage_conf/install-requires.txt index c89cf3e4fa5..9e5279f23ed 100644 --- a/build/pkgs/sage_conf/install-requires.txt +++ b/build/pkgs/sage_conf/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-conf ~= 10.3rc0 +sage-conf ~= 10.3rc1 diff --git a/build/pkgs/sage_docbuild/install-requires.txt b/build/pkgs/sage_docbuild/install-requires.txt index 67181be111a..d1cbd1c4066 100644 --- a/build/pkgs/sage_docbuild/install-requires.txt +++ b/build/pkgs/sage_docbuild/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-docbuild ~= 10.3rc0 +sage-docbuild ~= 10.3rc1 diff --git a/build/pkgs/sage_setup/install-requires.txt b/build/pkgs/sage_setup/install-requires.txt index 9b55e69ca14..1f330b93de9 100644 --- a/build/pkgs/sage_setup/install-requires.txt +++ b/build/pkgs/sage_setup/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-setup ~= 10.3rc0 +sage-setup ~= 10.3rc1 diff --git a/build/pkgs/sage_sws2rst/install-requires.txt b/build/pkgs/sage_sws2rst/install-requires.txt index 7d9753fe5ba..847e45a986a 100644 --- a/build/pkgs/sage_sws2rst/install-requires.txt +++ b/build/pkgs/sage_sws2rst/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-sws2rst ~= 10.3rc0 +sage-sws2rst ~= 10.3rc1 diff --git a/build/pkgs/sagelib/install-requires.txt b/build/pkgs/sagelib/install-requires.txt index b1821569ba4..f92a0a3bedd 100644 --- a/build/pkgs/sagelib/install-requires.txt +++ b/build/pkgs/sagelib/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-standard ~= 10.3rc0 +sagemath-standard ~= 10.3rc1 diff --git a/build/pkgs/sagemath_bliss/install-requires.txt b/build/pkgs/sagemath_bliss/install-requires.txt index cf95cef67a7..166d4194940 100644 --- a/build/pkgs/sagemath_bliss/install-requires.txt +++ b/build/pkgs/sagemath_bliss/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-bliss ~= 10.3rc0 +sagemath-bliss ~= 10.3rc1 diff --git a/build/pkgs/sagemath_categories/install-requires.txt b/build/pkgs/sagemath_categories/install-requires.txt index e4ea2d5d0c4..7ad95d358a9 100644 --- a/build/pkgs/sagemath_categories/install-requires.txt +++ b/build/pkgs/sagemath_categories/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-categories ~= 10.3rc0 +sagemath-categories ~= 10.3rc1 diff --git a/build/pkgs/sagemath_coxeter3/install-requires.txt b/build/pkgs/sagemath_coxeter3/install-requires.txt index 6200a717bfb..c381c7d2dc9 100644 --- a/build/pkgs/sagemath_coxeter3/install-requires.txt +++ b/build/pkgs/sagemath_coxeter3/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-coxeter3 ~= 10.3rc0 +sagemath-coxeter3 ~= 10.3rc1 diff --git a/build/pkgs/sagemath_environment/install-requires.txt b/build/pkgs/sagemath_environment/install-requires.txt index 4ce179501fd..88f3b30d150 100644 --- a/build/pkgs/sagemath_environment/install-requires.txt +++ b/build/pkgs/sagemath_environment/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-environment ~= 10.3rc0 +sagemath-environment ~= 10.3rc1 diff --git a/build/pkgs/sagemath_mcqd/install-requires.txt b/build/pkgs/sagemath_mcqd/install-requires.txt index 9f21ede31b8..d597cc80dfa 100644 --- a/build/pkgs/sagemath_mcqd/install-requires.txt +++ b/build/pkgs/sagemath_mcqd/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-mcqd ~= 10.3rc0 +sagemath-mcqd ~= 10.3rc1 diff --git a/build/pkgs/sagemath_meataxe/install-requires.txt b/build/pkgs/sagemath_meataxe/install-requires.txt index 2fb3b54c592..ca3993e8017 100644 --- a/build/pkgs/sagemath_meataxe/install-requires.txt +++ b/build/pkgs/sagemath_meataxe/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-meataxe ~= 10.3rc0 +sagemath-meataxe ~= 10.3rc1 diff --git a/build/pkgs/sagemath_objects/install-requires.txt b/build/pkgs/sagemath_objects/install-requires.txt index ea0025f36fa..fcba5770909 100644 --- a/build/pkgs/sagemath_objects/install-requires.txt +++ b/build/pkgs/sagemath_objects/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-objects ~= 10.3rc0 +sagemath-objects ~= 10.3rc1 diff --git a/build/pkgs/sagemath_repl/install-requires.txt b/build/pkgs/sagemath_repl/install-requires.txt index cd5df803c32..2f51bb4ea68 100644 --- a/build/pkgs/sagemath_repl/install-requires.txt +++ b/build/pkgs/sagemath_repl/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-repl ~= 10.3rc0 +sagemath-repl ~= 10.3rc1 diff --git a/build/pkgs/sagemath_sirocco/install-requires.txt b/build/pkgs/sagemath_sirocco/install-requires.txt index 052d8df5722..f233d5d44b9 100644 --- a/build/pkgs/sagemath_sirocco/install-requires.txt +++ b/build/pkgs/sagemath_sirocco/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-sirocco ~= 10.3rc0 +sagemath-sirocco ~= 10.3rc1 diff --git a/build/pkgs/sagemath_tdlib/install-requires.txt b/build/pkgs/sagemath_tdlib/install-requires.txt index ef4f0b40800..06f07064c85 100644 --- a/build/pkgs/sagemath_tdlib/install-requires.txt +++ b/build/pkgs/sagemath_tdlib/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-tdlib ~= 10.3rc0 +sagemath-tdlib ~= 10.3rc1 diff --git a/pkgs/sage-conf/VERSION.txt b/pkgs/sage-conf/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sage-conf/VERSION.txt +++ b/pkgs/sage-conf/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sage-conf_conda/VERSION.txt b/pkgs/sage-conf_conda/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sage-conf_conda/VERSION.txt +++ b/pkgs/sage-conf_conda/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sage-conf_pypi/VERSION.txt b/pkgs/sage-conf_pypi/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sage-conf_pypi/VERSION.txt +++ b/pkgs/sage-conf_pypi/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sage-docbuild/VERSION.txt b/pkgs/sage-docbuild/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sage-docbuild/VERSION.txt +++ b/pkgs/sage-docbuild/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sage-setup/VERSION.txt b/pkgs/sage-setup/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sage-setup/VERSION.txt +++ b/pkgs/sage-setup/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sage-sws2rst/VERSION.txt b/pkgs/sage-sws2rst/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sage-sws2rst/VERSION.txt +++ b/pkgs/sage-sws2rst/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-bliss/VERSION.txt b/pkgs/sagemath-bliss/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-bliss/VERSION.txt +++ b/pkgs/sagemath-bliss/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-categories/VERSION.txt b/pkgs/sagemath-categories/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-categories/VERSION.txt +++ b/pkgs/sagemath-categories/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-coxeter3/VERSION.txt b/pkgs/sagemath-coxeter3/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-coxeter3/VERSION.txt +++ b/pkgs/sagemath-coxeter3/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-environment/VERSION.txt b/pkgs/sagemath-environment/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-environment/VERSION.txt +++ b/pkgs/sagemath-environment/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-mcqd/VERSION.txt b/pkgs/sagemath-mcqd/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-mcqd/VERSION.txt +++ b/pkgs/sagemath-mcqd/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-meataxe/VERSION.txt b/pkgs/sagemath-meataxe/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-meataxe/VERSION.txt +++ b/pkgs/sagemath-meataxe/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-objects/VERSION.txt b/pkgs/sagemath-objects/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-objects/VERSION.txt +++ b/pkgs/sagemath-objects/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-repl/VERSION.txt b/pkgs/sagemath-repl/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-repl/VERSION.txt +++ b/pkgs/sagemath-repl/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-sirocco/VERSION.txt b/pkgs/sagemath-sirocco/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-sirocco/VERSION.txt +++ b/pkgs/sagemath-sirocco/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/pkgs/sagemath-tdlib/VERSION.txt b/pkgs/sagemath-tdlib/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/pkgs/sagemath-tdlib/VERSION.txt +++ b/pkgs/sagemath-tdlib/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/src/VERSION.txt b/src/VERSION.txt index 0ebca0e5b3f..61e455a6152 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -10.3.rc0 +10.3.rc1 diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index d9db6163f53..fed384cc956 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -4,6 +4,6 @@ # which stops "setup.py develop" from rewriting it as a Python file. : # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='10.3.rc0' -SAGE_RELEASE_DATE='2024-02-25' -SAGE_VERSION_BANNER='SageMath version 10.3.rc0, Release Date: 2024-02-25' +SAGE_VERSION='10.3.rc1' +SAGE_RELEASE_DATE='2024-02-29' +SAGE_VERSION_BANNER='SageMath version 10.3.rc1, Release Date: 2024-02-29' diff --git a/src/sage/version.py b/src/sage/version.py index ff9dc5878fc..a33ca247d17 100644 --- a/src/sage/version.py +++ b/src/sage/version.py @@ -1,5 +1,5 @@ # Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! -version = '10.3.rc0' -date = '2024-02-25' -banner = 'SageMath version 10.3.rc0, Release Date: 2024-02-25' +version = '10.3.rc1' +date = '2024-02-29' +banner = 'SageMath version 10.3.rc1, Release Date: 2024-02-29' From cdcc434adda4e37394dbe56d7e53d89c1d7c1746 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 28 Feb 2024 15:15:18 -0800 Subject: [PATCH 54/56] build/pkgs/{cmake,ninja_build}/spkg-configure.m4: Reject installs in inaccessible user scheme --- build/pkgs/cmake/spkg-configure.m4 | 24 +++++++++++-------- build/pkgs/ninja_build/spkg-configure.m4 | 30 ++++++++++++++---------- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/build/pkgs/cmake/spkg-configure.m4 b/build/pkgs/cmake/spkg-configure.m4 index ce36e8aa0cc..4210442c44c 100644 --- a/build/pkgs/cmake/spkg-configure.m4 +++ b/build/pkgs/cmake/spkg-configure.m4 @@ -1,13 +1,17 @@ -SAGE_SPKG_CONFIGURE( - [cmake], [ - AC_CACHE_CHECK([for cmake >= 3.11], [ac_cv_path_CMAKE], [ - AC_PATH_PROGS_FEATURE_CHECK([CMAKE], [cmake], [ - cmake_version=`$ac_path_CMAKE --version 2>&1 \ - | $SED -n -e 's/cmake version *\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)/\1/p'` - AS_IF([test -n "$cmake_version"], [ - AX_COMPARE_VERSION([$cmake_version], [ge], [3.11], [ - ac_cv_path_CMAKE="$ac_path_CMAKE" - ac_path_CMAKE_found=: +SAGE_SPKG_CONFIGURE([cmake], [dnl + AC_CACHE_CHECK([for cmake >= 3.11], [ac_cv_path_CMAKE], [dnl + dnl Do not accept cmake installed via https://pypi.org/project/cmake/ + dnl in the default user scheme; it will not work in our venv because + dnl we set PYTHONUSERBASE in sage-env. + WITH_SAGE_PYTHONUSERBASE([dnl + AC_PATH_PROGS_FEATURE_CHECK([CMAKE], [cmake], [dnl + cmake_version=`$ac_path_CMAKE --version 2>&1 \ + | $SED -n -e 's/cmake version *\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)/\1/p'` + AS_IF([test -n "$cmake_version"], [dnl + AX_COMPARE_VERSION([$cmake_version], [ge], [3.11], [dnl + ac_cv_path_CMAKE="$ac_path_CMAKE" + ac_path_CMAKE_found=: + ]) ]) ]) ]) diff --git a/build/pkgs/ninja_build/spkg-configure.m4 b/build/pkgs/ninja_build/spkg-configure.m4 index 5b83d189801..01ee6a30f10 100644 --- a/build/pkgs/ninja_build/spkg-configure.m4 +++ b/build/pkgs/ninja_build/spkg-configure.m4 @@ -1,16 +1,20 @@ -SAGE_SPKG_CONFIGURE( - [ninja_build], [ - dnl meson_python needs 1.8.2 or later - AC_CACHE_CHECK([for ninja >= 1.8.2], [ac_cv_path_NINJA], [ - AC_PATH_PROGS_FEATURE_CHECK([NINJA], [ninja], [ - dnl support both two- and three-component version schemes - dnl since samurai (a ninja alternative) uses two - ninja_version=`$ac_path_NINJA --version 2>&1 \ - | $SED -n -e 's/\([[0-9]]*\(\.[[0-9]]*\)\{1,2\}\).*/\1/p'` - AS_IF([test -n "$ninja_version"], [ - AX_COMPARE_VERSION([$ninja_version], [ge], [1.8.2], [ - ac_cv_path_NINJA="$ac_path_NINJA" - ac_path_NINJA_found=: +SAGE_SPKG_CONFIGURE([ninja_build], [dnl + dnl meson_python needs 1.8.2 or later + AC_CACHE_CHECK([for ninja >= 1.8.2], [ac_cv_path_NINJA], [dnl + dnl Do not accept ninja installed from https://pypi.org/project/ninja/ + dnl in the default user scheme; it will not work in our venv because + dnl we set PYTHONUSERBASE in sage-env. + WITH_SAGE_PYTHONUSERBASE([dnl + AC_PATH_PROGS_FEATURE_CHECK([NINJA], [ninja], [dnl + dnl support both two- and three-component version schemes + dnl since samurai (a ninja alternative) uses two + ninja_version=`$ac_path_NINJA --version 2>&1 \ + | $SED -n -e 's/\([[0-9]]*\(\.[[0-9]]*\)\{1,2\}\).*/\1/p'` + AS_IF([test -n "$ninja_version"], [dnl + AX_COMPARE_VERSION([$ninja_version], [ge], [1.8.2], [ + ac_cv_path_NINJA="$ac_path_NINJA" + ac_path_NINJA_found=: + ]) ]) ]) ]) From f713a5654ecda0f10ba7e6ee24486e0fe4952aa5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 22:54:29 -0800 Subject: [PATCH 55/56] build/pkgs/flint: Reject FLINT >= 3.1.0 --- build/pkgs/flint/spkg-configure.m4 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/build/pkgs/flint/spkg-configure.m4 b/build/pkgs/flint/spkg-configure.m4 index 9576e4cc1e9..ddf60b596fd 100644 --- a/build/pkgs/flint/spkg-configure.m4 +++ b/build/pkgs/flint/spkg-configure.m4 @@ -1,11 +1,26 @@ SAGE_SPKG_CONFIGURE([flint], [ SAGE_SPKG_DEPCHECK([mpfr], [ - AC_CHECK_HEADER(flint/flint.h, [ + AC_CHECK_HEADER(flint/flint.h, [dnl dnl gr_get_fexpr appears in Flint 3.0 - AC_SEARCH_LIBS([gr_get_fexpr], [flint], [], [sage_spkg_install_flint=yes]) + AC_SEARCH_LIBS([gr_get_fexpr], [flint], [dnl + dnl Flint 3.1 is too new + AC_MSG_CHECKING([whether FLINT version is >= 3.1.0]) + AC_COMPILE_IFELSE([dnl + AC_LANG_PROGRAM([[#include + #if __FLINT_RELEASE >= 30100 + # error "FLINT 3.1 is too new" + #endif + ]]) + ], [dnl + AC_MSG_RESULT([no]) + ], [dnl + AC_MSG_RESULT([yes; too new]) + sage_spkg_install_flint=yes + ]) + ], [sage_spkg_install_flint=yes]) ], [sage_spkg_install_flint=yes]) ]) -], [], [], [ +], [], [], [dnl if test x$sage_spkg_install_flint = xyes; then AC_SUBST(SAGE_FLINT_PREFIX, ['$SAGE_LOCAL']) else From cb8e15b4769c11d3119c6459aa4abfc8231f2e12 Mon Sep 17 00:00:00 2001 From: Release Manager Date: Mon, 4 Mar 2024 23:37:49 +0100 Subject: [PATCH 56/56] Updated SageMath version to 10.3.rc2 --- CITATION.cff | 4 ++-- VERSION.txt | 2 +- build/pkgs/configure/checksums.ini | 6 +++--- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/sage_conf/install-requires.txt | 2 +- build/pkgs/sage_docbuild/install-requires.txt | 2 +- build/pkgs/sage_setup/install-requires.txt | 2 +- build/pkgs/sage_sws2rst/install-requires.txt | 2 +- build/pkgs/sagelib/install-requires.txt | 2 +- build/pkgs/sagemath_bliss/install-requires.txt | 2 +- build/pkgs/sagemath_categories/install-requires.txt | 2 +- build/pkgs/sagemath_coxeter3/install-requires.txt | 2 +- build/pkgs/sagemath_environment/install-requires.txt | 2 +- build/pkgs/sagemath_mcqd/install-requires.txt | 2 +- build/pkgs/sagemath_meataxe/install-requires.txt | 2 +- build/pkgs/sagemath_objects/install-requires.txt | 2 +- build/pkgs/sagemath_repl/install-requires.txt | 2 +- build/pkgs/sagemath_sirocco/install-requires.txt | 2 +- build/pkgs/sagemath_tdlib/install-requires.txt | 2 +- pkgs/sage-conf/VERSION.txt | 2 +- pkgs/sage-conf_conda/VERSION.txt | 2 +- pkgs/sage-conf_pypi/VERSION.txt | 2 +- pkgs/sage-docbuild/VERSION.txt | 2 +- pkgs/sage-setup/VERSION.txt | 2 +- pkgs/sage-sws2rst/VERSION.txt | 2 +- pkgs/sagemath-bliss/VERSION.txt | 2 +- pkgs/sagemath-categories/VERSION.txt | 2 +- pkgs/sagemath-coxeter3/VERSION.txt | 2 +- pkgs/sagemath-environment/VERSION.txt | 2 +- pkgs/sagemath-mcqd/VERSION.txt | 2 +- pkgs/sagemath-meataxe/VERSION.txt | 2 +- pkgs/sagemath-objects/VERSION.txt | 2 +- pkgs/sagemath-repl/VERSION.txt | 2 +- pkgs/sagemath-sirocco/VERSION.txt | 2 +- pkgs/sagemath-tdlib/VERSION.txt | 2 +- src/VERSION.txt | 2 +- src/bin/sage-version.sh | 6 +++--- src/sage/version.py | 6 +++--- 38 files changed, 45 insertions(+), 45 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 3cbe2ff138b..30175dfb598 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -4,8 +4,8 @@ title: SageMath abstract: SageMath is a free open-source mathematics software system. authors: - name: "The SageMath Developers" -version: 10.3.rc1 +version: 10.3.rc2 doi: 10.5281/zenodo.593563 -date-released: 2024-02-29 +date-released: 2024-03-04 repository-code: "https://github.com/sagemath/sage" url: "https://www.sagemath.org/" diff --git a/VERSION.txt b/VERSION.txt index 4d68939e7fc..0480b077d09 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.3.rc1, Release Date: 2024-02-29 +SageMath version 10.3.rc2, Release Date: 2024-03-04 diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index 365d56084a3..5118007d474 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=26e8d2b6804d9474bed32cba580e9edd9947723c -md5=b6b9dbb57d17ba53f57f37f74c66a24c -cksum=3731157415 +sha1=ff35813eb1168b754ab9470066b39aeaca9d462c +md5=834bc382880b0cfea48fa00bdff79534 +cksum=4002007446 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index d7438585ccb..e32f27ed547 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -4163e69cf94a4fbcf59e1297de0a4644d2e4291a +872ca39ec422cacd1005dd6b1ccd9737d5d88712 diff --git a/build/pkgs/sage_conf/install-requires.txt b/build/pkgs/sage_conf/install-requires.txt index 9e5279f23ed..09f1d4383d6 100644 --- a/build/pkgs/sage_conf/install-requires.txt +++ b/build/pkgs/sage_conf/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-conf ~= 10.3rc1 +sage-conf ~= 10.3rc2 diff --git a/build/pkgs/sage_docbuild/install-requires.txt b/build/pkgs/sage_docbuild/install-requires.txt index d1cbd1c4066..0308591fab7 100644 --- a/build/pkgs/sage_docbuild/install-requires.txt +++ b/build/pkgs/sage_docbuild/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-docbuild ~= 10.3rc1 +sage-docbuild ~= 10.3rc2 diff --git a/build/pkgs/sage_setup/install-requires.txt b/build/pkgs/sage_setup/install-requires.txt index 1f330b93de9..003624a1377 100644 --- a/build/pkgs/sage_setup/install-requires.txt +++ b/build/pkgs/sage_setup/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-setup ~= 10.3rc1 +sage-setup ~= 10.3rc2 diff --git a/build/pkgs/sage_sws2rst/install-requires.txt b/build/pkgs/sage_sws2rst/install-requires.txt index 847e45a986a..0f0f949e8e1 100644 --- a/build/pkgs/sage_sws2rst/install-requires.txt +++ b/build/pkgs/sage_sws2rst/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-sws2rst ~= 10.3rc1 +sage-sws2rst ~= 10.3rc2 diff --git a/build/pkgs/sagelib/install-requires.txt b/build/pkgs/sagelib/install-requires.txt index f92a0a3bedd..a0c5acf57f9 100644 --- a/build/pkgs/sagelib/install-requires.txt +++ b/build/pkgs/sagelib/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-standard ~= 10.3rc1 +sagemath-standard ~= 10.3rc2 diff --git a/build/pkgs/sagemath_bliss/install-requires.txt b/build/pkgs/sagemath_bliss/install-requires.txt index 166d4194940..54d8411557b 100644 --- a/build/pkgs/sagemath_bliss/install-requires.txt +++ b/build/pkgs/sagemath_bliss/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-bliss ~= 10.3rc1 +sagemath-bliss ~= 10.3rc2 diff --git a/build/pkgs/sagemath_categories/install-requires.txt b/build/pkgs/sagemath_categories/install-requires.txt index 7ad95d358a9..4b5c9e13f31 100644 --- a/build/pkgs/sagemath_categories/install-requires.txt +++ b/build/pkgs/sagemath_categories/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-categories ~= 10.3rc1 +sagemath-categories ~= 10.3rc2 diff --git a/build/pkgs/sagemath_coxeter3/install-requires.txt b/build/pkgs/sagemath_coxeter3/install-requires.txt index c381c7d2dc9..49fc98261eb 100644 --- a/build/pkgs/sagemath_coxeter3/install-requires.txt +++ b/build/pkgs/sagemath_coxeter3/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-coxeter3 ~= 10.3rc1 +sagemath-coxeter3 ~= 10.3rc2 diff --git a/build/pkgs/sagemath_environment/install-requires.txt b/build/pkgs/sagemath_environment/install-requires.txt index 88f3b30d150..af5d0708df9 100644 --- a/build/pkgs/sagemath_environment/install-requires.txt +++ b/build/pkgs/sagemath_environment/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-environment ~= 10.3rc1 +sagemath-environment ~= 10.3rc2 diff --git a/build/pkgs/sagemath_mcqd/install-requires.txt b/build/pkgs/sagemath_mcqd/install-requires.txt index d597cc80dfa..10521420f3c 100644 --- a/build/pkgs/sagemath_mcqd/install-requires.txt +++ b/build/pkgs/sagemath_mcqd/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-mcqd ~= 10.3rc1 +sagemath-mcqd ~= 10.3rc2 diff --git a/build/pkgs/sagemath_meataxe/install-requires.txt b/build/pkgs/sagemath_meataxe/install-requires.txt index ca3993e8017..aa01559a846 100644 --- a/build/pkgs/sagemath_meataxe/install-requires.txt +++ b/build/pkgs/sagemath_meataxe/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-meataxe ~= 10.3rc1 +sagemath-meataxe ~= 10.3rc2 diff --git a/build/pkgs/sagemath_objects/install-requires.txt b/build/pkgs/sagemath_objects/install-requires.txt index fcba5770909..65e5a6adcee 100644 --- a/build/pkgs/sagemath_objects/install-requires.txt +++ b/build/pkgs/sagemath_objects/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-objects ~= 10.3rc1 +sagemath-objects ~= 10.3rc2 diff --git a/build/pkgs/sagemath_repl/install-requires.txt b/build/pkgs/sagemath_repl/install-requires.txt index 2f51bb4ea68..8048e7ac060 100644 --- a/build/pkgs/sagemath_repl/install-requires.txt +++ b/build/pkgs/sagemath_repl/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-repl ~= 10.3rc1 +sagemath-repl ~= 10.3rc2 diff --git a/build/pkgs/sagemath_sirocco/install-requires.txt b/build/pkgs/sagemath_sirocco/install-requires.txt index f233d5d44b9..64ff32019a5 100644 --- a/build/pkgs/sagemath_sirocco/install-requires.txt +++ b/build/pkgs/sagemath_sirocco/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-sirocco ~= 10.3rc1 +sagemath-sirocco ~= 10.3rc2 diff --git a/build/pkgs/sagemath_tdlib/install-requires.txt b/build/pkgs/sagemath_tdlib/install-requires.txt index 06f07064c85..fad2b2a87eb 100644 --- a/build/pkgs/sagemath_tdlib/install-requires.txt +++ b/build/pkgs/sagemath_tdlib/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-tdlib ~= 10.3rc1 +sagemath-tdlib ~= 10.3rc2 diff --git a/pkgs/sage-conf/VERSION.txt b/pkgs/sage-conf/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sage-conf/VERSION.txt +++ b/pkgs/sage-conf/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sage-conf_conda/VERSION.txt b/pkgs/sage-conf_conda/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sage-conf_conda/VERSION.txt +++ b/pkgs/sage-conf_conda/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sage-conf_pypi/VERSION.txt b/pkgs/sage-conf_pypi/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sage-conf_pypi/VERSION.txt +++ b/pkgs/sage-conf_pypi/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sage-docbuild/VERSION.txt b/pkgs/sage-docbuild/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sage-docbuild/VERSION.txt +++ b/pkgs/sage-docbuild/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sage-setup/VERSION.txt b/pkgs/sage-setup/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sage-setup/VERSION.txt +++ b/pkgs/sage-setup/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sage-sws2rst/VERSION.txt b/pkgs/sage-sws2rst/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sage-sws2rst/VERSION.txt +++ b/pkgs/sage-sws2rst/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-bliss/VERSION.txt b/pkgs/sagemath-bliss/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-bliss/VERSION.txt +++ b/pkgs/sagemath-bliss/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-categories/VERSION.txt b/pkgs/sagemath-categories/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-categories/VERSION.txt +++ b/pkgs/sagemath-categories/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-coxeter3/VERSION.txt b/pkgs/sagemath-coxeter3/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-coxeter3/VERSION.txt +++ b/pkgs/sagemath-coxeter3/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-environment/VERSION.txt b/pkgs/sagemath-environment/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-environment/VERSION.txt +++ b/pkgs/sagemath-environment/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-mcqd/VERSION.txt b/pkgs/sagemath-mcqd/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-mcqd/VERSION.txt +++ b/pkgs/sagemath-mcqd/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-meataxe/VERSION.txt b/pkgs/sagemath-meataxe/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-meataxe/VERSION.txt +++ b/pkgs/sagemath-meataxe/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-objects/VERSION.txt b/pkgs/sagemath-objects/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-objects/VERSION.txt +++ b/pkgs/sagemath-objects/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-repl/VERSION.txt b/pkgs/sagemath-repl/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-repl/VERSION.txt +++ b/pkgs/sagemath-repl/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-sirocco/VERSION.txt b/pkgs/sagemath-sirocco/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-sirocco/VERSION.txt +++ b/pkgs/sagemath-sirocco/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/pkgs/sagemath-tdlib/VERSION.txt b/pkgs/sagemath-tdlib/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/pkgs/sagemath-tdlib/VERSION.txt +++ b/pkgs/sagemath-tdlib/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/src/VERSION.txt b/src/VERSION.txt index 61e455a6152..b33291c9c02 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -10.3.rc1 +10.3.rc2 diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index fed384cc956..f0cad7cda6a 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -4,6 +4,6 @@ # which stops "setup.py develop" from rewriting it as a Python file. : # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='10.3.rc1' -SAGE_RELEASE_DATE='2024-02-29' -SAGE_VERSION_BANNER='SageMath version 10.3.rc1, Release Date: 2024-02-29' +SAGE_VERSION='10.3.rc2' +SAGE_RELEASE_DATE='2024-03-04' +SAGE_VERSION_BANNER='SageMath version 10.3.rc2, Release Date: 2024-03-04' diff --git a/src/sage/version.py b/src/sage/version.py index a33ca247d17..e92696ee471 100644 --- a/src/sage/version.py +++ b/src/sage/version.py @@ -1,5 +1,5 @@ # Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! -version = '10.3.rc1' -date = '2024-02-29' -banner = 'SageMath version 10.3.rc1, Release Date: 2024-02-29' +version = '10.3.rc2' +date = '2024-03-04' +banner = 'SageMath version 10.3.rc2, Release Date: 2024-03-04'