File tree Expand file tree Collapse file tree 4 files changed +2
-14
lines changed
Expand file tree Collapse file tree 4 files changed +2
-14
lines changed Original file line number Diff line number Diff line change 7171import importlib .util
7272import json # noqa: E402
7373from 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
8076ROOT_DIR = os .path .abspath (os .path .join (os .path .dirname (__file__ )))
8177
Original file line number Diff line number Diff line change 152152warnings .filterwarnings ('default' , module = 'sphinx' ) # internal warnings
153153# global weird ones that can be safely ignored
154154for 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
Original file line number Diff line number Diff 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'
Original file line number Diff line number Diff line change 6767import subprocess
6868import time
6969import 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
7572ROOT_DIR = os .path .abspath (os .path .join (os .path .dirname (__file__ )))
7673
You can’t perform that action at this time.
0 commit comments