Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated code #677

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/aptpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3128,7 +3128,7 @@ def expand_repo_def(**kwargs):
NOT USABLE IN THE CLI
"""
warn_until_date(
"20250101",
"20260101",
"The pkg.expand_repo_def function is deprecated and set for removal "
"after {date}. This is only unsed internally by the apt pkg state "
"module. If that's not the case, please file an new issue requesting "
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