From 839a6e928c264a9863bd42860c78ae95a6d9f3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Tue, 4 Apr 2023 12:56:57 -0300 Subject: [PATCH] Ignore deprecation warnings triggered by pythran 0.12.1 These happen with python 3.11, setuptools 67.6.1, numpy 1.24.2. When pythran 0.12.1 is installed, I get 24 doctest failures due to deprecation warnings; they are all gone with this commit. --- src/sage/all__sagemath_repl.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/sage/all__sagemath_repl.py b/src/sage/all__sagemath_repl.py index 95dc2a15a80..6800eb9a27b 100644 --- a/src/sage/all__sagemath_repl.py +++ b/src/sage/all__sagemath_repl.py @@ -37,9 +37,17 @@ warnings.filterwarnings('ignore', category=DeprecationWarning, module='(.*[.]_vendor[.])?packaging') -# Ignore numpy warnings triggered by pythran +# Ignore a few warnings triggered by pythran 0.12.1 warnings.filterwarnings('ignore', category=DeprecationWarning, - module='pythran') + message='\n\n `numpy.distutils` is deprecated since NumPy 1.23.0', + module='pythran.dist') +warnings.filterwarnings('ignore', category=DeprecationWarning, + message='pkg_resources is deprecated as an API|' + 'Deprecated call to `pkg_resources.declare_namespace(.*)`', + module='pkg_resources') +warnings.filterwarnings('ignore', category=DeprecationWarning, + message='msvccompiler is deprecated and slated to be removed', + module='distutils.msvccompiler') warnings.filterwarnings('ignore', category=DeprecationWarning, message='The distutils(.sysconfig module| package) is deprecated',