Deprecate Django returner

It's likely that the Django returner never worked - it can only fire
signals from within the same process that the Django server is running
in, which *won't* be the process that Salt is running in. Deprecating
and marking for removal.
This commit is contained in:
Wayne Werner 2022-09-08 12:20:27 -05:00
parent 14a932aca4
commit 9c2a84845c
No known key found for this signature in database
GPG key ID: D36E642A06D1A142

View file

@ -32,6 +32,7 @@ import logging
# Import Salt libraries
import salt.returners
import salt.utils.jid
from salt.utils.versions import warn_until_date
log = logging.getLogger(__name__)
@ -49,6 +50,11 @@ __virtualname__ = "django"
def __virtual__():
warn_until_date(
"20250101",
"The django returner is broken and deprecated, and will be removed"
" after {date}.",
)
if not HAS_DJANGO:
return False, "Could not import django returner; django is not installed."
return True