From da7ec1c1397fd50803962e0bcf74e1fe97a228d5 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Mon, 4 Nov 2019 21:48:38 +0100 Subject: sage: ignore werkzeug immutable dict deprecation --- .../patches/ignore-werkzeug-immutable-dict-deprecation.patch | 12 ++++++++++++ pkgs/applications/science/math/sage/sage-src.nix | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch (limited to 'pkgs/applications/science') diff --git a/pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch b/pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch new file mode 100644 index 00000000000..c5f95b498d5 --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch @@ -0,0 +1,12 @@ +diff --git a/src/sage/all.py b/src/sage/all.py +index c87c9372e9..862fca4fcc 100644 +--- a/src/sage/all.py ++++ b/src/sage/all.py +@@ -306,6 +306,7 @@ warnings.filters.remove(('ignore', None, DeprecationWarning, None, 0)) + # Ignore all deprecations from IPython etc. + warnings.filterwarnings('ignore', category=DeprecationWarning, + module='.*(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic)') ++warnings.filterwarnings('ignore', category=DeprecationWarning, message=r".*The import 'werkzeug.ImmutableDict' is deprecated") + # Ignore collections.abc warnings, there are a lot of them but they are + # harmless. + warnings.filterwarnings('ignore', category=DeprecationWarning, diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index c7a3da68b15..14b1023f26a 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -107,6 +107,10 @@ stdenv.mkDerivation rec { # ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests ./patches/ignore-cmp-deprecation.patch + + # Werkzeug has deprecated ImmutableDict, but it is still used in legacy + # sagenb. That's no big issue since sagenb will be removed soon anyways. + ./patches/ignore-werkzeug-immutable-dict-deprecation.patch ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; -- cgit 1.4.1