-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Warning of utils.deprecated for properties is ugly #8113
Copy link
Copy link
Closed
Description
The contributor's guide recommends using the deprecated decorator for attributes as follows:
@property
@deprecated("Attribute labels_ was deprecated in version 0.13 and "
"will be removed in 0.15. Use 'classes_' instead")
def labels_(self):
return self.classes_However the warning produced begins "Function labels_ is deprecated; Attribute labels_ was deprecated ...". This is ugly. It should just say "Attribute labels_ is deprecated; ...".
We should either:
- remove the boilerplate "Function x is deprecated" as I think we're not counting on it being there in our deprecation messages elsewhere
- handle explicitly the case where
deprecateddecorates aproperty
(No doubt futurepast aspires to do all of this right.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels