Skip to content

Commit

Permalink
Merge pull request #4252 from neutrinoceros/no_predictions_in_depr_me…
Browse files Browse the repository at this point in the history
…ssages

DEPR: do not try to predict removal dates in deprecation warnings by default
  • Loading branch information
neutrinoceros authored Dec 22, 2022
2 parents 996c803 + 8c2ee96 commit 2770642
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions yt/_maintenance/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ def issue_deprecation_warning(
... )
"""

msg += f"\nDeprecated since yt {since}\nThis feature is planned for removal "
if removal is None:
msg += "two minor releases later (anticipated)"
else:
msg += f"in yt {removal}"
msg += f"\nDeprecated since yt {since}"
if removal is not None:
msg += f"\nThis feature is planned for removal in yt {removal}"
warnings.warn(msg, VisibleDeprecationWarning, stacklevel=stacklevel)


Expand Down

0 comments on commit 2770642

Please sign in to comment.