@@ -52,40 +52,39 @@ def __init__(self, inputs=1, outputs=1, dt=None):
52
52
self .dt = dt
53
53
54
54
#
55
- # Getter and setter functions for legacy input/output attributes
55
+ # Getter and setter functions for legacy state attributes
56
56
#
57
- # For this iteration, generate a pending deprecation warning whenever
58
- # the getter/setter is called. For a future iteration, turn it into a
59
- # deprecation warning.
57
+ # For this iteration, generate a deprecation warning whenever the
58
+ # getter/setter is called. For a future iteration, turn it into a
59
+ # future warning, so that users will see it .
60
60
#
61
61
62
62
@property
63
63
def inputs (self ):
64
- raise PendingDeprecationWarning (
65
- "The LTI `inputs` attribute will be deprecated in a future "
66
- "release. Use `ninputs` instead." )
64
+ warn ( "The LTI `inputs` attribute will be deprecated in a future "
65
+ "release. Use `ninputs` instead." ,
66
+ DeprecationWarning , stacklevel = 2 )
67
67
return self .ninputs
68
68
69
69
@inputs .setter
70
70
def inputs (self , value ):
71
- raise PendingDeprecationWarning (
72
- "The LTI `inputs` attribute will be deprecated in a future "
73
- "release. Use `ninputs` instead." )
74
-
71
+ warn ("The LTI `inputs` attribute will be deprecated in a future "
72
+ "release. Use `ninputs` instead." ,
73
+ DeprecationWarning , stacklevel = 2 )
75
74
self .ninputs = value
76
75
77
76
@property
78
77
def outputs (self ):
79
- raise PendingDeprecationWarning (
80
- "The LTI `outputs` attribute will be deprecated in a future "
81
- "release. Use `noutputs` instead." )
78
+ warn ( "The LTI `outputs` attribute will be deprecated in a future "
79
+ "release. Use `noutputs` instead." ,
80
+ DeprecationWarning , stacklevel = 2 )
82
81
return self .noutputs
83
82
84
83
@outputs .setter
85
84
def outputs (self , value ):
86
- raise PendingDeprecationWarning (
87
- "The LTI `outputs` attribute will be deprecated in a future "
88
- "release. Use `noutputs` instead." )
85
+ warn ( "The LTI `outputs` attribute will be deprecated in a future "
86
+ "release. Use `noutputs` instead." ,
87
+ DeprecationWarning , stacklevel = 2 )
89
88
self .noutputs = value
90
89
91
90
def isdtime (self , strict = False ):
0 commit comments