Skip to content

Commit 60b1133

Browse files
committed
upate wording & layout of dep warning
1 parent 65d5406 commit 60b1133

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

fooof/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
from .version import __version__
44

5-
# deprecation of fooof for specparam
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
67
from warnings import warn, simplefilter
7-
simplefilter('always') # make sure user sees it once, on every import
8-
warn_text = 'Warning: The fooof package is being deprecated in favor of the\
9-
spectral parameterization (specparam) package. This version of fooof is\
10-
functional, however we recommend upgrading to specparam, because this 1.1\
11-
version of fooof will not have continuing development. All new features and\
12-
development will be done on the specparam package.'
13-
warn(warn_text, DeprecationWarning, stacklevel=2)
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)
1414

1515
from .bands import Bands
1616
from .objs import FOOOF, FOOOFGroup

0 commit comments

Comments
 (0)