Skip to content

Commit

Permalink
Extend warn_until failure dates
Browse files Browse the repository at this point in the history
Due to SUSE's extended support policy, we won't remove
code from Salt until next major release.
  • Loading branch information
m-czernek committed Sep 4, 2024
1 parent 3f3c8d8 commit 6ac62f8
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions salt/_logging/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class TemporaryLoggingHandler(logging.NullHandler):

def __init__(self, level=logging.NOTSET, max_queue_size=10000):
warn_until_date(
"20240101",
"20260101",
"Please stop using '{name}.TemporaryLoggingHandler'. "
"'{name}.TemporaryLoggingHandler' will go away after "
"{{date}}.".format(name=__name__),
Expand Down Expand Up @@ -225,7 +225,7 @@ class QueueHandler(
def __init__(self, queue): # pylint: disable=useless-super-delegation
super().__init__(queue)
warn_until_date(
"20240101",
"20260101",
"Please stop using '{name}.QueueHandler' and instead "
"use 'logging.handlers.QueueHandler'. "
"'{name}.QueueHandler' will go away after "
Expand Down Expand Up @@ -283,7 +283,7 @@ class QueueHandler(
def __init__(self, queue): # pylint: disable=useless-super-delegation
super().__init__(queue)
warn_until_date(
"20240101",
"20260101",
"Please stop using '{name}.QueueHandler' and instead "
"use 'logging.handlers.QueueHandler'. "
"'{name}.QueueHandler' will go away after "
Expand Down
2 changes: 1 addition & 1 deletion salt/log/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from salt.utils.versions import warn_until_date

warn_until_date(
"20240101",
"20260101",
"Please stop using '{name}' and instead use 'salt._logging'. "
"'{name}' will go away after {{date}}.".format(name=__name__),
stacklevel=3,
Expand Down
2 changes: 1 addition & 1 deletion salt/log/handlers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from salt.utils.versions import warn_until_date

warn_until_date(
"20240101",
"20260101",
"Please stop using '{name}' and instead use 'salt._logging.handlers'. "
"'{name}' will go away after {{date}}.".format(name=__name__),
)
Expand Down
2 changes: 1 addition & 1 deletion salt/log/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# pylint: enable=unused-import

warn_until_date(
"20240101",
"20260101",
"Please stop using '{name}' and instead use 'salt._logging.mixins'. "
"'{name}' will go away after {{date}}.".format(name=__name__),
)
4 changes: 2 additions & 2 deletions salt/log/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from salt.utils.versions import warn_until_date

warn_until_date(
"20240101",
"20260101",
"Please stop using '{name}' and instead use 'salt._logging'. "
"'{name}' will go away after {{date}}. Do note however that "
"'salt._logging' is now considered a non public implementation "
Expand All @@ -34,7 +34,7 @@ def _deprecated_warning(func):
@wraps(func)
def wrapper(*args, **kwargs):
warn_until_date(
"20240101",
"20260101",
"Please stop using 'salt.log.setup.{name}()' as it no longer does anything and "
"will go away after {{date}}.".format(name=func.__qualname__),
stacklevel=4,
Expand Down
2 changes: 1 addition & 1 deletion salt/modules/cassandra_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __virtual__():
)

warn_until_date(
"20240101",
"20260101",
"The cassandra returner is broken and deprecated, and will be removed"
" after {date}. Use the cassandra_cql returner instead",
)
Expand Down
2 changes: 1 addition & 1 deletion salt/returners/cassandra_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __virtual__():
if not HAS_PYCASSA:
return False, "Could not import cassandra returner; pycassa is not installed."
warn_until_date(
"20240101",
"20260101",
"The cassandra returner is broken and deprecated, and will be removed"
" after {date}. Use the cassandra_cql returner instead",
)
Expand Down
2 changes: 1 addition & 1 deletion salt/returners/django_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def returner_callback(sender, ret):

def __virtual__():
warn_until_date(
"20240101",
"20260101",
"The django returner is broken and deprecated, and will be removed"
" after {date}.",
)
Expand Down

0 comments on commit 6ac62f8

Please sign in to comment.