From b5a36da89caac2cd677426af23d203e19ab9f222 Mon Sep 17 00:00:00 2001 From: Akiyoshi Suda Date: Tue, 7 Apr 2026 14:46:15 +0900 Subject: [PATCH] gnu: sage: Fix ipython incompatibility. See https://github.com/sagemath/sage/pull/41141. * gnu/packages/sagemath.scm (sage)[arguments]: Add a patch that removes an outdated function. Merges guix/guix!7737 Change-Id: Ie38eca12dceb92e95596687d9e15b826c3712184 Signed-off-by: Cayetano Santos Modified-by: Cayetano Santos --- gnu/packages/sagemath.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm index 72eefc8e1dd..bbfa5a80e07 100644 --- a/gnu/packages/sagemath.scm +++ b/gnu/packages/sagemath.scm @@ -515,6 +515,11 @@ database.") (substitute* "src/sage/interfaces/gp.py" (("command=f\"gp") (string-append "command=f\"" pari-gp "/bin/gp"))) + ;; Remove when updating to sage-10.8, python-3.12. + ;; See https://github.com/sagemath/sage/pull/41141 + (substitute* "src/sage/repl/display/formatter.py" + (("from IPython.utils.py3compat import unicode_to_str") "") + (("unicode_to_str\\(self.newline\\)") "self.newline")) (substitute* "src/bin/sage" (("exec python3") (string-append "exec " python "/bin/python3"))