|
13 | 13 | import warnings
|
14 | 14 |
|
15 | 15 | from .testing import (error_warnings, suppress_warnings)
|
| 16 | +from .deprecated import deprecate_with_version |
16 | 17 |
|
17 | 18 |
|
18 | 19 | warnings.warn('The checkwarns module is deprecated and will be removed '
|
19 |
| - 'in nibabel v3.0', FutureWarning) |
| 20 | + 'in nibabel v3.0', DeprecationWarning) |
20 | 21 |
|
21 | 22 |
|
| 23 | +@deprecate_with_version('ErrorWarnings is deprecated; use nibabel.testing.error_warnings.', |
| 24 | + since='2.1.0', until='3.0.0') |
22 | 25 | class ErrorWarnings(error_warnings):
|
23 |
| - |
24 |
| - def __init__(self, *args, **kwargs): |
25 |
| - warnings.warn('ErrorWarnings is deprecated and will be removed in ' |
26 |
| - 'nibabel v3.0; use nibabel.testing.error_warnings.', |
27 |
| - FutureWarning) |
28 |
| - super(ErrorWarnings, self).__init__(*args, **kwargs) |
| 26 | + pass |
29 | 27 |
|
30 | 28 |
|
| 29 | +@deprecate_with_version('IgnoreWarnings is deprecated; use nibabel.testing.suppress_warnings.', |
| 30 | + since='2.1.0', until='3.0.0') |
31 | 31 | class IgnoreWarnings(suppress_warnings):
|
32 |
| - |
33 |
| - def __init__(self, *args, **kwargs): |
34 |
| - warnings.warn('IgnoreWarnings is deprecated and will be removed in ' |
35 |
| - 'nibabel v3.0; use nibabel.testing.suppress_warnings.', |
36 |
| - FutureWarning) |
37 |
| - super(IgnoreWarnings, self).__init__(*args, **kwargs) |
| 32 | + pass |
0 commit comments