Skip to content

Commit 76831e2

Browse files
committed
Added more deprecation warnings
1 parent a31ca64 commit 76831e2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/labthings/server/decorators.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ def marshal_task(f):
9393
"""Decorator to format the response of a View with the standard Task schema"""
9494

9595
logging.warning(
96-
"marshal_task is deprecated. Please use @ThingAction or the ActionView class"
96+
"marshal_task is deprecated and will be removed in LabThings 1.0."
97+
"Please use the ActionView class instead."
9798
)
9899

99100
# Pass params to call function attribute for external access
@@ -121,6 +122,10 @@ def ThingAction(viewcls: View):
121122
Returns:
122123
View: View class with Action spec tags
123124
"""
125+
logging.warning(
126+
"ThingAction decorator is deprecated and will be removed in LabThings 1.0."
127+
"Please use the ActionView class instead."
128+
)
124129
# Set to PropertyView.dispatch_request
125130
viewcls.dispatch_request = ActionView.dispatch_request
126131
# Update Views API spec
@@ -174,6 +179,10 @@ def ThingProperty(viewcls):
174179
Returns:
175180
View: View class with Property spec tags
176181
"""
182+
logging.warning(
183+
"ThingProperty decorator is deprecated and will be removed in LabThings 1.0."
184+
"Please use the PropertyView class instead."
185+
)
177186
# Set to PropertyView.dispatch_request
178187
viewcls.dispatch_request = PropertyView.dispatch_request
179188
# Update Views API spec

0 commit comments

Comments
 (0)