Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit 6848749

Browse files
committed
deprecate(core): Add missing deprecation fields in processor
1 parent 0176d5c commit 6848749

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: raven/processors.py

+11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from __future__ import absolute_import
99

1010
import re
11+
import warnings
1112

1213
from raven.utils.compat import string_types, text_type, PY3
1314
from raven.utils import varmap
@@ -167,6 +168,16 @@ class SanitizePasswordsProcessor(SanitizeKeysProcessor):
167168
def sanitize_keys(self):
168169
return self.KEYS
169170

171+
@property
172+
def FIELDS(self):
173+
warnings.warn(
174+
"`SanitizePasswordsProcessor.Fields` has been deprecated. Use "
175+
"`SanitizePasswordsProcessor.KEYS` or `SanitizePasswordsProcessor.sanitize_keys` "
176+
"instead",
177+
DeprecationWarning,
178+
)
179+
return self.KEYS
180+
170181
def sanitize(self, item, value):
171182
value = super(SanitizePasswordsProcessor, self).sanitize(item, value)
172183
if isinstance(value, string_types) and self.VALUES_RE.match(value):

0 commit comments

Comments
 (0)