Skip to content

Commit 6a1ba83

Browse files
authored
Merge pull request #266 from fooof-tools/dep_warning
add deprecation warning
2 parents bc415a9 + 60b1133 commit 6a1ba83

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

fooof/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
from .version import __version__
44

5+
# Deprecation of fooof / move to specparam message
6+
# Note: this warning is for fooof v1.1 specifically, and should be removed in specparam 2.0
7+
from warnings import warn, simplefilter
8+
simplefilter('always') # make sure user sees it once, on every import
9+
DEPRECATION_TEXT = ("\nThe `fooof` package is being deprecated and replaced by the "
10+
"`specparam` (spectral parameterization) package."
11+
"\nThis version of `fooof` (1.1) is fully functional, but will not be further updated."
12+
"\nNew projects are recommended to update to using `specparam` (see Changelog for details).")
13+
warn(DEPRECATION_TEXT, DeprecationWarning, stacklevel=2)
14+
515
from .bands import Bands
616
from .objs import FOOOF, FOOOFGroup
717
from .objs.utils import fit_fooof_3d

0 commit comments

Comments
 (0)