|
7 | 7 |
|
8 | 8 | import lazy_loader as lazy |
9 | 9 |
|
10 | | -__getattr_lz__, __dir__, __all__ = lazy.attach( |
| 10 | +__getattr__, __dir__, __all__ = lazy.attach( |
11 | 11 | __name__, |
12 | 12 | submodules=[ |
13 | 13 | "constants", |
14 | 14 | "pick", |
15 | | - # Remove these three in 1.6 along with their .py files |
16 | | - "proj", |
17 | | - "meas_info", |
18 | | - "reference", |
19 | 15 | ], |
20 | 16 | submod_attrs={ |
21 | 17 | "base": ["BaseRaw", "concatenate_raws", "match_channel_orders"], |
|
61 | 57 | ], |
62 | 58 | }, |
63 | 59 | ) |
64 | | - |
65 | | - |
66 | | -# Remove in 1.6 and change __getattr_lz__ to __getattr__ |
67 | | -from ..utils import warn as _warn |
68 | | -from .._fiff.reference import ( |
69 | | - set_eeg_reference as _set_eeg_reference, |
70 | | - set_bipolar_reference as _set_bipolar_reference, |
71 | | - add_reference_channels as _add_referenc_channels, |
72 | | -) |
73 | | -from .._fiff.meas_info import Info as _Info |
74 | | - |
75 | | - |
76 | | -def __getattr__(name): |
77 | | - """Try getting attribute from fiff submodule.""" |
78 | | - if name in ( |
79 | | - "set_eeg_reference", |
80 | | - "set_bipolar_reference", |
81 | | - "add_reference_channels", |
82 | | - ): |
83 | | - _warn( |
84 | | - f"mne.io.{name} is deprecated and will be removed in 1.6, " |
85 | | - "use mne.{name} instead", |
86 | | - FutureWarning, |
87 | | - ) |
88 | | - return globals()[f"_{name}"] |
89 | | - elif name == "RawFIF": |
90 | | - _warn( |
91 | | - "RawFIF is deprecated and will be removed in 1.6, use Raw instead", |
92 | | - FutureWarning, |
93 | | - ) |
94 | | - name = "Raw" |
95 | | - elif name == "Info": |
96 | | - _warn( |
97 | | - "mne.io.Info is deprecated and will be removed in 1.6, " |
98 | | - "use mne.Info instead", |
99 | | - FutureWarning, |
100 | | - ) |
101 | | - return _Info |
102 | | - return __getattr_lz__(name) |
0 commit comments