Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 04fdda6

Browse files
author
Matthias Koeppe
committed
sage.all: In filterwarnings, remove leading '.*' from module regexes, use regex that matches vendored 'packaging'
1 parent 6492b8c commit 04fdda6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/sage/all.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,30 +86,30 @@
8686

8787
# Ignore all deprecations from IPython etc.
8888
warnings.filterwarnings('ignore', category=DeprecationWarning,
89-
module='.*(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic|jedi)')
89+
module='(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic|jedi)')
9090

9191
# scipy 1.18 introduced reprecation warnings on a number of things they are moving to
9292
# numpy, e.g. DeprecationWarning: scipy.array is deprecated
9393
# and will be removed in SciPy 2.0.0, use numpy.array instead
9494
# This affects networkx 2.2 up and including 2.4 (cf. :trac:29766)
9595
warnings.filterwarnings('ignore', category=DeprecationWarning,
96-
module='.*(scipy|networkx)')
96+
module='(scipy|networkx)')
9797

9898
# Ignore collections.abc warnings, there are a lot of them but they are
9999
# harmless.
100100
warnings.filterwarnings('ignore', category=DeprecationWarning,
101-
message='.*collections[.]abc.*')
101+
message='collections[.]abc.*')
102102
# However, be sure to keep OUR deprecation warnings
103103
warnings.filterwarnings('default', category=DeprecationWarning,
104104
message=r'[\s\S]*See https?://trac\.sagemath\.org/[0-9]* for details.')
105105

106106
# Ignore Python 3.9 deprecation warnings
107107
warnings.filterwarnings('ignore', category=DeprecationWarning,
108-
module='.*ast')
108+
module='ast')
109109

110110
# Ignore packaging 20.5 deprecation warnings
111111
warnings.filterwarnings('ignore', category=DeprecationWarning,
112-
module='.*packaging')
112+
module='(.*[.]_vendor[.])?packaging')
113113

114114
################ end setup warnings ###############################
115115

0 commit comments

Comments
 (0)