summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2022-03-15 22:31:01 +0100
committerGitHub <noreply@github.com>2022-03-15 22:31:01 +0100
commit8d18f29b6001756116cbb188468ef10178f44046 (patch)
tree0330bd2b7e4ed15f843f744227783c0561cd53a2 /pkgs/applications/science
parent2eb46d5c50448d30f3ac94c8fcb1f3c0f6732352 (diff)
parenta31cb9033e20a048e816e6e864dab23474b0f893 (diff)
downloadnixpkgs-8d18f29b6001756116cbb188468ef10178f44046.tar
nixpkgs-8d18f29b6001756116cbb188468ef10178f44046.tar.gz
nixpkgs-8d18f29b6001756116cbb188468ef10178f44046.tar.bz2
nixpkgs-8d18f29b6001756116cbb188468ef10178f44046.tar.lz
nixpkgs-8d18f29b6001756116cbb188468ef10178f44046.tar.xz
nixpkgs-8d18f29b6001756116cbb188468ef10178f44046.tar.zst
nixpkgs-8d18f29b6001756116cbb188468ef10178f44046.zip
Merge pull request #161366 from NixOS/staging-next
Staging next 2022-02-22
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/math/sage/patches/no-cython-sources-in-tracebacks-on-ipython8.patch52
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix16
2 files changed, 7 insertions, 61 deletions
diff --git a/pkgs/applications/science/math/sage/patches/no-cython-sources-in-tracebacks-on-ipython8.patch b/pkgs/applications/science/math/sage/patches/no-cython-sources-in-tracebacks-on-ipython8.patch
deleted file mode 100644
index 871e494c362..00000000000
--- a/pkgs/applications/science/math/sage/patches/no-cython-sources-in-tracebacks-on-ipython8.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/src/sage/repl/interface_magic.py b/src/sage/repl/interface_magic.py
-index 8a455b69b0..a93e1c9e04 100644
---- a/src/sage/repl/interface_magic.py
-+++ b/src/sage/repl/interface_magic.py
-@@ -260,7 +260,7 @@ class InterfaceMagic(object):
-             2
-             120
-             sage: shell.run_cell('%%gap foo\n1+1;\n')
--            ...File "<string>", line unknown
-+            ...File...<string>...
-             SyntaxError: Interface magics have no options, got "foo"
-             <BLANKLINE>
-             sage: shell.run_cell('%%gap?')
-diff --git a/src/sage/repl/interpreter.py b/src/sage/repl/interpreter.py
-index 71dbe429fd..36b1d986d6 100644
---- a/src/sage/repl/interpreter.py
-+++ b/src/sage/repl/interpreter.py
-@@ -70,25 +70,6 @@ that shell.  The bulk of this functionality is provided through
- 
- TESTS:
- 
--Check that Cython source code appears in tracebacks::
--
--    sage: from sage.repl.interpreter import get_test_shell
--    sage: shell = get_test_shell()
--    sage: print("dummy line"); shell.run_cell('1/0') # see #25320 for the reason of the `...` and the dummy line in this test
--    dummy line
--    ...
--    ZeroDivisionError...Traceback (most recent call last)
--    <ipython-input-...> in <module>...
--    ----> 1 Integer(1)/Integer(0)
--    .../sage/rings/integer.pyx in sage.rings.integer.Integer...div...
--    ...
--    -> ...                  raise ZeroDivisionError("rational division by zero")
--       ....:            x = <Rational> Rational.__new__(Rational)
--       ....:            mpq_div_zz(x.value, ....value, (<Integer>right).value)
--    <BLANKLINE>
--    ZeroDivisionError: rational division by zero
--    sage: shell.quit()
--
- Test prompt transformer::
- 
-     sage: from sage.repl.interpreter import SagePromptTransformer
-@@ -423,7 +404,7 @@ def SagePreparseTransformer(lines):
-         sage: from sage.repl.interpreter import get_test_shell
-         sage: shell = get_test_shell()
-         sage: shell.run_cell(bad_syntax)
--          File "<string>", line unknown
-+          File...<string>...
-         SyntaxError: Mismatched ']'
-         <BLANKLINE>
-         sage: shell.quit()
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index bae33802d30..22e3a288b7d 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -119,15 +119,13 @@ stdenv.mkDerivation rec {
     # https://trac.sagemath.org/ticket/32959
     ./patches/linbox-1.7-upgrade.patch
 
-    # To emit better tracebacks, IPython 8 parses Python files using the ast
-    # module (via the stack_data package). Since Cython is a superset of Python,
-    # this results in no Cython code being printed in tracebacks. Fixing this
-    # properly is tracked in https://github.com/alexmojaki/stack_data/issues/21,
-    # but for now we just disable the corresponding test. An alternative would
-    # be to revert IPython's IPython/core/ultratb.py, but this would need to be
-    # Sage-specific (since it would worsen tracebacks for pure Python code).
-    # Sage tracks this at https://trac.sagemath.org/ticket/33170
-    ./patches/no-cython-sources-in-tracebacks-on-ipython8.patch
+    # https://trac.sagemath.org/ticket/33170
+    (fetchSageDiff {
+      base = "9.5.rc1";
+      name = "ipython-8-update.patch";
+      rev = "a90a314616d86d6be9c0d5233f0d36c4bfe06231";
+      sha256 = "sha256-pXdtokTo84xNCnV+HyAKEzG562z8FjzJ7hczOja0dRw=";
+    })
 
     # https://trac.sagemath.org/ticket/32968
     (fetchSageDiff {