introduce deprecation warnings for legacy parametersets, fixes #2427
This commit is contained in:
@@ -6,7 +6,7 @@ import warnings
|
||||
from collections import namedtuple
|
||||
from operator import attrgetter
|
||||
from .compat import imap
|
||||
from .deprecated import MARK_INFO_ATTRIBUTE
|
||||
from .deprecated import MARK_INFO_ATTRIBUTE, MARK_PARAMETERSET_UNPACKING
|
||||
|
||||
def alias(name, warning=None):
|
||||
getter = attrgetter(name)
|
||||
@@ -61,6 +61,9 @@ class ParameterSet(namedtuple('ParameterSet', 'values, marks, id')):
|
||||
if legacy_force_tuple:
|
||||
argval = argval,
|
||||
|
||||
if newmarks:
|
||||
warnings.warn(MARK_PARAMETERSET_UNPACKING)
|
||||
|
||||
return cls(argval, marks=newmarks, id=None)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user