diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index 1c6c3a8d371..5c7ba589684 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=9cc96f867a972260fba31ec0f94d93a83c8f0171 -md5=bb139207e7cfd88b73d0ac13e2888b5a -cksum=1509944110 +sha1=0e54fe11e7b0b193954641aa0af809c71f71ac65 +md5=74b873bb1f8003003ad3d57249a0eba1 +cksum=981384134 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index e6aab73b04c..f9c265f1bc9 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -842a6866f12dc8ed96cc9f10f828c872dfb8e73a +d6e0952447e576f0ad9e7641584e79cd31c7e172 diff --git a/build/pkgs/maxima/checksums.ini b/build/pkgs/maxima/checksums.ini index f401c24c375..065f7d02e61 100644 --- a/build/pkgs/maxima/checksums.ini +++ b/build/pkgs/maxima/checksums.ini @@ -1,4 +1,5 @@ tarball=maxima-VERSION.tar.gz -sha1=ddb2f1405ccb2c4f2bd6712755e2dbbd9a2e57e0 -md5=b66bf80a95e7e78d68e5f230e7b94761 -cksum=1645453342 +sha1=5f1fce915675f46823c33638480dcc1fcaf447a1 +md5=75e040745161901968d9c99c7a258e5c +cksum=2316004676 +upstream_url=https://sourceforge.net/projects/maxima/files/Maxima-source/VERSION-source/maxima-VERSION.tar.gz/download diff --git a/build/pkgs/maxima/package-version.txt b/build/pkgs/maxima/package-version.txt index ec8bbb5f834..d532a08f3cd 100644 --- a/build/pkgs/maxima/package-version.txt +++ b/build/pkgs/maxima/package-version.txt @@ -1 +1 @@ -5.42.2 +5.44.0 diff --git a/build/pkgs/maxima/patches/0001-taylor2-Avoid-blowing-the-stack-when-diff-expand-isn.patch b/build/pkgs/maxima/patches/0001-taylor2-Avoid-blowing-the-stack-when-diff-expand-isn.patch deleted file mode 100644 index 49abbb14c1c..00000000000 --- a/build/pkgs/maxima/patches/0001-taylor2-Avoid-blowing-the-stack-when-diff-expand-isn.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/src/hayat.lisp b/src/hayat.lisp -index 07699d6..ab8984d 100644 ---- a/src/hayat.lisp -+++ b/src/hayat.lisp -@@ -2189,6 +2189,23 @@ - (or (alike1 (exp-pt (get-datum (datum-var (car l)))) (exp-pt (car l))) - (return () )))) - -+;; SUBTREE-SEARCH -+;; -+;; Search for subtrees, ST, of TREE that contain an element equal to BRANCH -+;; under TEST as an immediate child and return them as a list. -+;; -+;; Examples: -+;; (SUBTREE-SEARCH 2 '(1 2 3)) => '((1 2 3)) -+;; (SUBTREE-SEARCH 2 '(1 2 2 3)) => '((1 2 2 3)) -+;; (SUBTREE-SEARCH 2 '(1 (2) 3)) => '((2)) -+;; (SUBTREE-SEARCH 4 '(1 (2) 3)) => NIL -+;; (SUBTREE-SEARCH 2 '(1 (2) 3 (2))) => '((2) (2)) -+ -+(defun subtree-search (branch tree &optional (test 'equalp)) -+ (unless (atom tree) -+ (if (find branch tree :test test) (list tree) -+ (mapcan (lambda (child) (subtree-search branch child test)) tree)))) -+ - (defun taylor2 (e) - (let ((last-exp e)) ;; lexp-non0 should be bound here when needed - (cond ((assolike e tlist) (var-expand e 1 () )) -@@ -2232,8 +2249,31 @@ - ((null l) t) - (or (free e (car l)) (return ())))) - (newsym e)) -- (t (let ((exact-poly () )) ; Taylor series aren't exact -- (taylor2 (diff-expand e tlist))))))) -+ (t -+ ;; When all else fails, call diff-expand to try to expand e around the -+ ;; point as a Taylor series by taking repeated derivatives. This might -+ ;; fail, unfortunately: If a required derivative doesn't exist, then -+ ;; DIFF-EXPAND will return a form of the form "f'(x)" with the -+ ;; variable, rather than the expansion point in it. -+ ;; -+ ;; Sometimes this works - in particular, if there is a genuine pole at -+ ;; the point, we end up passing a sum of terms like x^(-k) to a -+ ;; recursive invocation and all is good. Unfortunately, it can also -+ ;; fail. For example, if e is abs(sin(x)) and we try to expand to first -+ ;; order, the expression "1/1*(cos(x)*sin(x)/abs(sin(x)))*x^1+0" is -+ ;; returned. If we call taylor2 on that, we will end up recursing and -+ ;; blowing the stack. To avoid doing so, error out if EXPANSION -+ ;; contains E as a subtree. However, don't error if it occurs as an -+ ;; argument to %DERIVATIVE (in which case, we might well be fine). This -+ ;; happens from things like taylor(log(f(x)), x, x0, 1). -+ -+ (let* ((exact-poly nil) ; (Taylor series aren't exact) -+ (expansion (diff-expand e tlist))) -+ (when (find-if (lambda (subtree) -+ (not (eq ($op subtree) '%derivative))) -+ (subtree-search e expansion)) -+ (exp-pt-err)) -+ (taylor2 expansion)))))) - - (defun compatvarlist (a b c d) - (cond ((null a) t) -@@ -2968,7 +3008,21 @@ - (and (or (member '$inf pt-list :test #'eq) (member '$minf pt-list :test #'eq)) - (unfam-sing-err))) - --(defun diff-expand (exp l) ;l is tlist -+;; DIFF-EXPAND -+;; -+;; Expand EXP in the variables as specified in L, which is a list of tlists. If -+;; L is a singleton, this just works by the classic Taylor expansion: -+;; -+;; f(x) = f(c) + f'(c) + f''(c)/2 + ... + f^(k)(c)/k! -+;; -+;; If L specifies multiple expansions, DIFF-EXPAND works recursively by -+;; expanding one variable at a time. The derivatives are computed using SDIFF. -+;; -+;; In some cases, f'(c) or some higher derivative might be an expression of the -+;; form 1/0. Instead of returning an error, DIFF-EXPAND uses f'(x) -+;; instead. (Note: This seems bogus to me (RJS), but I'm just describing how -+;; EVAL-DERIV works) -+(defun diff-expand (exp l) - (check-inf-sing (mapcar (function caddr) l)) - (cond ((not l) exp) - (t diff --git a/build/pkgs/maxima/patches/bugfix3629.patch b/build/pkgs/maxima/patches/bugfix3629.patch deleted file mode 100644 index 196131410b0..00000000000 --- a/build/pkgs/maxima/patches/bugfix3629.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 615b4bf8b13d55a576bc60ad04f7b17d75f49021 -Author: Yasuaki Honda -Date: Sun Apr 26 12:15:14 2020 +0900 - - Fix for Bug #3629, to compile with ECL 20.4.24 - -diff --git a/lisp-utils/defsystem.lisp b/lisp-utils/defsystem.lisp -index dda669d26..b8e96eebe 100644 ---- a/lisp-utils/defsystem.lisp -+++ b/lisp-utils/defsystem.lisp -@@ -4152,7 +4152,7 @@ the system definition, if provided." - #+:ecl - (progn - (ext:package-lock "CL" nil) -- (setf (symbol-function 'lisp:require) -+ (setf (symbol-function 'cl:require) - (symbol-function 'new-require)) - (ext:package-lock "CL" t)) - #+:lispworks diff --git a/build/pkgs/maxima/spkg-install.in b/build/pkgs/maxima/spkg-install.in index 835b9c068a0..eb4c0da4d14 100644 --- a/build/pkgs/maxima/spkg-install.in +++ b/build/pkgs/maxima/spkg-install.in @@ -41,6 +41,15 @@ for i in doc/info/*.html ; do touch "${i}" done touch doc/info/maxima.info* +# Maxima 5.44.0 build_html.sh is not compatible with makeinfo 4.8 +# (which is /usr/bin/makeinfo on macOS). #30063 +# Do not build the HTML docs unless the user asks for it, +# in which case it is their problem to install a better +# makeinfo version. +if [[ "$SAGE_SPKG_INSTALL_DOCS" != yes ]] ; then +touch doc/info/maxima_toc.html interfaces/xmaxima/doc/xmaxima.html +fi + #--------------------------------------------------------------- sdh_make diff --git a/src/sage/functions/gamma.py b/src/sage/functions/gamma.py index 3806cb01620..7f4b8325e41 100644 --- a/src/sage/functions/gamma.py +++ b/src/sage/functions/gamma.py @@ -509,14 +509,14 @@ def __init__(self): sage: gamma_inc_lower(x,x)._sympy_() lowergamma(x, x) sage: maxima(gamma_inc_lower(x,x)) - gamma_greek(_SAGE_VAR_x,_SAGE_VAR_x) + gamma_incomplete_lower(_SAGE_VAR_x,_SAGE_VAR_x) .. SEEALSO:: :class:`Function_gamma_inc` """ BuiltinFunction.__init__(self, "gamma_inc_lower", nargs=2, latex_name=r"\gamma", - conversions={'maxima':'gamma_greek', + conversions={'maxima':'gamma_incomplete_lower', 'maple':'GAMMA', 'sympy':'lowergamma', 'giac':'igamma'}) def _eval_(self, x, y): diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py index ed3055da9d2..70e885c0930 100644 --- a/src/sage/interfaces/maxima_abstract.py +++ b/src/sage/interfaces/maxima_abstract.py @@ -177,10 +177,14 @@ def _command_runner(self, command, s, redirect=True): if redirect: res = bytes_to_str(subprocess.check_output(cmd, shell=True, env=env)) - # We get 4 lines of commented verbosity every time Maxima starts - # and the input is echoed, so we need to get rid of them - for _ in range(5): - res = res[res.find('\n')+1:] + # We get a few lines of commented verbosity every time Maxima starts + while res.startswith(';;;'): + newline = res.find('\n') + if newline == -1: + break + res = res[newline + 1:] + # The input is echoed, so we need to get rid of it + res = res[res.find('\n')+1:] return AsciiArtString(res) else: @@ -289,8 +293,14 @@ def completions(self, s, verbose=True): # in Maxima 5.19.1, apropos returns all commands that contain # the given string, instead of all commands that start with # the given string - cmd_list = self._eval_line('apropos("%s")'%s, error_check=False).replace('\\ - ','-') - cmd_list = [x for x in cmd_list[1:-1].split(',') if x[0] != '?'] + # + # Maxima 5.44 changed DEFMFUN so that it creates both $NAME + # and $NAME-IMPL (although the documentation suggests it would + # create NAME-IMPL, without the leading $). This causes + # name-impl to show up in $APROPOS. We remove it. + # https://sourceforge.net/p/maxima/bugs/3643/ + cmd_list = self._eval_line('apropos("%s")'%s, error_check=False).replace('\\ - ','-').replace('\\-','-') + cmd_list = [x for x in cmd_list[1:-1].split(',') if x[0] != '?' and not x.endswith('-impl')] return [x for x in cmd_list if x.find(s) == 0] def _commands(self, verbose=True): diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx index d24bf2060ce..7c18ec1efa4 100644 --- a/src/sage/symbolic/expression.pyx +++ b/src/sage/symbolic/expression.pyx @@ -10109,7 +10109,7 @@ cdef class Expression(CommutativeRingElement): ....: .simplify_hypergeometric(algorithm='sage')) hypergeometric((hypergeometric((e^x,), (1,), x),), (1,), x) sage: hypergeometric_M(1, 3, x).simplify_hypergeometric() - -2*(x - e^x + 1)/x^2 + -2*((x + 1)*e^(-x) - 1)*e^x/x^2 sage: (2 * hypergeometric_U(1, 3, x)).simplify_hypergeometric() 2*(x + 1)/x^2 diff --git a/src/sage/symbolic/integration/integral.py b/src/sage/symbolic/integration/integral.py index b9734be1c7f..80bc14679c7 100644 --- a/src/sage/symbolic/integration/integral.py +++ b/src/sage/symbolic/integration/integral.py @@ -859,11 +859,11 @@ def integrate(expression, v=None, a=None, b=None, algorithm=None, hold=False): sage: integrate(cos(w+T) / (1+c*cos(T))^2, T, 0, 2*pi) 2*pi*sqrt(-c^2 + 1)*c*cos(w)/(c^4 - 2*c^2 + 1) - Check that :trac:`13733` is fixed:: + Check that :trac:`13733` is fixed (but the bug reappeared, see :trac:`30063`):: - sage: a = integral(log(cot(x) - 1), x, 0, pi/4); a # long time (about 6 s) + sage: a = integral(log(cot(x) - 1), x, 0, pi/4); a # long time (about 6 s) # known bug -1/4*pi*log(2) - 1/2*I*dilog(I + 1) + 1/2*I*dilog(-I + 1) + 1/2*I*dilog(1/2*I + 1/2) - 1/2*I*dilog(-1/2*I + 1/2) - sage: abs(N(a - pi*log(2)/8)) < 1e-15 # long time + sage: abs(N(a - pi*log(2)/8)) < 1e-15 # long time # known bug True Check that :trac:`17968` is fixed::