Skip to content

Commit 8f689c0

Browse files
MAINT: Remove old filtered warnings (scipy#16095)
1 parent 68a3530 commit 8f689c0

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

dev.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,7 @@
7171
import importlib.util
7272
import json # noqa: E402
7373
from sysconfig import get_path
74-
75-
try:
76-
from types import ModuleType as new_module
77-
except ImportError: # old Python
78-
from imp import new_module
74+
from types import ModuleType as new_module # noqa: E402
7975

8076
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__)))
8177

doc/source/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,7 @@
152152
warnings.filterwarnings('default', module='sphinx') # internal warnings
153153
# global weird ones that can be safely ignored
154154
for key in (
155-
r"'U' mode is deprecated", # sphinx io
156155
r"OpenSSL\.rand is deprecated", # OpenSSL package in linkcheck
157-
r"Using or importing the ABCs from", # 3.5 importlib._bootstrap
158156
r"distutils Version", # distutils
159157
):
160158
warnings.filterwarnings( # deal with other modules having bad imports

pytest.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ filterwarnings =
77
always::scipy._lib._testutils.FPUModeChangeWarning
88
ignore:.*deprecated and ignored since IPython.*:DeprecationWarning
99
once:.*LAPACK bug 0038.*:RuntimeWarning
10-
ignore:Using or importing the ABCs from 'collections'*:DeprecationWarning
1110
ignore:can't resolve package from __spec__ or __package__, falling back on __name__ and __path__:ImportWarning
12-
once:the imp module is deprecated in favour of importlib.*:DeprecationWarning
13-
once:the imp module is deprecated in favour of importlib.*:PendingDeprecationWarning
1411
ignore:assertions not in test modules or plugins:pytest.PytestConfigWarning
1512
ignore:'environmentfilter' is renamed to 'pass_environment'
1613
ignore:'contextfunction' is renamed to 'pass_context'

runtests.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@
6767
import subprocess
6868
import time
6969
import datetime
70-
try:
71-
from types import ModuleType as new_module
72-
except ImportError: # old Python
73-
from imp import new_module
70+
from types import ModuleType as new_module # noqa: E402
7471

7572
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__)))
7673

0 commit comments

Comments
 (0)