Skip to content

Commit

Permalink
🐛 correct deprecated Python warnings.
Browse files Browse the repository at this point in the history
User-facing deprecation warnings should always use FutureWarning.

Signed-off-by: Eden Rose, MSc <[email protected]>
  • Loading branch information
rjdbcm authored May 5, 2024
1 parent 20ebf49 commit df2de03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ozi/spec/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ def __post_init__(self: Self) -> None:
if datetime.now(tz=timezone.utc).date() > python3_eol: # pragma: no cover
warn(
f'Python {pymajor}.{pyminor}.{pypatch} is not supported as of {python3_eol}.',
DeprecationWarning,
RuntimeWarning,
)
elif datetime.now(tz=timezone.utc).date() > ozi_support_eol: # pragma: no cover
warn(
f'Python {pymajor}.{pyminor}.{pypatch} support is pending deprecation '
f'as of {ozi_support_eol}.',
PendingDeprecationWarning,
RuntimeWarning,
)

@cached_property
Expand Down

0 comments on commit df2de03

Please sign in to comment.