MCPcopy
hub / github.com/celery/celery / warn

Function warn

celery/utils/deprecated.py:23–33  ·  view source on GitHub ↗

Warn of (pending) deprecation.

(description=None, deprecation=None,
         removal=None, alternative=None, stacklevel=2)

Source from the content-addressed store, hash-verified

21
22
23def warn(description=None, deprecation=None,
24 removal=None, alternative=None, stacklevel=2):
25 """Warn of (pending) deprecation."""
26 ctx = {'description': description,
27 'deprecation': deprecation, 'removal': removal,
28 'alternative': alternative}
29 if deprecation is not None:
30 w = CPendingDeprecationWarning(PENDING_DEPRECATION_FMT.format(**ctx))
31 else:
32 w = CDeprecationWarning(DEPRECATION_FMT.format(**ctx))
33 warnings.warn(w, stacklevel=stacklevel)
34
35
36def Callable(deprecation=None, removal=None,

Callers 10

parse_iso8601Function · 0.90
__innerFunction · 0.85
__get__Method · 0.85
__set__Method · 0.85
__delete__Method · 0.85
on_timeoutMethod · 0.85
on_unknown_messageMethod · 0.85
report_internal_errorFunction · 0.85
_warn_driftFunction · 0.85

Calls 3

CDeprecationWarningClass · 0.90
formatMethod · 0.45

Tested by

no test coverage detected