-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
new featureEnhancement specifically adding a new feature (feature request should be used for issues instead)Enhancement specifically adding a new feature (feature request should be used for issues instead)
Description
Description of proposed feature
Our current way of deprecating functions and classes could be improved to be more user and developer friendly. Perhaps we can implement a decorator-based system where the developer can input the following information:
- Version since deprecation
- Version until deletion
- Reason for deprecation
How can the new feature be used?
@deprecated(since="0.5.0". until="0.7.0", message="Use Create instead.")
class ShowCreation(Create):
...
class Animation(object):
@deprecated(since="0.1.0", until="0.3.0", message="Use animation.interpolate() instead.")
def update(self, alpha):
...
Additional comments
We could also implement helper methods and/or CLI commands that can:
- List deprecated classes/methods
- Sort classes/methods by version since deprecation
- Warn developers if there is any deprecated code that has not been deleted at the expected version
- i.e. If
until="0.6.0"
and current version is0.6.0
or later, a warning will be shown as a reminder to delete the deprecated code
- i.e. If
We could deprecate parameters this way as well.
Metadata
Metadata
Assignees
Labels
new featureEnhancement specifically adding a new feature (feature request should be used for issues instead)Enhancement specifically adding a new feature (feature request should be used for issues instead)