From 6ac62f8593f67c7e0ea9e9d0a2c774f73710c9bf Mon Sep 17 00:00:00 2001 From: Marek Czernek Date: Wed, 4 Sep 2024 09:58:53 +0200 Subject: [PATCH 1/2] Extend warn_until failure dates Due to SUSE's extended support policy, we won't remove code from Salt until next major release. --- salt/_logging/handlers.py | 6 +++--- salt/log/__init__.py | 2 +- salt/log/handlers/__init__.py | 2 +- salt/log/mixins.py | 2 +- salt/log/setup.py | 4 ++-- salt/modules/cassandra_mod.py | 2 +- salt/returners/cassandra_return.py | 2 +- salt/returners/django_return.py | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/salt/_logging/handlers.py b/salt/_logging/handlers.py index f4b0b6fec3..5a1a161313 100644 --- a/salt/_logging/handlers.py +++ b/salt/_logging/handlers.py @@ -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__), @@ -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 " @@ -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 " diff --git a/salt/log/__init__.py b/salt/log/__init__.py index 3458474f2c..69bfa8ed15 100644 --- a/salt/log/__init__.py +++ b/salt/log/__init__.py @@ -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, diff --git a/salt/log/handlers/__init__.py b/salt/log/handlers/__init__.py index 8bc740e20f..55cf10cdb7 100644 --- a/salt/log/handlers/__init__.py +++ b/salt/log/handlers/__init__.py @@ -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__), ) diff --git a/salt/log/mixins.py b/salt/log/mixins.py index 6619b56419..65f5ed7f78 100644 --- a/salt/log/mixins.py +++ b/salt/log/mixins.py @@ -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__), ) diff --git a/salt/log/setup.py b/salt/log/setup.py index 74bd7bbd3e..f4c80b0f28 100644 --- a/salt/log/setup.py +++ b/salt/log/setup.py @@ -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 " @@ -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, diff --git a/salt/modules/cassandra_mod.py b/salt/modules/cassandra_mod.py index 029fd08fb9..db9c882192 100644 --- a/salt/modules/cassandra_mod.py +++ b/salt/modules/cassandra_mod.py @@ -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", ) diff --git a/salt/returners/cassandra_return.py b/salt/returners/cassandra_return.py index ac01a4e46c..5fcc00ee8c 100644 --- a/salt/returners/cassandra_return.py +++ b/salt/returners/cassandra_return.py @@ -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", ) diff --git a/salt/returners/django_return.py b/salt/returners/django_return.py index 3638687555..474653f383 100644 --- a/salt/returners/django_return.py +++ b/salt/returners/django_return.py @@ -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}.", ) From 775a742f5b05ffac9e89329a6db05366a93a28b3 Mon Sep 17 00:00:00 2001 From: Marek Czernek Date: Wed, 4 Sep 2024 10:42:13 +0200 Subject: [PATCH 2/2] Fix aptpkg module warn_until_date --- salt/modules/aptpkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py index ad5450c415..cd40aea54f 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py @@ -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 "